diff options
author | Shaohua Li <shli@fb.com> | 2016-12-09 00:48:19 +0100 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-12-09 07:01:47 +0100 |
commit | 2953079c692da067aeb6345659875b97378f9b0a (patch) | |
tree | 06bec98f71114629966da122360fd38a6f8ec422 /drivers/md/raid5-cache.c | |
parent | md: MD_RECOVERY_NEEDED is set for mddev->recovery (diff) | |
download | linux-2953079c692da067aeb6345659875b97378f9b0a.tar.xz linux-2953079c692da067aeb6345659875b97378f9b0a.zip |
md: separate flags for superblock changes
The mddev->flags are used for different purposes. There are a lot of
places we check/change the flags without masking unrelated flags, we
could check/change unrelated flags. These usage are most for superblock
write, so spearate superblock related flags. This should make the code
clearer and also fix real bugs.
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid5-cache.c')
-rw-r--r-- | drivers/md/raid5-cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index de8a4ede0bc9..6d1a150eacd6 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -1206,8 +1206,8 @@ static void r5l_write_super_and_discard_space(struct r5l_log *log, * there is a deadlock. We workaround this issue with a trylock. * FIXME: we could miss discard if we can't take reconfig mutex */ - set_mask_bits(&mddev->flags, 0, - BIT(MD_CHANGE_DEVS) | BIT(MD_CHANGE_PENDING)); + set_mask_bits(&mddev->sb_flags, 0, + BIT(MD_SB_CHANGE_DEVS) | BIT(MD_SB_CHANGE_PENDING)); if (!mddev_trylock(mddev)) return; md_update_sb(mddev, 1); @@ -2197,7 +2197,7 @@ static void r5l_write_super(struct r5l_log *log, sector_t cp) struct mddev *mddev = log->rdev->mddev; log->rdev->journal_tail = cp; - set_bit(MD_CHANGE_DEVS, &mddev->flags); + set_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags); } static ssize_t r5c_journal_mode_show(struct mddev *mddev, char *page) |