Re: [PATCH 4/5] block: make blkdev_get/put() handle exclusive access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Mon 01-11-10 17:15:28, Tejun Heo wrote:
> Over time, block layer has accumulated a set of APIs dealing with bdev
> open, close, claim and release.
> * blkdev_get/put() are the primary open and close functions.
> * bd_claim/release() deal with exclusive open.
> * open/close_bdev_exclusive() are combination of open and claim and
>   the other way around, respectively.
> * bd_link/unlink_disk_holder() to create and remove holder/slave
>   symlinks.
> * open_by_devnum() wraps bdget() + blkdev_get().
> The interface is a bit confusing and the decoupling of open and claim
> makes it impossible to properly guarantee exclusive access as
> in-kernel open + claim sequence can disturb the existing exclusive
> open even before the block layer knows the current open if for another
> exclusive access.  Reorganize the interface such that,
  The patch looks OK to me as far as ext3, ext4, and reiserfs are
concerned. One thing I wondered about when I looked at it - does someone
use the 'mode' argument of the blkdev_put() function (well, apart from the
exclusive flag)? Because I've looked at a few random disk ->release()
functions and none of them used it...

Jan Kara <jack@xxxxxxx>
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux