[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230705161225.cwig5a3mo6oz7lew@quack3>
Date: Wed, 5 Jul 2023 18:12:25 +0200
From: Jan Kara <jack@...e.cz>
To: Bart Van Assche <bvanassche@....org>
Cc: Jan Kara <jack@...e.cz>, linux-block@...r.kernel.org,
linux-fsdevel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
Christoph Hellwig <hch@...radead.org>,
Alasdair Kergon <agk@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Anna Schumaker <anna@...nel.org>, Chao Yu <chao@...nel.org>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
"Darrick J. Wong" <djwong@...nel.org>,
Dave Kleikamp <shaggy@...nel.org>,
David Sterba <dsterba@...e.com>, dm-devel@...hat.com,
drbd-dev@...ts.linbit.com, Gao Xiang <xiang@...nel.org>,
Jack Wang <jinpu.wang@...os.com>,
Jaegeuk Kim <jaegeuk@...nel.org>,
jfs-discussion@...ts.sourceforge.net,
Joern Engel <joern@...ybastard.org>,
Joseph Qi <joseph.qi@...ux.alibaba.com>,
Kent Overstreet <kent.overstreet@...il.com>,
linux-bcache@...r.kernel.org, linux-btrfs@...r.kernel.org,
linux-erofs@...ts.ozlabs.org, linux-ext4@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net, linux-mm@...ck.org,
linux-mtd@...ts.infradead.org, linux-nfs@...r.kernel.org,
linux-nilfs@...r.kernel.org, linux-nvme@...ts.infradead.org,
linux-pm@...r.kernel.org, linux-raid@...r.kernel.org,
linux-s390@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-xfs@...r.kernel.org,
"Md. Haris Iqbal" <haris.iqbal@...os.com>,
Mike Snitzer <snitzer@...nel.org>,
Minchan Kim <minchan@...nel.org>, ocfs2-devel@....oracle.com,
reiserfs-devel@...r.kernel.org,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Song Liu <song@...nel.org>,
Sven Schnelle <svens@...ux.ibm.com>,
target-devel@...r.kernel.org, Ted Tso <tytso@....edu>,
Trond Myklebust <trond.myklebust@...merspace.com>,
xen-devel@...ts.xenproject.org
Subject: Re: [PATCH 01/32] block: Provide blkdev_get_handle_* functions
On Tue 04-07-23 07:06:26, Bart Van Assche wrote:
> On 7/4/23 05:21, Jan Kara wrote:
> > +struct bdev_handle {
> > + struct block_device *bdev;
> > + void *holder;
> > +};
>
> Please explain in the patch description why a holder pointer is introduced
> in struct bdev_handle and how it relates to the bd_holder pointer in struct
> block_device. Is one of the purposes of this patch series perhaps to add
> support for multiple holders per block device?
No. The reason for adding holder to struct bdev_handle is that it is an
argument blkdev_put() needs. Currently, every user of blkdev_put() has to
remember what it has passed as 'holder' to blkdev_get_by_*() call and pass
that to blkdev_put(). With struct bdev_handle this will happen
automatically. This is already explained in the changelog of this patch:
"Create struct bdev_handle that contains all parameters that need to be
passed to blkdev_put()..."
If it was only about holder, the intrusive patches would not be warranted
but as the description also says:
"This will eventually allow us to pass one more argument to blkdev_put()
without too much hassle."
Because we will additionaly need to propagate the 'mode' argument used at
open to blkdev_put().
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists