linux-bcache.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/29] block: Make blkdev_get_by_*() return handle
@ 2023-08-23 10:48 Jan Kara
  2023-08-23 10:48 ` [PATCH 09/29] bcache: Convert to bdev_open_by_path() Jan Kara
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Jan Kara @ 2023-08-23 10:48 UTC (permalink / raw)
  To: Christian Brauner
  Cc: Jens Axboe, linux-fsdevel, linux-block, Christoph Hellwig,
	Jan Kara, Alasdair Kergon, Andrew Morton, Anna Schumaker,
	Chao Yu, Christian Borntraeger, Darrick J. Wong, Dave Kleikamp,
	David Sterba, dm-devel, drbd-dev, Gao Xiang, Jack Wang,
	Jaegeuk Kim, jfs-discussion, Joern Engel, Joseph Qi,
	Kent Overstreet, linux-bcache, linux-btrfs, linux-erofs,
	linux-ext4, linux-f2fs-devel, linux-mm, linux-mtd, linux-nfs,
	linux-nilfs, linux-nvme, linux-pm, linux-raid, linux-s390,
	linux-scsi, linux-xfs, Md. Haris Iqbal, Mike Snitzer,
	Minchan Kim, ocfs2-devel, reiserfs-devel, Sergey Senozhatsky,
	Song Liu, Sven Schnelle, target-devel, Ted Tso, Trond Myklebust,
	xen-devel

Hello,

this is a v3 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 today as there is quite
some overlap. Patches have passed some reasonable testing - I've tested block
changes, md, dm, bcache, xfs, btrfs, ext4, swap. More testing or review is
always welcome. 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. Since there were not many comments for v2 and
Christoph has acked the series I think we should start discussing how to merge
the series. Most collisions with this series seem to happen in the filesystems
area so VFS tree would seem as the least painful way to merge this. Jens,
are you OK with that?

Changes since v2:
* Rebased on top of current vfs tree
* Added some acks
* Reflected minor nits from Christoph
* Added missing conversion of blkdev_put() calls in cramfs and erofs
* Fixed possible leak of bdev handle in xfs if logdev is the same as fs dev

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@infradead.org

CC: Alasdair Kergon <agk@redhat.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Anna Schumaker <anna@kernel.org>
CC: Chao Yu <chao@kernel.org>
CC: Christian Borntraeger <borntraeger@linux.ibm.com>
CC: Coly Li <colyli@suse.de
CC: "Darrick J. Wong" <djwong@kernel.org>
CC: Dave Kleikamp <shaggy@kernel.org>
CC: David Sterba <dsterba@suse.com>
CC: dm-devel@redhat.com
CC: drbd-dev@lists.linbit.com
CC: Gao Xiang <xiang@kernel.org>
CC: Jack Wang <jinpu.wang@ionos.com>
CC: Jaegeuk Kim <jaegeuk@kernel.org>
CC: jfs-discussion@lists.sourceforge.net
CC: Joern Engel <joern@lazybastard.org>
CC: Joseph Qi <joseph.qi@linux.alibaba.com>
CC: Kent Overstreet <kent.overstreet@gmail.com>
CC: linux-bcache@vger.kernel.org
CC: linux-btrfs@vger.kernel.org
CC: linux-erofs@lists.ozlabs.org
CC: <linux-ext4@vger.kernel.org>
CC: linux-f2fs-devel@lists.sourceforge.net
CC: linux-mm@kvack.org
CC: linux-mtd@lists.infradead.org
CC: linux-nfs@vger.kernel.org
CC: linux-nilfs@vger.kernel.org
CC: linux-nvme@lists.infradead.org
CC: linux-pm@vger.kernel.org
CC: linux-raid@vger.kernel.org
CC: linux-s390@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: linux-xfs@vger.kernel.org
CC: "Md. Haris Iqbal" <haris.iqbal@ionos.com>
CC: Mike Snitzer <snitzer@kernel.org>
CC: Minchan Kim <minchan@kernel.org>
CC: ocfs2-devel@oss.oracle.com
CC: reiserfs-devel@vger.kernel.org
CC: Sergey Senozhatsky <senozhatsky@chromium.org>
CC: Song Liu <song@kernel.org>
CC: Sven Schnelle <svens@linux.ibm.com>
CC: target-devel@vger.kernel.org
CC: Ted Tso <tytso@mit.edu>
CC: Trond Myklebust <trond.myklebust@hammerspace.com>
CC: xen-devel@lists.xenproject.org

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

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH v2 0/29] block: Make blkdev_get_by_*() return handle
@ 2023-08-11 11:04 Jan Kara
  2023-08-11 11:04 ` [PATCH 09/29] bcache: Convert to bdev_open_by_path() Jan Kara
  0 siblings, 1 reply; 16+ messages in thread
