bdev exclusive access handling is somewhat clumsy. The primary
interface is bd_claim() and bd_release() but there also are
open_bdev_exclusive(), close_bdev_exclusive() and bd_claim_by_disk()
Gaining exclusive access as a separate step from open itself also has
the inherent problem that the block layer doesn't know whether the
current open attempt is for an exclusive access or not. The action of
open itself may affect the existing exclusive access but there's no
way to prevent it.
This patchset simplifies the claim/release handling by folding it into
blkdev_get/put() and making others simple wrappers around them. This
simplifies code and removes strange corner cases like the
non-atomicity of exclusive open described above.
0001-0002 are fixes regarding exclusive bdev opens. 0003 simplifies
holder/slave symlink handling. 0004 folds bdev claim/release into
blkdev_get/put(). 0005 reorganizes implementation a bit.
Cleaning up claim/release handling enables implementation of in-kernel
disk event polling which be posted soon. Although this patchset
touches various files including drivers and filesystems, the changes
there are mostly trivial and I think it would be best to route these
through the block tree.
This patchset is on top of 2.6.37-rc1 and available in the following