Hello,

this is a v2 of the patch series which implements the idea of blkdev_get_by_*()
calls returning bdev_handle which is then passed to blkdev_put() [1]. This
makes the get and put calls for bdevs more obviously matching and allows us to
propagate context from get to put without having to modify all the users
(again!).  In particular I need to propagate used open flags to blkdev_put() to
be able count writeable opens and add support for blocking writes to mounted
block devices. I'll send that series separately.

The series is based on Christian's vfs tree as of yesterday as there is quite
some overlap. Patches have passed some reasonable testing - I've tested block
changes, md, dm, bcache, xfs, btrfs, ext4, swap. This obviously doesn't cover
everything so I'd like to ask respective maintainers to review / test their
changes. Thanks! I've pushed out the full branch to:

git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git bdev_handle

to ease review / testing.

Changes since v1:
* Rebased on top of current vfs tree
* Renamed final functions to bdev_open_by_*() and bdev_release()
* Fixed detection of exclusive open in blkdev_ioctl() and blkdev_fallocate()
* Fixed swap conversion to properly reinitialize swap_info->bdev_handle
* Fixed xfs conversion to not oops with rtdev without logdev
* Couple other minor fixups

                                                                Honza

[1] https://lore.kernel.org/all/zjgnsvdhzx0xg...@infradead.org

CC: Alasdair Kergon <a...@redhat.com>
CC: Andrew Morton <a...@linux-foundation.org>
CC: Anna Schumaker <a...@kernel.org>
CC: Chao Yu <c...@kernel.org>
CC: Christian Borntraeger <borntrae...@linux.ibm.com>
CC: Coly Li <col...@suse.de
CC: "Darrick J. Wong" <djw...@kernel.org>
CC: Dave Kleikamp <sha...@kernel.org>
CC: David Sterba <dste...@suse.com>
CC: dm-devel@redhat.com
CC: drbd-...@lists.linbit.com
CC: Gao Xiang <xi...@kernel.org>
CC: Jack Wang <jinpu.w...@ionos.com>
CC: Jaegeuk Kim <jaeg...@kernel.org>
CC: jfs-discuss...@lists.sourceforge.net
CC: Joern Engel <jo...@lazybastard.org>
CC: Joseph Qi <joseph...@linux.alibaba.com>
CC: Kent Overstreet <kent.overstr...@gmail.com>
CC: linux-bca...@vger.kernel.org
CC: linux-bt...@vger.kernel.org
CC: linux-er...@lists.ozlabs.org
CC: <linux-e...@vger.kernel.org>
CC: linux-f2fs-de...@lists.sourceforge.net
CC: linux...@kvack.org
CC: linux-...@lists.infradead.org
CC: linux-...@vger.kernel.org
CC: linux-ni...@vger.kernel.org
CC: linux-n...@lists.infradead.org
CC: linux...@vger.kernel.org
CC: linux-r...@vger.kernel.org
CC: linux-s...@vger.kernel.org
CC: linux-s...@vger.kernel.org
CC: linux-...@vger.kernel.org
CC: "Md. Haris Iqbal" <haris.iq...@ionos.com>
CC: Mike Snitzer <snit...@kernel.org>
CC: Minchan Kim <minc...@kernel.org>
CC: ocfs2-de...@oss.oracle.com
CC: reiserfs-de...@vger.kernel.org
CC: Sergey Senozhatsky <senozhat...@chromium.org>
CC: Song Liu <s...@kernel.org>
CC: Sven Schnelle <sv...@linux.ibm.com>
CC: target-de...@vger.kernel.org
CC: Ted Tso <ty...@mit.edu>
CC: Trond Myklebust <trond.mykleb...@hammerspace.com>
CC: xen-de...@lists.xenproject.org

Previous versions:
Link: http://lore.kernel.org/r/20230629165206.383-1-j...@suse.cz # v1

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel

Reply via email to