blkfront: fixes for 'xm block-detach ... --force'
commit0e34582699392d67910bd3919bc8fd9bedce115e
authorJan Beulich <jbeulich@novell.com>
Sat, 7 Aug 2010 16:28:55 +0000 (7 18:28 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 7 Aug 2010 16:28:55 +0000 (7 18:28 +0200)
tree8726f57eead44ecce90112e969e12a33e119acd9
parent203fd61f42fec81f43bc5abbf2d3755e04e000af
blkfront: fixes for 'xm block-detach ... --force'

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: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/xen-blkfront.c