From: kalpak Date: Mon, 2 Feb 2009 08:50:37 +0000 (+0000) Subject: b=17895 X-Git-Tag: v1_9_160~55 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f704f6fe9c0b48d99965b2cce4a9fd533be50c1b;p=fs%2Flustre-release.git b=17895 i=adilger i=alex While using HA for Lustre servers with Linux RAID, it is possible that MMP will not detect multiple mounts. To make this work we need to unplug the device queue in RAID when the MMP block is being written. Also while reading the MMP block, we should read it from disk and not the cached one. --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 5db2ee0..2d6cf88 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -1931,6 +1931,16 @@ Details : enable OBD_CONNECT_MDT flag when connecting from the MDS so that from a different NID, so we do not need to wait for the export to be evicted +Severity : major +Frequency : rare, only if using MMP with Linux RAID +Bugzilla : 17895 +Description: MMP doesn't work with Linux RAID +Details : While using HA for Lustre servers with Linux RAID, it is possible + that MMP will not detect multiple mounts. To make this work we + need to unplug the device queue in RAID when the MMP block is being + written. Also while reading the MMP block, we should read it from + disk and not the cached one. + -------------------------------------------------------------------------------- 2007-08-10 Cluster File Systems, Inc. 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; + } + diff --git a/lustre/kernel_patches/series/2.6-rhel5.series b/lustre/kernel_patches/series/2.6-rhel5.series index 0fc2b97..97060fd 100644 --- a/lustre/kernel_patches/series/2.6-rhel5.series +++ b/lustre/kernel_patches/series/2.6-rhel5.series @@ -21,3 +21,4 @@ md-rebuild-policy.patch md-soft-lockups.patch jbd-journal-chksum-2.6.18-vanilla.patch quota-large-limits-rhel5.patch +md-mmp-unplug-dev.patch diff --git a/lustre/kernel_patches/series/2.6-sles10.series b/lustre/kernel_patches/series/2.6-sles10.series index 070f943..dc85e99 100644 --- a/lustre/kernel_patches/series/2.6-sles10.series +++ b/lustre/kernel_patches/series/2.6-sles10.series @@ -16,3 +16,4 @@ proc-sleep-2.6.16-sles10.patch export-nr_free_buffer_pages.patch fmode-exec-2.6-sles10.patch quota-large-limits-sles10.patch +md-mmp-unplug-dev-sles10.patch diff --git a/lustre/kernel_patches/series/2.6.22-vanilla.series b/lustre/kernel_patches/series/2.6.22-vanilla.series index fe32803..6fad0bd 100644 --- a/lustre/kernel_patches/series/2.6.22-vanilla.series +++ b/lustre/kernel_patches/series/2.6.22-vanilla.series @@ -12,3 +12,4 @@ export-2.6.18-vanilla.patch export-show_task-2.6.18-vanilla.patch sd_iostats-2.6.22-vanilla.patch quota-large-limits-rhel5.patch +md-mmp-unplug-dev.patch