diff options
author | Adam Kwolek <adam.kwolek@intel.com> | 2011-06-09 13:00:56 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-06-09 13:00:56 +1000 |
commit | 8016a6d42ecef8bff5b6f9d0020ae549e4324188 (patch) | |
tree | ef8ecfb1d18c7046c588ba67f9f176a8498d50a7 | |
parent | a47e44fb966d8f212b589012686bba0d7b7fb0d9 (diff) | |
download | mdadm-8016a6d42ecef8bff5b6f9d0020ae549e4324188.tar.gz |
imsm: Optimize expansion speed when no backup is required
When no reshape backup is required (e.g. OLCE after critical section),
check-pointing can use bigger steps than backup space allows for.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | super-intel.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/super-intel.c b/super-intel.c index 292584b..5c840ec 100644 --- a/super-intel.c +++ b/super-intel.c @@ -8854,11 +8854,19 @@ static int imsm_manage_reshape( "migration record (UNIT_SRC_IN_CP_AREA)\n"); goto abort; } + } else { + /* set next step to use whole border area */ + border /= next_step; + if (border > 1) + next_step *= border; } /* When data backed up, checkpoint stored, * kick the kernel to reshape unit of data */ next_step = next_step + sra->reshape_progress; + /* limit next step to array max position */ + if (next_step > max_position) + next_step = max_position; sysfs_set_num(sra, NULL, "suspend_lo", sra->reshape_progress); sysfs_set_num(sra, NULL, "suspend_hi", next_step); sra->reshape_progress = next_step; |