Whamcloud - gitweb
LU-9956 kernel: kernel upgrade [SLES12 SP3 4.4.82-6.3]
[fs/lustre-release.git] / lustre / kernel_patches / patches / raid5-mmp-unplug-dev-sles12sp3.patch
diff --git a/lustre/kernel_patches/patches/raid5-mmp-unplug-dev-sles12sp3.patch b/lustre/kernel_patches/patches/raid5-mmp-unplug-dev-sles12sp3.patch
new file mode 100644 (file)
index 0000000..43ba7d6
--- /dev/null
@@ -0,0 +1,23 @@
+Index: linux-4.4.59-1/drivers/md/raid5.c
+===================================================================
+--- linux-4.4.59-1.orig/drivers/md/raid5.c
++++ linux-4.4.59-1/drivers/md/raid5.c
+@@ -3041,6 +3041,8 @@ static int add_stripe_bio(struct stripe_
+               bi->bi_next = *bip;
+       *bip = bi;
+       raid5_inc_bi_active_stripes(bi);
++      if ((bi->bi_opf & REQ_SYNC) && !forwrite)
++              clear_bit(R5_UPTODATE, &sh->dev[dd_idx].flags); /* force to read from disk. */
+       if (forwrite) {
+               /* check if page is covered */
+@@ -5192,6 +5194,9 @@ static void make_discard_request(struct
+               md_write_end(mddev);
+               bio_endio(bi);
+       }
++
++      if (bi->bi_opf & REQ_SYNC)
++              md_wakeup_thread(mddev->thread);
+ }
+ static void raid5_make_request(struct mddev *mddev, struct bio * bi)