[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/29] block: Make blkdev_get_by_*() return handle



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/ZJGNsVDhZx0Xgs2H@xxxxxxxxxxxxx

CC: Alasdair Kergon <agk@xxxxxxxxxx>
CC: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
CC: Anna Schumaker <anna@xxxxxxxxxx>
CC: Chao Yu <chao@xxxxxxxxxx>
CC: Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>
CC: Coly Li <colyli@xxxxxxx
CC: "Darrick J. Wong" <djwong@xxxxxxxxxx>
CC: Dave Kleikamp <shaggy@xxxxxxxxxx>
CC: David Sterba <dsterba@xxxxxxxx>
CC: dm-devel@xxxxxxxxxx
CC: drbd-dev@xxxxxxxxxxxxxxxx
CC: Gao Xiang <xiang@xxxxxxxxxx>
CC: Jack Wang <jinpu.wang@xxxxxxxxx>
CC: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
CC: jfs-discussion@xxxxxxxxxxxxxxxxxxxxx
CC: Joern Engel <joern@xxxxxxxxxxxxxxx>
CC: Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx>
CC: Kent Overstreet <kent.overstreet@xxxxxxxxx>
CC: linux-bcache@xxxxxxxxxxxxxxx
CC: linux-btrfs@xxxxxxxxxxxxxxx
CC: linux-erofs@xxxxxxxxxxxxxxxx
CC: <linux-ext4@xxxxxxxxxxxxxxx>
CC: linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx
CC: linux-mm@xxxxxxxxx
CC: linux-mtd@xxxxxxxxxxxxxxxxxxx
CC: linux-nfs@xxxxxxxxxxxxxxx
CC: linux-nilfs@xxxxxxxxxxxxxxx
CC: linux-nvme@xxxxxxxxxxxxxxxxxxx
CC: linux-pm@xxxxxxxxxxxxxxx
CC: linux-raid@xxxxxxxxxxxxxxx
CC: linux-s390@xxxxxxxxxxxxxxx
CC: linux-scsi@xxxxxxxxxxxxxxx
CC: linux-xfs@xxxxxxxxxxxxxxx
CC: "Md. Haris Iqbal" <haris.iqbal@xxxxxxxxx>
CC: Mike Snitzer <snitzer@xxxxxxxxxx>
CC: Minchan Kim <minchan@xxxxxxxxxx>
CC: ocfs2-devel@xxxxxxxxxxxxxx
CC: reiserfs-devel@xxxxxxxxxxxxxxx
CC: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
CC: Song Liu <song@xxxxxxxxxx>
CC: Sven Schnelle <svens@xxxxxxxxxxxxx>
CC: target-devel@xxxxxxxxxxxxxxx
CC: Ted Tso <tytso@xxxxxxx>
CC: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
CC: xen-devel@xxxxxxxxxxxxxxxxxxxx

Previous versions:
Link: http://lore.kernel.org/r/20230629165206.383-1-jack@xxxxxxx # v1



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.