[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [dm-devel] [PATCH 4/5] block: make blkdev_get/put() handle exclusive access
- From: Christoph Hellwig <hch infradead org>
- To: Tejun Heo <tj kernel org>
- Cc: jack suse cz, leochen broadcom com, heiko carstens de ibm com, dm-devel redhat com, adilger kernel dilger ca, konishi ryusuke lab ntt co jp, shaggy linux vnet ibm com, drbd-dev lists linbit com, joel becker oracle com, hch infradead org, aelder sgi com, mfasheh suse com, joern logfs org, reiserfs-devel vger kernel org, viro zeniv linux org uk, swhiteho redhat com, chris mason oracle com, axboe kernel dk, tytso mit edu, sbranden broadcom com, petero2 telia com, linux-kernel vger kernel org, schwidefsky de ibm com, akpm linux-foundation org
- Subject: Re: [dm-devel] [PATCH 4/5] block: make blkdev_get/put() handle exclusive access
- Date: Wed, 3 Nov 2010 12:10:59 -0400
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)?
> * bd_link_disk_holder() remains the same but bd_unlink_disk_holder()
> is no longer necessary and removed.
That's a rather asymetric interface. What about having
blkdev_get_stacked that require a gendisk as holder and set up the
links underneath?
> open_bdev_exclusive() and open_by_devnum() can use further cleanup -
> rename to blkdev_get_by_path() and blkdev_get_by_devt() and drop
> special features. Well, let's leave them for another day.
s/blkdev_get_by_devt/blkdev_get_by_dev/
And yes, that rename is a good idea and should go in ASAP after this
patch.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]