[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101104150400.GA32504@redhat.com>
Date: Thu, 4 Nov 2010 11:04:00 -0400
From: Mike Snitzer <snitzer@...hat.com>
To: device-mapper development <dm-devel@...hat.com>
Cc: Tejun Heo <tj@...nel.org>, jack@...e.cz, leochen@...adcom.com,
heiko.carstens@...ibm.com, adilger.kernel@...ger.ca,
konishi.ryusuke@....ntt.co.jp, shaggy@...ux.vnet.ibm.com,
drbd-dev@...ts.linbit.com, joel.becker@...cle.com,
hch@...radead.org, aelder@....com, mfasheh@...e.com,
joern@...fs.org, reiserfs-devel@...r.kernel.org,
viro@...iv.linux.org.uk, swhiteho@...hat.com,
chris.mason@...cle.com, axboe@...nel.dk, tytso@....edu,
sbranden@...adcom.com, petero2@...ia.com,
linux-kernel@...r.kernel.org, schwidefsky@...ibm.com,
akpm@...ux-foundation.org
Subject: Re: [PATCH 4/5] block: make blkdev_get/put() handle exclusive access
On Wed, Nov 03 2010 at 12:10pm -0400,
Christoph Hellwig <hch@...radead.org> 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@...hat.com>
--
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