Hello, this patch series 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 Linus' tree as of yesterday + two bcache fixes which are in the block tree. Patches have passed some basic testing, I plan to test more users once we agree this is the right way to go. 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-de...@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-devel@lists.xenproject.org