]> git.ipfire.org Git - thirdparty/mdadm.git/commit - mdadm.h
Create: cleanup after failed create in duplicated array member case
authorDan Williams <dan.j.williams@intel.com>
Mon, 19 Apr 2010 05:28:07 +0000 (15:28 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 19 Apr 2010 05:28:07 +0000 (15:28 +1000)
commit4eb269706f403d2424166683688f0a41d893c1c3
treeeff7209c10aa9810ba7cbe4eca325357388aab5c
parentc824e918980e46aa8dba5d806304877444837054
Create: cleanup after failed create in duplicated array member case

mdadm prevents creation when device names are duplicated on the command
line, but leaves the partially created array intact.  Detect this case
in the error code from add_to_super() and cleanup the partially created
array.  The imsm handler is updated to report this conflict in
add_to_super_imsm_volume().

Note that since neither mdmon, nor userspace for that matter, ever saw an
active array we only need to perform a subset of the cleanup actions.
So call ioctl(STOP_ARRAY) directly and arrange for Create() to cleanup
the map file rather than calling Manage_runstop().

Reported-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Create.c
Manage.c
mapfile.c
mdadm.h
super-intel.c