diff options
author | NeilBrown <neilb@suse.de> | 2006-03-27 04:18:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:45:01 -0500 |
commit | f67055780caac6a99f43834795c43acf99eba6a6 (patch) | |
tree | 6b80e7b4cb300edb0910dbad1d840ff8e2f36ae5 /drivers/md/raid1.c | |
parent | 292695531ae4019bb15deedc121b218d1908b648 (diff) |
[PATCH] md: Checkpoint and allow restart of raid5 reshape
We allow the superblock to record an 'old' and a 'new' geometry, and a
position where any conversion is up to. The geometry allows for changing
chunksize, layout and level as well as number of devices.
When using verion-0.90 superblock, we convert the version to 0.91 while the
conversion is happening so that an old kernel will refuse the assemble the
array. For version-1, we use a feature bit for the same effect.
When starting an array we check for an incomplete reshape and restart the
reshape process if needed. If the reshape stopped at an awkward time (like
when updating the first stripe) we refuse to assemble the array, and let
user-space worry about it.
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/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 5d88329e3c7a..b65b8cfbdf30 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1789,6 +1789,11 @@ static int run(mddev_t *mddev) | |||
1789 | mdname(mddev), mddev->level); | 1789 | mdname(mddev), mddev->level); |
1790 | goto out; | 1790 | goto out; |
1791 | } | 1791 | } |
1792 | if (mddev->reshape_position != MaxSector) { | ||
1793 | printk("raid1: %s: reshape_position set but not supported\n", | ||
1794 | mdname(mddev)); | ||
1795 | goto out; | ||
1796 | } | ||
1792 | /* | 1797 | /* |
1793 | * copy the already verified devices into our private RAID1 | 1798 | * copy the already verified devices into our private RAID1 |
1794 | * bookkeeping area. [whatever we allocate in run(), | 1799 | * bookkeeping area. [whatever we allocate in run(), |