From: NeilBrown Date: Mon, 27 Mar 2006 09:18:13 +0000 (-0800) Subject: [PATCH] md: Make 'reshape' a possible sync_action action X-Git-Tag: v2.6.17-rc1~285 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16484bf59634e25d1299761e5ed8bacf22bc6368;p=linux-2.6 [PATCH] md: Make 'reshape' a possible sync_action action This allows reshape to be triggerred via sysfs (which is the only way to start it happening). Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 1a637676a9..a79dd33d34 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2247,7 +2247,14 @@ action_store(mddev_t *mddev, const char *page, size_t len) return -EBUSY; else if (cmd_match(page, "resync") || cmd_match(page, "recover")) set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); - else { + else if (cmd_match(page, "reshape")) { + int err; + if (mddev->pers->start_reshape == NULL) + return -EINVAL; + err = mddev->pers->start_reshape(mddev); + if (err) + return err; + } else { if (cmd_match(page, "check")) set_bit(MD_RECOVERY_CHECK, &mddev->recovery); else if (cmd_match(page, "repair"))