lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101103161059.GA13621@infradead.org>
Date:	Wed, 3 Nov 2010 12:10:59 -0400
From:	Christoph Hellwig <hch@...radead.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	axboe@...nel.dk, hch@...radead.org, linux-kernel@...r.kernel.org,
	petero2@...ia.com, schwidefsky@...ibm.com,
	heiko.carstens@...ibm.com, jack@...e.cz, akpm@...ux-foundation.org,
	adilger.kernel@...ger.ca, tytso@....edu, mfasheh@...e.com,
	joel.becker@...cle.com, aelder@....com, dm-devel@...hat.com,
	drbd-dev@...ts.linbit.com, neilb@...e.de, leochen@...adcom.com,
	sbranden@...adcom.com, chris.mason@...cle.com, swhiteho@...hat.com,
	shaggy@...ux.vnet.ibm.com, joern@...fs.org,
	konishi.ryusuke@....ntt.co.jp, reiserfs-devel@...r.kernel.org,
	viro@...iv.linux.org.uk
Subject: Re: [PATCH 4/5] block: make blkdev_get/put() handle exclusive access

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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