/usr/src/kernel-patches/lustre/patches/md-mmp-unplug-dev.patch is in linux-patch-lustre 1.8.5+dfsg-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | Index: linux-2.6.18-128.1.14/drivers/md/raid5.c
===================================================================
--- linux-2.6.18-128.1.14.orig/drivers/md/raid5.c 2009-06-19 12:35:07.000000000 -0600
+++ linux-2.6.18-128.1.14/drivers/md/raid5.c 2009-06-19 12:35:26.000000000 -0600
@@ -1456,6 +1456,8 @@
bi->bi_next = *bip;
*bip = bi;
bi->bi_phys_segments ++;
+ if (bio_sync(bi) && !forwrite)
+ clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */
spin_unlock_irq(&conf->device_lock);
spin_unlock(&sh->lock);
@@ -3012,6 +3014,8 @@
test_bit(BIO_UPTODATE, &bi->bi_flags)
? 0 : -EIO);
}
+ if (bio_sync(bi))
+ raid5_unplug_device(q);
return 0;
}
|