Skip to contentSkip to conversation

dm raid: fix rs_is_recovering() to allow for lvextend

PATCH In review [email protected] 1 participant 1 message Jul 6, 2016 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 20/26 dm raid: fix rs_is_recovering() to allow for lvextend

From: Heinz Mauelshagen <[email protected]>

---
 drivers/md/dm-raid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/dm-raid.c +2 -2
index 14b3d93..1ff469f 100644
@@ -372,7 +372,7 @@ static bool rs_is_reshapable(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 */
@@ -3532,7 +3532,7 @@ static int raid_preresume(struct dm_target *ti)
 
 	rs_set_capacity(rs);
 
-	/* 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);
Signature · 1 line
2.5.5