Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-11-01 14:04:41 +1100
committerNeilBrown <neilb@suse.com>2018-11-01 14:06:27 +1100
commit1d45c863d099995e5bbc2a14ec89549f093f5de8 (patch)
tree823eb306084e4be088a05536e54ab7149768ba00
parentd55d9b29bf613e2687127b503037895768a51ef1 (diff)
md/raid5-cache: disable reshape completely (git-fixes).
-rw-r--r--patches.fixes/md-raid5-cache-disable-reshape-completely.patch66
-rw-r--r--series.conf1
2 files changed, 67 insertions, 0 deletions
diff --git a/patches.fixes/md-raid5-cache-disable-reshape-completely.patch b/patches.fixes/md-raid5-cache-disable-reshape-completely.patch
new file mode 100644
index 0000000000..6cb93b3f27
--- /dev/null
+++ b/patches.fixes/md-raid5-cache-disable-reshape-completely.patch
@@ -0,0 +1,66 @@
+From: Shaohua Li <shli@fb.com>
+Date: Wed, 29 Aug 2018 11:05:42 -0700
+Subject: [PATCH] md/raid5-cache: disable reshape completely
+Git-commit: e254de6bcf3f5b6e78a92ac95fb91acef8adfe1a
+Patch-mainline: v4.19
+References: git-fixes
+
+We don't support reshape yet if an array supports log device. Previously we
+determine the fact by checking ->log. However, ->log could be NULL after a log
+device is removed, but the array is still marked to support log device. Don't
+allow reshape in this case too. User can disable log device support by setting
+'consistency_policy' to 'resync' then do reshape.
+
+Reported-by: Xiao Ni <xni@redhat.com>
+Tested-by: Xiao Ni <xni@redhat.com>
+Signed-off-by: Shaohua Li <shli@fb.com>
+Acked-by: NeilBrown <neilb@suse.com>
+
+---
+ drivers/md/raid5-log.h | 5 +++++
+ drivers/md/raid5.c | 6 +++---
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+--- a/drivers/md/raid5-log.h
++++ b/drivers/md/raid5-log.h
+@@ -44,6 +44,11 @@ extern int ppl_modify_log(struct r5conf
+ extern void ppl_quiesce(struct r5conf *conf, int quiesce);
+ extern int ppl_handle_flush_request(struct r5l_log *log, struct bio *bio);
+
++static inline bool raid5_has_log(struct r5conf *conf)
++{
++ return test_bit(MD_HAS_JOURNAL, &conf->mddev->flags);
++}
++
+ static inline bool raid5_has_ppl(struct r5conf *conf)
+ {
+ return test_bit(MD_HAS_PPL, &conf->mddev->flags);
+--- a/drivers/md/raid5.c
++++ b/drivers/md/raid5.c
+@@ -736,7 +736,7 @@ static bool stripe_can_batch(struct stri
+ {
+ struct r5conf *conf = sh->raid_conf;
+
+- if (conf->log || raid5_has_ppl(conf))
++ if (raid5_has_log(conf) || raid5_has_ppl(conf))
+ return false;
+ return test_bit(STRIPE_BATCH_READY, &sh->state) &&
+ !test_bit(STRIPE_BITMAP_PENDING, &sh->state) &&
+@@ -7731,7 +7731,7 @@ static int raid5_resize(struct mddev *md
+ sector_t newsize;
+ struct r5conf *conf = mddev->private;
+
+- if (conf->log || raid5_has_ppl(conf))
++ if (raid5_has_log(conf) || raid5_has_ppl(conf))
+ return -EINVAL;
+ sectors &= ~((sector_t)conf->chunk_sectors - 1);
+ newsize = raid5_size(mddev, sectors, mddev->raid_disks);
+@@ -7782,7 +7782,7 @@ static int check_reshape(struct mddev *m
+ {
+ struct r5conf *conf = mddev->private;
+
+- if (conf->log || raid5_has_ppl(conf))
++ if (raid5_has_log(conf) || raid5_has_ppl(conf))
+ return -EINVAL;
+ if (mddev->delta_disks == 0 &&
+ mddev->new_layout == mddev->layout &&
diff --git a/series.conf b/series.conf
index 96417315cc..605290ea21 100644
--- a/series.conf
+++ b/series.conf
@@ -17955,6 +17955,7 @@
patches.drivers/ALSA-hda-Fix-cancel_work_sync-stall-from-jackpoll-wo.patch
patches.arch/acpi-bus-only-call-dmi_check_system-on-x86.patch
patches.fixes/ceph-avoid-a-use-after-free-in-ceph_destroy_options.patch
+ patches.fixes/md-raid5-cache-disable-reshape-completely.patch
patches.suse/0001-md-cluster-release-RESYNC-lock-after-the-last-resync.patch
patches.drivers/i2c-uniphier-issue-STOP-only-for-last-message-or-I2C.patch
patches.drivers/i2c-uniphier-f-issue-STOP-only-for-last-message-or-I.patch