diff options
author | Krzysztof Wojcik <krzysztof.wojcik@intel.com> | 2011-02-14 02:01:41 +0300 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-02-14 02:01:41 +0300 |
commit | f7bee80945155ad0326916486dabc38428c6cdef (patch) | |
tree | adf054c298371d181aa2b3885425bcb766f3deb6 /drivers/md/raid0.c | |
parent | 02214dc5461c36da26a34014cab4e1bb484edba2 (diff) | |
download | linux-f7bee80945155ad0326916486dabc38428c6cdef.tar.xz |
md: Fix raid1->raid0 takeover
Takeover raid1->raid0 not succeded. Kernel message is shown:
"md/raid0:md126: too few disks (1 of 2) - aborting!"
Problem was that we weren't updating ->raid_disks for that
takeover, unlike all the others.
Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 637a96855edb..75671dfee551 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -670,6 +670,7 @@ static void *raid0_takeover_raid1(mddev_t *mddev) mddev->new_layout = 0; mddev->new_chunk_sectors = 128; /* by default set chunk size to 64k */ mddev->delta_disks = 1 - mddev->raid_disks; + mddev->raid_disks = 1; /* make sure it will be not marked as dirty */ mddev->recovery_cp = MaxSector; |