[dm-devel] [PATCH] use uptodate bit to test status of bios

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If there is an error on a partially completed bio it's uptodate
bit is cleared and an error value is retured, but DM will see
that bi_size is not yet zero and ignore it. SCSI will fail the rest
of the IO if the fail fast bit is set, so DM multipath will
eventually see the error from them. However, if that behavior is not
a requirement the patch below would be needed to detect errors in
bios where the begining is not uptodate but the end completed without
errors.

SCSI will not always fail the rest of the IO when the fail fast bit
is not set, so this may be a bug in dm-crypt and dm-raid1.

Mike Christie


--- linux-2.6.4-rc1-udm1.orig/drivers/md/dm-mpath.c	2004-03-03 19:56:43.000000000 -0800
+++ linux-2.6.4-rc1-udm1/drivers/md/dm-mpath.c	2004-03-03 19:52:55.000000000 -0800
@@ -551,8 +551,9 @@ static int do_end_io(struct multipath *m
 		     int error, struct mpath_io *io)
 {
 	int r;
+	int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);

-	if (error) {
+	if (uptodate) {
 		spin_lock(&m->lock);
 		if (!m->nr_valid_paths) {
 			spin_unlock(&m->lock);



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux