• Jan Beulich's avatar
    blkfront: fixes for 'xm block-detach ... --force' · 0e345826
    Jan Beulich authored
    Prevent prematurely freeing 'struct blkfront_info' instances (when the
    xenbus data structures are gone, but the Linux ones are still needed).
    
    Prevent adding a disk with the same (major, minor) [and hence the same
    name and sysfs entries, which leads to oopses] when the previous
    instance wasn't fully de-allocated yet.
    
    This still doesn't address all issues resulting from forced detach:
    I/O submitted after the detach still blocks forever, likely preventing
    subsequent un-mounting from completing. It's not clear to me (not
    knowing much about the block layer) how this can be avoided.
    Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
    Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
    Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
    0e345826
xen-blkfront.c 28.5 KB