Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1165400rwd; Thu, 8 Jun 2023 13:16:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ606VhWLtCnhj7fDuoYCtYi92OCMYioTujnZfxLO0j4v+bJNqSjgonkQV5/sQ2YcINmZcqP X-Received: by 2002:a17:902:f545:b0:1b2:4844:e556 with SMTP id h5-20020a170902f54500b001b24844e556mr5256344plf.31.1686255405775; Thu, 08 Jun 2023 13:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686255405; cv=none; d=google.com; s=arc-20160816; b=CZSVNz+nbR9J8QTYTBIPlHSaydatOJqVM2IYwgvyQA40aORZAc3rLf7QEvhEIEpoUX vImguU7LHOEmeROWs/6617Q9qdKxL/ofhZMftA7WcpFLYS3qGU5hBZHDm/pOKUm1R7eV hRbSU54KZL8x1WitUVlRyNRIp2psH12RNOKwNNImwJwWzeLr80ixkcLoHpcwpAgb/NLQ 7ogGubpLu9LnuYM94dObmxyxy5W15zqFGxuyjv83EqTK0ZAuvVaGVVE4twysGOntNWVx ddpyMkf0fohMOoOloIrnMC5/OkE7MCFIFc/P+MguZhn0P4p2/wisuIVD6zao/lhJQ6Sv X/Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+1Y87JI1ExyyqKN04ljVebM0yuw8A6N4rqGWYyXdVbk=; b=oer8VjQ8Iwq4n9fx9Lzc/BYes4H1EH3rpJ/S0YH78CGCtjQnqtYIyjYhMNgqRkjJvY ilqabUPXASQFGWcmhubxaISOhECq7oSVOo5XPNYsW5fCPWCHgz1YjEvuE3N4GUM1fl5g nxdmfuNEA9Dgfp+dzMJKCfzibvXXVn1OspixNsWfBxjO65mNwWoqpSBkmf6R0hG9HaSW iYyV411VObcWokgO41aGe/G4u0i0OAj+UT1Wjd1OhDpS3iI6e7qD077KzY/0IyLmCx6+ 4t8kE+HQzW2UIQLgvkm+1l4H832/OvnNqfBnCeoUozFWWDTZnfdSZp7Q9OQLDAp8HVo9 lusw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=z4oGDQW6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 r2-20020a170903410200b001a1d78af685si1449019pld.466.2023.06.08.13.16.11; Thu, 08 Jun 2023 13:16:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=z4oGDQW6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S233018AbjFHTzx (ORCPT + 99 others); Thu, 8 Jun 2023 15:55:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbjFHTzw (ORCPT ); Thu, 8 Jun 2023 15:55:52 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8E172733; Thu, 8 Jun 2023 12:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+1Y87JI1ExyyqKN04ljVebM0yuw8A6N4rqGWYyXdVbk=; b=z4oGDQW6excVHUsoDrKtRT1INe neLeUDTt7v6wFVfj3itYZ8a7QWSnfgd2GrgNbq7wSDLq0QBhvn/nspQgYNDMSaHoDdRuZAlFAWbH2 6rN0ffPKQHTEG3fW9tac2rqYxSozh7Dw/QX64FQgKwS8TkuEakH/j6aQnzUx9m7HXXOCePnG3J/Iv j7QDNc25qsZ/6t+aKEECjIX/pdjf9dPP26hlmNgbHnIvgNlOyplTS3OV5Qd1hIHih+t+Y1A7Uwcmy cCLHY+6SRYCzBU3NwtivPWCN8iqU0XKL5QPpxRp/IsKfn5z0rgJnM9kAPvBJfD0hkZa5RGxJAtkM+ XxX46jRw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q7LjO-00ASde-0D; Thu, 08 Jun 2023 19:55:38 +0000 Date: Thu, 8 Jun 2023 12:55:38 -0700 From: Luis Chamberlain To: Christoph Hellwig Cc: djwong@kernel.org, sandeen@sandeen.net, song@kernel.org, rafael@kernel.org, gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk, jack@suse.cz, jikos@kernel.org, bvanassche@acm.org, ebiederm@xmission.com, mchehab@kernel.org, keescook@chromium.org, p.raghav@samsung.com, da.gomez@samsung.com, linux-fsdevel@vger.kernel.org, kernel@tuxforce.de, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] fs: unify locking semantics for fs freeze / thaw Message-ID: References: <20230508011717.4034511-1-mcgrof@kernel.org> <20230508011717.4034511-2-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain 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 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-kernel@vger.kernel.org On Wed, Jun 07, 2023 at 10:01:14PM -0700, Christoph Hellwig wrote: > On Sun, May 07, 2023 at 06:17:12PM -0700, Luis Chamberlain wrote: > > Right now freeze_super() and thaw_super() are called with > > different locking contexts. To expand on this is messy, so > > just unify the requirement to require grabbing an active > > reference and keep the superblock locked. > > > > Suggested-by: Christoph Hellwig > > Signed-off-by: Luis Chamberlain > > Maybe I'm just getting old, but where did I suggest this? https://lore.kernel.org/all/20210420120335.GA3604224@infradead.org/ "I don't think we need both variants, just move the locking and s_active acquisition out of free_super. Same for the thaw side." > That being said, holding an active reference over any operation is a > good thing. As Jan said it can be done way simpler than this, though. Great. Luis