Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
/* Return true, if raid set in @rs is recovering */
static bool rs_is_recovering(struct raid_set *rs)
{
/* Return true, if raid set in @rs is recovering */
static bool rs_is_recovering(struct raid_set *rs)
{
- return rs->md.recovery_cp != MaxSector;
+ return rs->md.recovery_cp < rs->dev[0].rdev.sectors;
}
/* Return true, if raid set in @rs is reshaping */
}
/* Return true, if raid set in @rs is reshaping */
- /* Check for any reshape request and region size change unless new raid set */
+ /* Check for any reshape request unless new raid set */
if (test_and_clear_bit(RT_FLAG_RESHAPE_RS, &rs->runtime_flags)) {
/* Initiate a reshape. */
mddev_lock_nointr(mddev);
if (test_and_clear_bit(RT_FLAG_RESHAPE_RS, &rs->runtime_flags)) {
/* Initiate a reshape. */
mddev_lock_nointr(mddev);