• Neil Brown's avatar
    [PATCH] md: Keep track of number of pending requests on each component device on an MD array · 3e98f2fb
    Neil Brown authored
    This will allow us to know, in the event of a device failure, when the
    device is completely unused and so can be disconnected from the
    array.  Currently this isn't a problem as drives aren't normally disconnect
    until after a repacement has been rebuilt, which is a LONG TIME, but that
    will change shortly...
    
    We always increment the count under a spinlock after checking that
    it hasn't been disconnected already (rdev!= NULL).
    We disconnect under the same spinlock after checking that the
    count is zero.
    3e98f2fb
multipath.c 14 KB