Commit db07d85e authored by NeilBrown's avatar NeilBrown

md: make sure manual changes to recovery checkpoint are saved.

If you make an array bigger but suppress resync of the new region with
  mdadm --grow /dev/mdX --size=max --assume-clean

then stop the array before anything is written to it, the effect of
the "--assume-clean" is lost and the array will resync the new space
when restarted.
So ensure that we update the metadata in the case.
Reported-by: default avatarSebastian Riemer <sebastian.riemer@profitbricks.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 91502f09
...@@ -3782,6 +3782,8 @@ resync_start_store(struct mddev *mddev, const char *buf, size_t len) ...@@ -3782,6 +3782,8 @@ resync_start_store(struct mddev *mddev, const char *buf, size_t len)
return -EINVAL; return -EINVAL;
mddev->recovery_cp = n; mddev->recovery_cp = n;
if (mddev->pers)
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
return len; return len;
} }
static struct md_sysfs_entry md_resync_start = static struct md_sysfs_entry md_resync_start =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment