From 3d1455dd72186d7cc56f390741c162bebca37bbc Mon Sep 17 00:00:00 2001 From: kalpak Date: Mon, 2 Feb 2009 09:05:05 +0000 Subject: [PATCH] b=17895 i=adilger i=alex add files for last commit --- .../patches/md-mmp-unplug-dev-sles10.patch | 22 ++++++++++++++++++++++ .../kernel_patches/patches/md-mmp-unplug-dev.patch | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 lustre/kernel_patches/patches/md-mmp-unplug-dev-sles10.patch create mode 100644 lustre/kernel_patches/patches/md-mmp-unplug-dev.patch diff --git a/lustre/kernel_patches/patches/md-mmp-unplug-dev-sles10.patch b/lustre/kernel_patches/patches/md-mmp-unplug-dev-sles10.patch new file mode 100644 index 0000000..8bfdef3 --- /dev/null +++ b/lustre/kernel_patches/patches/md-mmp-unplug-dev-sles10.patch @@ -0,0 +1,22 @@ +Index: linux-2.6.16.60-0.33/drivers/md/raid5.c +=================================================================== +--- linux-2.6.16.60-0.33.orig/drivers/md/raid5.c ++++ linux-2.6.16.60-0.33/drivers/md/raid5.c +@@ -900,6 +900,8 @@ static int add_stripe_bio(struct stripe_ + 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); + +@@ -1617,6 +1619,8 @@ static int make_request (request_queue_t + bi->bi_end_io(bi, bytes, 0); + } + spin_unlock_irq(&conf->device_lock); ++ if (bio_sync(bi)) ++ raid5_unplug_device(q); + return 0; + } + diff --git a/lustre/kernel_patches/patches/md-mmp-unplug-dev.patch b/lustre/kernel_patches/patches/md-mmp-unplug-dev.patch new file mode 100644 index 0000000..0334abd --- /dev/null +++ b/lustre/kernel_patches/patches/md-mmp-unplug-dev.patch @@ -0,0 +1,22 @@ +Index: linux-2.6.22.14/drivers/md/raid5.c +=================================================================== +--- linux-2.6.22.14.orig/drivers/md/raid5.c ++++ linux-2.6.22.14/drivers/md/raid5.c +@@ -1268,6 +1268,8 @@ static int add_stripe_bio(struct stripe_ + 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); + +@@ -2972,6 +2974,8 @@ static int make_request(request_queue_t + test_bit(BIO_UPTODATE, &bi->bi_flags) + ? 0 : -EIO); + } ++ if (bio_sync(bi)) ++ raid5_unplug_device(q); + return 0; + } + -- 1.8.3.1