• NeilBrown's avatar
    md: allow devices to be shared between md arrays · c5d79adb
    NeilBrown authored
    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: default avatarNeil Brown <neilb@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c5d79adb
md.c 151 KB