diff options
author | Adam Kwolek <adam.kwolek@intel.com> | 2011-03-14 18:17:52 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-14 18:17:52 +1100 |
commit | 0d51bfa20e231ebcbb15c2a278c837c8e3b6c2b1 (patch) | |
tree | 14abfbff91deaf92d3bdd0aa6045b738c7616b9a /managemon.c | |
parent | 138477db4b7e810d35fd1a8fd2d1c2f05ee55da5 (diff) | |
download | mdadm-0d51bfa20e231ebcbb15c2a278c837c8e3b6c2b1.tar.gz |
FIX: Last_checkpoint has to be initialized in per disk units
last_checkpoint is variable that tracks sync_complete sysfs entry.
sync_complete is per disk counter, so initializing during starting from checkpoint
has to have this in mind and convert reshape position properly.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'managemon.c')
-rw-r--r-- | managemon.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/managemon.c b/managemon.c index 1362a0e..19e5f41 100644 --- a/managemon.c +++ b/managemon.c @@ -667,6 +667,15 @@ static void manage_new(struct mdstat_ent *mdstat, if (sysfs_get_ll(mdi, NULL, "reshape_position", &new->last_checkpoint) != 0) new->last_checkpoint = 0; + else { + int data_disks = mdi->array.raid_disks; + if (mdi->array.level == 4 || mdi->array.level == 5) + data_disks--; + if (mdi->array.level == 6) + data_disks -= 2; + + new->last_checkpoint /= data_disks; + } dprintf("mdmon: New monitored array is under reshape.\n" " Last checkpoint is: %llu\n", new->last_checkpoint); |