From: Jan Kara @ 2023-08-11 11:04 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: linux-block, Christoph Hellwig, Jan Kara, Alasdair Kergon,
	Andrew Morton, Anna Schumaker, Chao Yu, Christian Borntraeger,
	Darrick J. Wong, Dave Kleikamp, David Sterba, dm-devel, drbd-dev,
	Gao Xiang, Jack Wang, Jaegeuk Kim, jfs-discussion, Joern Engel,
	Joseph Qi, Kent Overstreet, linux-bcache, linux-btrfs,
	linux-erofs, linux-ext4, linux-f2fs-devel, linux-mm, linux-mtd,
	linux-nfs, linux-nilfs, linux-nvme, linux-pm, linux-raid,
	linux-s390, linux-scsi, linux-xfs, Md. Haris Iqbal, Mike Snitzer,
	Minchan Kim, ocfs2-devel, reiserfs-devel, Sergey Senozhatsky,
	Song Liu, Sven Schnelle, target-devel, Ted Tso, Trond Myklebust,
	xen-devel

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@infradead.org

CC: Alasdair Kergon <agk@redhat.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Anna Schumaker <anna@kernel.org>
CC: Chao Yu <chao@kernel.org>
CC: Christian Borntraeger <borntraeger@linux.ibm.com>
CC: Coly Li <colyli@suse.de
CC: "Darrick J. Wong" <djwong@kernel.org>
CC: Dave Kleikamp <shaggy@kernel.org>
CC: David Sterba <dsterba@suse.com>
CC: dm-devel@redhat.com
CC: drbd-dev@lists.linbit.com
CC: Gao Xiang <xiang@kernel.org>
CC: Jack Wang <jinpu.wang@ionos.com>
CC: Jaegeuk Kim <jaegeuk@kernel.org>
CC: jfs-discussion@lists.sourceforge.net
CC: Joern Engel <joern@lazybastard.org>
CC: Joseph Qi <joseph.qi@linux.alibaba.com>
CC: Kent Overstreet <kent.overstreet@gmail.com>
CC: linux-bcache@vger.kernel.org
CC: linux-btrfs@vger.kernel.org
CC: linux-erofs@lists.ozlabs.org
CC: <linux-ext4@vger.kernel.org>
CC: linux-f2fs-devel@lists.sourceforge.net
CC: linux-mm@kvack.org
CC: linux-mtd@lists.infradead.org
CC: linux-nfs@vger.kernel.org
CC: linux-nilfs@vger.kernel.org
CC: linux-nvme@lists.infradead.org
CC: linux-pm@vger.kernel.org
CC: linux-raid@vger.kernel.org
CC: linux-s390@vger.kernel.org
CC: linux-scsi@vger.kernel.org
CC: linux-xfs@vger.kernel.org
CC: "Md. Haris Iqbal" <haris.iqbal@ionos.com>
CC: Mike Snitzer <snitzer@kernel.org>
CC: Minchan Kim <minchan@kernel.org>
CC: ocfs2-devel@oss.oracle.com
CC: reiserfs-devel@vger.kernel.org
CC: Sergey Senozhatsky <senozhatsky@chromium.org>
CC: Song Liu <song@kernel.org>
CC: Sven Schnelle <svens@linux.ibm.com>
CC: target-devel@vger.kernel.org
CC: Ted Tso <tytso@mit.edu>
CC: Trond Myklebust <trond.myklebust@hammerspace.com>
CC: xen-devel@lists.xenproject.org

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-10-02  7:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-23 10:48 [PATCH v3 0/29] block: Make blkdev_get_by_*() return handle Jan Kara
2023-08-23 10:48 ` [PATCH 09/29] bcache: Convert to bdev_open_by_path() Jan Kara
2023-08-25 12:06   ` Christian Brauner
2023-08-25 13:32 ` [PATCH v3 0/29] block: Make blkdev_get_by_*() return handle Christian Brauner
2023-08-28 17:07   ` Jan Kara
2023-08-29 11:02     ` Christian Brauner
2023-09-27  9:34 ` [PATCH v4 " Jan Kara
2023-09-27  9:34 ` [PATCH 09/29] bcache: Convert to bdev_open_by_path() Jan Kara
2023-09-27 14:19 ` [PATCH v4 0/29] block: Make blkdev_get_by_*() return handle Jens Axboe
2023-09-27 16:21 ` Christian Brauner
2023-10-02  7:57   ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2023-08-11 11:04 [PATCH v2 " Jan Kara
2023-08-11 11:04 ` [PATCH 09/29] bcache: Convert to bdev_open_by_path() Jan Kara
2023-08-21  1:06   ` Eric Wheeler
2023-08-21 17:50     ` Jan Kara
2023-08-21 18:54       ` Eric Wheeler
2023-08-23 10:10         ` Coly Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).