[dm-devel] rdac.c patch not quite right.

Chauhan, Vijay Vijay.Chauhan at lsi.com
Mon Dec 13 09:07:44 UTC 2010


On Thurs December 09, 2010 9:11 PM Vijay Chauhan wrote:
> >
> > Vijay, in your patch, the second expression is not a comparison to be
> > precise!  Based on your explanation, you really want (inq.PQ_PDT ==
> > 0x7F) rather than the current expression (inq.PQ_PDT & 0x7F).
> Yes, I agree with you. I will correct the patch with your inputs. Thanks.
Resubmitting the patch with the change in second expression.

Thanks,
Vijay
 
---
In case of not connected device, only first expression is checked for PQ in rdac path checker. This patch
corrects the first expression by masking MSB 3 bits and comparing it with 0x20. Second expression compares with 0x7f. 

Signed-off-by: Vijay Chauhan <vijay.chauhan at lsi.com>
---
--- multipath-tools-orig/libmultipath/checkers/rdac.c	2010-12-06 02:59:40.000000000 -0600
+++ multipath-tools/libmultipath/checkers/rdac.c	2010-12-09 10:34:52.000000000 -0600
@@ -107,7 +107,7 @@ libcheck_check (struct checker * c)
 	if (0 != do_inq(c->fd, 0xC9, &inq, sizeof(struct volume_access_inq))) {
 		ret = PATH_DOWN;
 		goto done;
-	} else if ((inq.PQ_PDT & 0x20) || (inq.PQ_PDT & 0x7f)) {
+	} else if (((inq.PQ_PDT & 0xE0) == 0x20) || (inq.PQ_PDT == 0x7f)) {
 		/* LUN not connected*/
 		ret = PATH_DOWN;
 		goto done;
--




More information about the dm-devel mailing list