Commit fee68723 authored by Krzysztof Wojcik's avatar Krzysztof Wojcik Committed by NeilBrown

md: Cleanup after raid45->raid0 takeover

Problem:
After raid4->raid0 takeover operation, another takeover operation
(e.g raid0->raid10) results "kernel oops".
Root cause:
Variables 'degraded' in mddev structure is not cleared
on raid45->raid0 takeover.

This patch reset this variable.
Signed-off-by: default avatarKrzysztof Wojcik <krzysztof.wojcik@intel.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 3b71bd93
......@@ -3170,6 +3170,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len)
mddev->layout = mddev->new_layout;
mddev->chunk_sectors = mddev->new_chunk_sectors;
mddev->delta_disks = 0;
mddev->degraded = 0;
if (mddev->pers->sync_request == NULL) {
/* this is now an array without redundancy, so
* it must always be in_sync
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment