The patch titled md: Improve detection of lack of barrier support in raid1 has been added to the -mm tree. Its filename is md-improve-detection-of-lack-of-barrier-support-in-raid1.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: NeilBrown <neilb@xxxxxxx> Move the test for 'do barrier work' down a bit so that if the first write to a raid1 is a BIO_RW_BARRIER write, the checking done by superblock writes will cause the right thing to happen. Signed-off-by: Neil Brown <neilb@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/md/raid1.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff -puN drivers/md/raid1.c~md-improve-detection-of-lack-of-barrier-support-in-raid1 drivers/md/raid1.c --- 25/drivers/md/raid1.c~md-improve-detection-of-lack-of-barrier-support-in-raid1 Fri Apr 28 16:40:55 2006 +++ 25-akpm/drivers/md/raid1.c Fri Apr 28 16:40:55 2006 @@ -753,18 +753,24 @@ static int make_request(request_queue_t const int rw = bio_data_dir(bio); int do_barriers; - if (unlikely(!mddev->barriers_work && bio_barrier(bio))) { - bio_endio(bio, bio->bi_size, -EOPNOTSUPP); - return 0; - } - /* * Register the new request and wait if the reconstruction * thread has put up a bar for new requests. * Continue immediately if no resync is active currently. + * We test barriers_work *after* md_write_start as md_write_start + * may cause the first superblock write, and that will check out + * if barriers work. */ + md_write_start(mddev, bio); /* wait on superblock update early */ + if (unlikely(!mddev->barriers_work && bio_barrier(bio))) { + if (rw == WRITE) + md_write_end(mddev); + bio_endio(bio, bio->bi_size, -EOPNOTSUPP); + return 0; + } + wait_barrier(conf); disk_stat_inc(mddev->gendisk, ios[rw]); _ Patches currently in -mm which might be from neilb@xxxxxxx are md-avoid-oops-when-attempting-to-fix-read-errors-on-raid10.patch md-fixed-refcounting-locking-when-attempting-read-error-correction-in-raid10.patch md-change-enotsupp-to-eopnotsupp.patch md-improve-detection-of-lack-of-barrier-support-in-raid1.patch md-fix-rdev-nr_pending-count-when-retrying-barrier-requests.patch fix-dcache-race-during-umount.patch fix-dcache-race-during-umount-fix.patch prune_one_dentry-tweaks.patch remove-softlockup-from-invalidate_mapping_pages.patch make-address_space_operations-invalidatepage-return-void-reiser4.patch md-dm-reduce-stack-usage-with-stacked-block-devices.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html