]> git.baikalelectronics.ru Git - kernel.git/commit
md: allow devices to be shared between md arrays
authorNeilBrown <neilb@suse.de>
Wed, 6 Feb 2008 09:39:54 +0000 (01:39 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 6 Feb 2008 18:41:18 +0000 (10:41 -0800)
commit7f3702a0049dbf095a36afbf4ad72ab1a4cb530f
treeab5a45046244602f2a27be0b34fb26155a3c8dee
parent4435580470b7786b87e8b9c8f06c28d6dfc7f695
md: allow devices to be shared between md arrays

Currently, a given device is "claimed" by a particular array so that it cannot
be used by other arrays.

This is not ideal for DDF and other metadata schemes which have their own
partitioning concept.

So for externally managed metadata, just claim the device for md in general,
require that "offset" and "size" are set properly for each device, and make
sure that if a device is included in different arrays then the active sections
do not overlap.

This involves adding another flag to the rdev which makes it awkward to set
"->flags = 0" to clear certain flags.  So now clear flags explicitly by name
when we want to clear things.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/md.c
include/linux/raid/md_k.h