[PATCH] md: raid5: update suspend_hi during the reshape

[PATCH] md: raid5: update suspend_hi during the reshape

am 09.11.2010 18:02:23 von adam.kwolek

This patch is required by checkpointing for external metadata functionality.

When performing external reshape it is needed to move suspend_hi forward to keep up with the current reshape_position.

Signed-off-by: Maciej Trela
---

drivers/md/raid5.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 53d7579..353c7c6 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4353,6 +4353,14 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
wake_up(&conf->wait_for_overlap);
sysfs_notify(&mddev->kobj, NULL, "sync_completed");
}
+ if (mddev->external && mddev->reshape_position > mddev->suspend_hi) {
+ if (mddev->reshape_position == MaxSector)
+ mddev->suspend_hi = 0;
+ else
+ mddev->suspend_hi = mddev->reshape_position;
+ mddev->pers->quiesce(mddev, 1);
+ mddev->pers->quiesce(mddev, 0);
+ }
return reshape_sectors;
}

@@ -5691,6 +5699,12 @@ static void raid5_finish_reshape(mddev_t *mddev)
mddev->chunk_sectors = conf->chunk_sectors;
mddev->reshape_position = MaxSector;
mddev->delta_disks = 0;
+
+ if (mddev->external) {
+ mddev->suspend_hi = 0;
+ mddev->pers->quiesce(mddev, 1);
+ mddev->pers->quiesce(mddev, 0);
+ }
}
}


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html