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 Wed, Nov 03 2010 at 12:10pm -0400,
Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

> On Mon, Nov 01, 2010 at 05:15:28PM +0100, Tejun Heo wrote:
> > * blkdev_get() is extended to include exclusive access management.
> >   @holder argument is added and, if is @FMODE_EXCL specified, it will
> >   gain exclusive access atomically w.r.t. other exclusive accesses.
> > 
> > * blkdev_put() is similarly extended.  It now takes @mode argument and
> >   if @FMODE_EXCL is set, it releases an exclusive access.  Also, when
> >   the last exclusive claim is released, the holder/slave symlinks are
> >   removed automatically.
> 
> Could we get rid of FMODE_EXCL and just make a non-NULL holder field
> mean to open it exlusively (and pass a holder to the blkdev_put to
> release it)?

I agree that the need for a FMODE_EXCL flag is awkward.  Christoph's
proposed change should clean things up nicely.

Other than that, for the DM bits:

Acked-by: Mike Snitzer <snitzer@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux