diff options
author | Shaohua Li <shli@fb.com> | 2018-08-29 11:05:42 -0700 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2018-08-31 17:38:09 -0700 |
commit | e254de6bcf3f5b6e78a92ac95fb91acef8adfe1a (patch) | |
tree | 28d3936768e8425494ea69815bc62e6fa4608e1a /drivers/md/raid5-log.h | |
parent | 420f51f4ab6bce6e580390729fadb89c31123636 (diff) | |
download | linux-stable-e254de6bcf3f5b6e78a92ac95fb91acef8adfe1a.tar.gz linux-stable-e254de6bcf3f5b6e78a92ac95fb91acef8adfe1a.tar.bz2 linux-stable-e254de6bcf3f5b6e78a92ac95fb91acef8adfe1a.zip |
md/raid5-cache: disable reshape completely
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>
Diffstat (limited to 'drivers/md/raid5-log.h')
-rw-r--r-- | drivers/md/raid5-log.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/raid5-log.h b/drivers/md/raid5-log.h index a001808a2b77..bfb811407061 100644 --- a/drivers/md/raid5-log.h +++ b/drivers/md/raid5-log.h @@ -46,6 +46,11 @@ extern int ppl_modify_log(struct r5conf *conf, struct md_rdev *rdev, bool add); 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); |