[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210316152314.GA55391@infradead.org>
Date: Tue, 16 Mar 2021 15:23:14 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Sergei Shtepa <sergei.shtepa@...am.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Mike Snitzer <snitzer@...hat.com>,
Alasdair Kergon <agk@...hat.com>,
Hannes Reinecke <hare@...e.de>, Jens Axboe <axboe@...nel.dk>,
"dm-devel@...hat.com" <dm-devel@...hat.com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
Pavel Tide <Pavel.TIde@...am.com>
Subject: Re: [PATCH v7 3/3] dm: add DM_INTERPOSED_FLAG
On Mon, Mar 15, 2021 at 04:25:09PM +0300, Sergei Shtepa wrote:
> The 03/14/2021 12:30, Christoph Hellwig wrote:
> > On Fri, Mar 12, 2021 at 06:44:55PM +0300, Sergei Shtepa wrote:
> > > DM_INTERPOSED_FLAG allow to create DM targets on "the fly".
> > > Underlying block device opens without a flag FMODE_EXCL.
> > > DM target receives bio from the original device via
> > > bdev_interposer.
> >
> > This is more of a philopical comment, but the idea of just letting the
> > interposed reopen the device by itself seems like a bad idea. I think
> > that is probably better hidden in the block layer interposer attachment
> > function, which could do the extra blkdev_get_by_dev for the caller.
>
> I suppose this cannot be implemented, since we need to change the behavior
> for block devices that already have been opened.
That's not what I mean. Take a look at the patch relative to your
series to let me know what you think. The new blkdev_interposer_attach
now takes a dev_t + mode for the original device and opens it on
behalf of the interposer. It also moves the queue freezing into the
API, which should address the concerns about the helper and adds a few
more sanity checks.
Powered by blists - more mailing lists