]> git.ipfire.org Git - thirdparty/mdadm.git/commit - Kill.c
Change write_init_super to be called only once.
authorNeil Brown <neilb@suse.de>
Thu, 15 May 2008 06:48:12 +0000 (16:48 +1000)
committerNeil Brown <neilb@suse.de>
Thu, 15 May 2008 06:48:12 +0000 (16:48 +1000)
commit111d01fcc76d2e7d0b05f78fae67e89cdf6856ad
tree2faa362b6581db04a41f876a57c4b1c9ca6582a7
parent11fcec12ef68fa3b915e26676c47ee0f97d62256
Change write_init_super to be called only once.

The current model for creating arrays involves writing
a superblock to each device in the array.
With containers (as with DDF), that model doesn't work.
Every device in the container may need to be updated
for an array made from just some the devices in a container.

So instead of calling write_init_super for each device,
we call it once for the array and have it iterate over
all the devices in the array.

To help with this, ->add_to_super now passes in an 'fd' and name for
the device.  These get saved for use by write_init_super.  So
add_to_super takes ownership of the fd, and write_init_super will
close it.
This information is stored in the new 'info' field of supertype.

As part of this, write_init_super now removes any old traces of raid
metadata rather than doing this in common code.
Create.c
Kill.c
Manage.c
mdadm.c
mdadm.h
super0.c
super1.c