Skip to content

Commit

Permalink
md: make sure manual changes to recovery checkpoint are saved.
Browse files Browse the repository at this point in the history
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: Sebastian Riemer <sebastian.riemer@profitbricks.com>
Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed Oct 11, 2012
1 parent 91502f0 commit db07d85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -3782,6 +3782,8 @@ resync_start_store(struct mddev *mddev, const char *buf, size_t len)
return -EINVAL;

mddev->recovery_cp = n;
if (mddev->pers)
set_bit(MD_CHANGE_CLEAN, &mddev->flags);
return len;
}
static struct md_sysfs_entry md_resync_start =
Expand Down

0 comments on commit db07d85

Please sign in to comment.