aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-03-27 01:18:13 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 08:45:02 -0800
commit16484bf59634e25d1299761e5ed8bacf22bc6368 (patch)
treef11f049f5b60d766c402937bbb72c288a454ba4a /drivers/md/md.c
parent63c70c4f3a30e77e6f445bd16eff7934a031ebd3 (diff)
downloadkernel_samsung_crespo-16484bf59634e25d1299761e5ed8bacf22bc6368.zip
kernel_samsung_crespo-16484bf59634e25d1299761e5ed8bacf22bc6368.tar.gz
kernel_samsung_crespo-16484bf59634e25d1299761e5ed8bacf22bc6368.tar.bz2
[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 <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 1a63767..a79dd33 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"))