]> www.pilppa.org Git - linux-2.6-omap-h63xx.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)
commitc5d79adba7ced41d7ac097c2ab74759d10522dd5
treeab5a45046244602f2a27be0b34fb26155a3c8dee
parent1ec4a9398dc05061b6258061676fede733458893
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