• NeilBrown's avatar
    md: Remove the AllReserved flag for component devices. · f21e9ff7
    NeilBrown authored
    This flag is not needed and is used badly.
    
    Devices that are included in a native-metadata array are reserved
    exclusively for that array - and currently have AllReserved set.
    They all are bd_claimed for the rdev and so cannot be shared.
    
    Devices that are included in external-metadata arrays can be shared
    among multiple arrays - providing there is no overlap.
    These are bd_claimed for md in general - not for a particular rdev.
    
    When changing the amount of a device that is used in an array we need
    to check for overlap.  This currently includes a check on AllReserved
    So even without overlap, sharing with an AllReserved device is not
    allowed.
    However the bd_claim usage already precludes sharing with these
    devices, so the test on AllReserved is not needed.  And in fact it is
    wrong.
    
    As this is the only use of AllReserved, simply remove all usage and
    definition of AllReserved.
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    f21e9ff7
md.c 191 KB