Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp27600902rwd; Tue, 4 Jul 2023 05:23:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlFvDMbDunEamXItsZX4taeggMtDjcdW9C/uoY6bn/oC4XxiuoqkYp/vXokiDK9zTKTyEDa2 X-Received: by 2002:a25:bb0d:0:b0:c4c:ad32:6287 with SMTP id z13-20020a25bb0d000000b00c4cad326287mr6673576ybg.40.1688473425301; Tue, 04 Jul 2023 05:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688473425; cv=none; d=google.com; s=arc-20160816; b=X7VybGTip3hSqp/fNWUGdPNFht4+Z5oofF+4TZ9akldo0poMCYx/85QdV+LUVyzddH hJxxesTF3hccCcn1RELSRGMsDSUmkdbw2sU1FhWAootbYJEWwzpGLq0XyDbDkhZZpDQ/ 6K3z/oplOduq5A/k0nD+4xPOJhoy/nApWvF5yr043TwlPzRRATdPNDjVCY3/Q/mlkEhG y1ZP7FM0VIsGJmb1tWFQ61oHzIJkCPf45A7+5/T/UqlXf351amND0Ehp7Li/xT+77yqr gT5oYv+/VNGY1oZ1ztf/Wil8H0c3XPuN3EyNt3wv66PBLaC807RtChspGiXFud+m8qLY n0pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=fmLTdco5SVuopuSHDbZ7fgiCJT9fmPtnstwBD5O0cVs=; fh=wnK0tWKq/cGblIVIyMJxIkj/sUiKdLI39NVTRx/e+Gw=; b=L3i0oKwbhLbHxEewjH6ZK+fDceMXUYnNZgrxwP4Zfe3bWgAoTsGsy2hqB3rzCHqJFq qjFScZkLJDV8VquCjhbaddiJJlcj8K1kV0WYzEp1FVSTpM6G4YzB0pD/0nGYlmSqZrzr l/y+DUJ/ljNv1T58yezj4k9H9zXPXL2fL7zL6y/vH62QQlkQCMr0y0H0d85g6ruE27/8 KCtTcvKkCg4IDVbLZ/eiPt3pm2EiKKUCa8Xknc234ldqVf4tUKrHeNn/6A1AkuJlqzO7 plYhkR8L6/1bvdONMEgVx4uy8/vdFQcDQ4YgsyH1/DbPpFyDl499uriHj89LMDXcz85l 6WKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=LYS1cAt6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=Dse69eRR; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w71-20020a63824a000000b0053efd7561e1si20454765pgd.287.2023.07.04.05.23.27; Tue, 04 Jul 2023 05:23:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=LYS1cAt6; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=Dse69eRR; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231570AbjGDMWh (ORCPT + 99 others); Tue, 4 Jul 2023 08:22:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231540AbjGDMWf (ORCPT ); Tue, 4 Jul 2023 08:22:35 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA55810E2; Tue, 4 Jul 2023 05:22:26 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 37C1422864; Tue, 4 Jul 2023 12:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688473345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fmLTdco5SVuopuSHDbZ7fgiCJT9fmPtnstwBD5O0cVs=; b=LYS1cAt6t7JDeaXCZA2GfkFsvePsCKrBv683wLJKbeQdnB0RB5kex3lpjPlaO0WNrRIj/p OKov+tjGtn08tmzrJU88unG7OZdlwokmKgdGkl+OG4epxE3GA77hqhJZhG3Z0dN3YI1cPw 0UrvrW8qrgzkAVKwdQJPDUFGAz/meEU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688473345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=fmLTdco5SVuopuSHDbZ7fgiCJT9fmPtnstwBD5O0cVs=; b=Dse69eRRr1j+O/QtQVzrTyIAnqxKgXzcDp3QAv4KDKTfaZG4HjcsXtXKNaEGDfzmeYyIxx WQrcOQN123NhV6Dg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1D4941346D; Tue, 4 Jul 2023 12:22:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id j8gfBwEPpGQFMAAAMHmgww (envelope-from ); Tue, 04 Jul 2023 12:22:25 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 915DAA0722; Tue, 4 Jul 2023 14:22:24 +0200 (CEST) From: Jan Kara To: Cc: , Jens Axboe , Christoph Hellwig , Jan Kara , Alasdair Kergon , Andrew Morton , Anna Schumaker , Chao Yu , Christian Borntraeger , "Darrick J. Wong" , Dave Kleikamp , David Sterba , dm-devel@redhat.com, drbd-dev@lists.linbit.com, Gao Xiang , Jack Wang , Jaegeuk Kim , jfs-discussion@lists.sourceforge.net, Joern Engel , Joseph Qi , Kent Overstreet , linux-bcache@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mm@kvack.org, linux-mtd@lists.infradead.org, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pm@vger.kernel.org, linux-raid@vger.kernel.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-xfs@vger.kernel.org, "Md. Haris Iqbal" , Mike Snitzer , Minchan Kim , ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, Sergey Senozhatsky , Song Liu , Sven Schnelle , target-devel@vger.kernel.org, Ted Tso , Trond Myklebust , xen-devel@lists.xenproject.org Subject: [PATCH RFC 0/32] block: Make blkdev_get_by_*() return handle Date: Tue, 4 Jul 2023 14:21:27 +0200 Message-Id: <20230629165206.383-1-jack@suse.cz> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2471; i=jack@suse.cz; h=from:subject:message-id; bh=ceZQTtdZjpsFiBb9Fva7YX0lOa2i6Zx53n9hl/3+KQM=; b=owEBbQGS/pANAwAIAZydqgc/ZEDZAcsmYgBkpA7DYrlV/5vfqjK0juEsCaKDoUZ39z4YDWexB9PO aQyP7ZaJATMEAAEIAB0WIQSrWdEr1p4yirVVKBycnaoHP2RA2QUCZKQOwwAKCRCcnaoHP2RA2S48B/ 476l3pggtn8igKmRoHswxXv63Ks68g/08HDzIZqCtDPA84BSKd93Nq0m/Wn76G+ubHQpfg8PMw5+DG uV+DOTR+NEYKAToQQ8YzmS6RAGasKKWUg3k1pr7jK23l+wcq16ImmBXmWM3nr2j85QcDZeB+vpUKHh bdQJQsBOqKsA+qlImgVwvMS+V4UTLQcIYQo2bDBl0TIbJB0UiXYMYHcvrEkwNZWybXBs+wfERrXuF1 XlXO6rWvLyW94kkpvaZTvPY+yZd7tOLd+W8gsz2uBFG9QJg57aDkZxf6NA+Qxf2O8uwfWiyb1XXBN8 I1wYA/sSduibCw4tF4sYb/wERvIAO+ X-Developer-Key: i=jack@suse.cz; a=openpgp; fpr=93C6099A142276A28BBE35D815BC833443038D8C Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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/ZJGNsVDhZx0Xgs2H@infradead.org CC: Alasdair Kergon CC: Andrew Morton CC: Anna Schumaker CC: Chao Yu CC: Christian Borntraeger CC: Coly Li CC: Dave Kleikamp CC: David Sterba CC: dm-devel@redhat.com CC: drbd-dev@lists.linbit.com CC: Gao Xiang CC: Jack Wang CC: Jaegeuk Kim CC: jfs-discussion@lists.sourceforge.net CC: Joern Engel CC: Joseph Qi CC: Kent Overstreet CC: linux-bcache@vger.kernel.org CC: linux-btrfs@vger.kernel.org CC: linux-erofs@lists.ozlabs.org CC: 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" CC: Mike Snitzer CC: Minchan Kim CC: ocfs2-devel@oss.oracle.com CC: reiserfs-devel@vger.kernel.org CC: Sergey Senozhatsky CC: Song Liu CC: Sven Schnelle CC: target-devel@vger.kernel.org CC: Ted Tso CC: Trond Myklebust CC: xen-devel@lists.xenproject.org