diff options
author | Krzysztof Wojcik <krzysztof.wojcik@intel.com> | 2011-02-14 00:01:41 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-02-14 00:01:41 +0100 |
commit | f7bee80945155ad0326916486dabc38428c6cdef (patch) | |
tree | adf054c298371d181aa2b3885425bcb766f3deb6 /drivers/md/raid0.c | |
parent | FIX: md: process hangs at wait_barrier after 0->10 takeover (diff) | |
download | linux-f7bee80945155ad0326916486dabc38428c6cdef.tar.xz linux-f7bee80945155ad0326916486dabc38428c6cdef.zip |
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; |