Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1167237rwo; Wed, 2 Aug 2023 09:38:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlFNci8JnIHpE9XyUGmdo+zJr2K26hiCfeAzE6onLs3ncNzQ1GfZN6FUE6EXSi0IeQo8zBmW X-Received: by 2002:a05:6a20:748b:b0:13e:2080:ab91 with SMTP id p11-20020a056a20748b00b0013e2080ab91mr9042828pzd.28.1690994315630; Wed, 02 Aug 2023 09:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690994315; cv=none; d=google.com; s=arc-20160816; b=Y+hFg+pDDcNnvCscLBp40XPFuMf4E3QU/7H0SGbH3lkNDVTfk5Re8I9P+uyjg2JDHz It+8ASWJ5dKxblIpQfdZT+uuIFnMIgCj2xUJfB1gagWK3IrfEloglpuc8iEbIe3R764T EeOtzuXbJNBuP1eqjms7DA1kenbJyh0dirwdzSHCIVqJIA3D40K9Ft2dbaiIfpg1dugi eWXMtwBYzxVwqv/9IDTOHRCZ+P+qcFpKQChr/gDWVMOZZITt2rIzNH8cVFHVQpkMSKaw 16Ioe4sU6oGUi4ifvM8RY6sydMAiR5XHdnHSu0sMUzs9uCZ2pdDIJ4d2f230w92Q/xGW FT+A== 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; bh=b4U6bkV1Hpe1BTMHR6FYKzJdXgCv2eIo7grqFPPTqjk=; fh=EY4nBjRR1THbvUmIeG1UZvfGbBl7lvcJq64vCzE68S8=; b=xc3jOQNfzEE2HEPMvvqtv5/JaC/BOZxfsxPgX3dx3xhmXMhNUH/Yt2onmnp1MQlapo 5oiGBdKWihcFskK6BWQbcBpNDGi2OZr87518PB4W596t1ccjseBEhF/L+GHphuTC9SEq QCzdKQyKB4Qvyi+eip+KYPxPfJoq3xkho+f40pqtI0tFK44eZA5gdBIzOV40KZkvuEtt V9sSJqsCLYOj1yoJ0euqMBsvf8nQ8Jj09xyR4hShlEiYnebp2ZSxHywApaOUEVzsDPUM yUZbQenZXYd10Uk9o4iXevta9bllziXMSqqPR1CUjUO6nTwl3+xwry+3wn4+gPlTSeP8 7crg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mEmIb7ua; 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 dc14-20020a056a0035ce00b00686dfe4fa60si6541398pfb.386.2023.08.02.09.38.22; Wed, 02 Aug 2023 09:38:35 -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=@infradead.org header.s=bombadil.20210309 header.b=mEmIb7ua; 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 S234200AbjHBPls (ORCPT + 99 others); Wed, 2 Aug 2023 11:41:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233956AbjHBPlq (ORCPT ); Wed, 2 Aug 2023 11:41:46 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD10DDA; Wed, 2 Aug 2023 08:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=b4U6bkV1Hpe1BTMHR6FYKzJdXgCv2eIo7grqFPPTqjk=; b=mEmIb7uaUaKOwJY8lv1GETQvVo WNRAbVgAX3I0Nq8v6CM/Qo1DrhqE34m6F/BDf6xyn9aDiz8ir/jR+j+b6N3vmF4ctRKkZekSnf/xi uUswI0ekQNU4ccZrtb1iKIfKRkjifCinoSifA+mjBzEDaNBg7gOhnCnHmtnIl+lP+7yi1X0U5ECrV CBu/ROThv8CXmTxygF8pUmZ+UHKpiHPjUS4CpeuY+nPNuUWnZTnad0/okenZbctCPywHMdIKttcRj Mov5cp0eIKS0KO0w/8rDBjKZPumqCJP1eChnKXGXEVAMc4/RbvHBDfEltpKwT7S55Y91Tb9SGytMS jH+0LgHw==; Received: from 2a02-8389-2341-5b80-39d3-4735-9a3c-88d8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:39d3:4735:9a3c:88d8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qRDyh-005GCS-2F; Wed, 02 Aug 2023 15:41:36 +0000 From: Christoph Hellwig To: Al Viro , Christian Brauner Cc: Jan Kara , Chris Mason , Josef Bacik , David Sterba , "Theodore Ts'o" , Andreas Dilger , Jaegeuk Kim , Chao Yu , Ryusuke Konishi , "Darrick J. Wong" , Jens Axboe , linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nilfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-block@vger.kernel.org Subject: more blkdev_get and holder work Date: Wed, 2 Aug 2023 17:41:19 +0200 Message-Id: <20230802154131.2221419-1-hch@lst.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,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 Hi all, this series sits on top of the vfs.super branch in the VFS tree and does a few closely related things: 1) it also converts nilfs2 and btrfs to the new scheme where the file system only opens the block devices after we know that a new super_block was allocated. 2) it then makes sure that for all file system openers the super_block is stored in bd_holder, and makes use of that fact in the mark_dead method so that it doesn't have to fall get_super and thus can also work on block devices that sb->s_bdev doesn't point to 3) it then drops the fs-specific holder ops in ext4 and xfs and uses the generic fs_holder_ops there A git tree is available here: git://git.infradead.org/users/hch/misc.git fs-holder-rework Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/fs-holder-rework Diffstat: fs/btrfs/super.c | 67 ++++++++++++++++--------------------- fs/btrfs/volumes.c | 8 ++-- fs/btrfs/volumes.h | 2 - fs/ext4/super.c | 18 +++------- fs/f2fs/super.c | 7 +-- fs/nilfs2/super.c | 81 ++++++++++++++++----------------------------- fs/super.c | 44 ++++++++++++++++++------ fs/xfs/xfs_super.c | 32 +++++++---------- include/linux/blkdev.h | 2 + include/linux/fs_context.h | 2 + 10 files changed, 126 insertions(+), 137 deletions(-)