diff options
author | NeilBrown <neilb@suse.de> | 2011-01-26 08:47:06 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-01-26 08:50:28 +1000 |
commit | f897078e8b250d1534a31e111e3168e82bfe532b (patch) | |
tree | 6eda05f2d5c69c07b57cb7a12e213c2f8e7e2006 /sysfs.c | |
parent | 1cc7f4feb9a979fdf7ac4bb06e5632b065d4f4d9 (diff) |
Fix some issues with setting 'new' state of a reshape
- when reshaping a container, ->reshape_active is already set
even though it isn't really active yet, so we need to set
the new geometry even when reshape_active is set. This is safe.
- When restarting a reshape, make sure the reshape_position is set
appropriately when external metadata is used.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -569,6 +569,15 @@ int sysfs_set_array(struct mdinfo *info, int vers) if (info->array.level > 0) rv |= sysfs_set_num(info, NULL, "resync_start", info->resync_start); + + if (info->reshape_active) { + rv |= sysfs_set_num(info, NULL, "reshape_position", + info->reshape_progress); + rv |= sysfs_set_num(info, NULL, "chunk_size", info->new_chunk); + /* Don't set layout or raid_disks here as they require some + * analysis and are set by reshape_array + */ + } return rv; } |