Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp908840rwb; Sat, 5 Aug 2023 03:47:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH0PoVeJCKF3qgsD8FNZL7cIsu3IsI4bcITgkz3d4/OuqTRI+dCUGHQ4m00/SXvyOX+CpYJ X-Received: by 2002:a17:903:1cb:b0:1bc:5bdd:1f38 with SMTP id e11-20020a17090301cb00b001bc5bdd1f38mr1340383plh.3.1691232432350; Sat, 05 Aug 2023 03:47:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691232432; cv=none; d=google.com; s=arc-20160816; b=fQl798bfQHYvEn50ciKfeFRR5thklgPEiyfHA1k4ybK16WUbzy38IP+hqm7FQHOUj/ cc1aixX2HuspmqhKJLnagPWezbdQP7LNHUutRic7OvkwuvkgQ5KnoJ5DVngP1YX8rv+a yqYw0pD3DB+yV6wyRh2qCyjqOfebXOfvK2a1JM0veFmGSyMurzyK5KdXeHCjTmF4nobp ZqEZUNmN/Or1FlNqSQgkQlZ4EVhdPS0mAL9I9hNHslenb1RzaITQXI5DfC68/15Q3d4n gUbLw+0y2PCNZc8cPX/68Ts3aW+wAEKzQD1bmaVBvZXjSD7auDr9iY3+y95jxd3KTSD1 3rcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xQ61czzkab6NCYwS7Jn5mrk3gMr4CLj7Pe6n75jK24U=; fh=xFs74If4ozLaUmSR942RYemb57RgaoflxZJ9e6SQkmY=; b=bbPi3gY+f8qDTMY6MAdoxA2NYMPNIEk0Mb8/Q1Y1L4sUNPO9myOrMV/vx5o70S8xe1 YPXoBa1f/iXg+bPO03ypf880RhQMxjs1Up9O9nrOMl3r0aslqMy0Uy7umSdFDG0OeMw+ A6YHpHmqKX12fb1vCCObjJmowzE4RKo9yaAQT7LuWLeS5VV1WEuNoyqicCAbX3ejSaiE WIgjWx8sId7CrLHBJbgnx3g+DHklIfGDFDHFBhOsjQ7xex8RhVtaGmemJb3div6tSmjr okVKh6DPoa2VK+vhKobHhRTQHmpYsFeuJaRRmEaCK1Yspf/vtCnW7hlcOqWpGTRh6qTQ NtXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="gcYazOn/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ik9-20020a170902ab0900b001bba4470991si3065410plb.498.2023.08.05.03.46.54; Sat, 05 Aug 2023 03:47:12 -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=@kernel.org header.s=k20201202 header.b="gcYazOn/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229509AbjHEKj1 (ORCPT + 99 others); Sat, 5 Aug 2023 06:39:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjHEKj0 (ORCPT ); Sat, 5 Aug 2023 06:39:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDF2A10C4; Sat, 5 Aug 2023 03:39:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7A6B060C63; Sat, 5 Aug 2023 10:39:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9DD0C433C7; Sat, 5 Aug 2023 10:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691231964; bh=uXGWtXBnq0nfa/jBhSY841c7zuCmhgyQEv0tqvbShRw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gcYazOn/niIWgO8RAq86Wd0rf6mY5HFyG8HgKYgI+uBhiJcOa1iN7eHEwWVbAcqFb 5XIJBVbVVoMXgQkQiYsI582grCtIP5eESCBkMFP2HJtSXo84sAac2RzSv75h991bTw DlhvR7swkECQCUNJ0aVzgU1Y6/CLhGJcMtH+agnVqKKciIHJRKsst4uRWzNWqfcH/S 4Z5gPIEd6TmqOwMkNTU2g/kveG9q6Rla8oYlgbxLN/F6Ht72xR0/n8EjkY0FHeNts+ T/IgH7Tx7FR6m1gG2NYvDi0EBc0UAhmoFZi7m3tQ+5R3RXve3Uu+iNx/GDcEcrNUGm nFhvs+f54VGWQ== Date: Sat, 5 Aug 2023 12:39:12 +0200 From: Christian Brauner To: Christoph Hellwig Cc: "Darrick J. Wong" , Al Viro , Jan Kara , Chris Mason , Josef Bacik , David Sterba , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , Chao Yu , Ryusuke Konishi , 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: Re: [PATCH 11/12] xfs: drop s_umount over opening the log and RT devices Message-ID: <20230805-galaabend-diskreditieren-27943ea3c10e@brauner> References: <20230802154131.2221419-1-hch@lst.de> <20230802154131.2221419-12-hch@lst.de> <20230802163219.GW11352@frogsfrogsfrogs> <20230805083239.GA29780@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230805083239.GA29780@lst.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 On Sat, Aug 05, 2023 at 10:32:39AM +0200, Christoph Hellwig wrote: > On Wed, Aug 02, 2023 at 09:32:19AM -0700, Darrick J. Wong wrote: > > > + /* see get_tree_bdev why this is needed and safe */ > > > > Which part of get_tree_bdev? Is it this? > > > > /* > > * s_umount nests inside open_mutex during > > * __invalidate_device(). blkdev_put() acquires > > * open_mutex and can't be called under s_umount. Drop > > * s_umount temporarily. This is safe as we're > > * holding an active reference. > > */ > > up_write(&s->s_umount); > > blkdev_put(bdev, fc->fs_type); > > down_write(&s->s_umount); > > Yes. With the refactoring earlier in the series get_tree_bdev should > be trivial enough to not need a more specific reference. If you > think there's a better way to refer to it I can update the comment, > though. > > > > mp->m_logdev_targp = mp->m_ddev_targp; > > > } > > > > > > - return 0; > > > + error = 0; > > > +out_unlock: > > > + down_write(&sb->s_umount); > > > > Isn't down_write taking s_umount? I think the label should be > > out_relock or something less misleading. > > Agreed. Christian, can you just change this in your branch, or should > I send an incremental patch? No need to send an incremental patch. I just s/out_unlock/out_relock/g in-tree. Thanks!