]> git.ipfire.org Git - thirdparty/mdadm.git/commit - Grow.c
FIX: Meet SET_ARRAY_INFO ioctl requirements
authorKrzysztof Wojcik <krzysztof.wojcik@intel.com>
Thu, 27 Jan 2011 16:46:58 +0000 (17:46 +0100)
committerNeilBrown <neilb@suse.de>
Fri, 28 Jan 2011 01:03:12 +0000 (11:03 +1000)
commit24aebf3addf0a839d0e13a17f2d3123cebb0a3e7
tree23bb1463fbbb5e3a0a8b449ad1ee3fcdaa52c1ce
parentd5ca4a23fc278d6cfd05610b3c7e3ca63c416f8a
FIX: Meet SET_ARRAY_INFO ioctl requirements

Problem has been observed when raid10<->raid0 takeover operation
is executed.
In code updating layout, raid_disks and chunk_size for non-restriping
operations in reshape array functions SET_ARRAY_INFO ioctl call was
not succeeded.
Takeover process finish execution with error, mdadm shows message:
"mdadm: failed to set disks"

Cause is not meeting SET_ARRAY_INFO ioctl requirements:
- only one parameter may be changed at one time
- level of current array info and new info should be the same

Patch introduces solution for this issue.
At the beginning of discussed code we read current information
about array and then compare them with new values should be set.
If particular value is different (and should be set),
we are overwrite only this one in array info and then call ioctl.

Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c