Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp191566rwd; Wed, 7 Jun 2023 22:14:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6tTZbdI7WmwG1TWZcw6zINhOP7PTxZzxEuU+jEDk07OzM6h7RLmOGsQkX6JIKBUg3PKsIg X-Received: by 2002:a05:6a00:24cc:b0:64c:c453:244f with SMTP id d12-20020a056a0024cc00b0064cc453244fmr5726312pfv.15.1686201292788; Wed, 07 Jun 2023 22:14:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686201292; cv=none; d=google.com; s=arc-20160816; b=pM431jcQvq9jTxfYoUJBjQ/RcF9TXCAXUMatz6OM+VjUD3t2WEM5I7qHDg9CHlRd2C qVpLGQeWhaqeFO2huJsAZ212btsVzOBfhQjsY5hcET+vafOadQ0f+vFD68N7PeSFiti0 CeU4G+9gJMFNcSVk2BdfRNeIBGuhryS3RqjE8RCZOMHGklYy9ejt8MrR3g8s6m5xOKuk P9buI3/3OoIuqNnJdI05ak6vnyFtLGF+ybNglgOe0WnUB5n0smo0Gx7rRHKNUCFonA+e KXsHf9J8FXIXojLdoDR9QFXy3pdbB+bThsYgy7qrBfWfVw3p2FiG01CQnenY1ArUSgVB XrsQ== 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=IAO4FrOfs1P1S/rh6JwNk0FG/9u/tz0QHuvVjkXbpDY=; b=QSqCRlnmCrwi+G8o6mnImEWIVEL0PoqQvusb5WlKekhhscPjditUsPQbRy2W5QEoCc mN6xgpyYsFtsjmjZa2uV2srFbOZx2o/jrRYu7uocuOOGXRNovUCzMZSjyP3xwzpCNvZ9 VqjdQQm6WRNYY89MdSeucPjQeShNX2Tf2jVns2yOx+14uVnBJooJf2NMuqf2A0R+5sEx pciZGWysjznP0Jtw5T+ra3/NmaZUczeIHr3IERjnT2Ybu8MCJK35SqTFxiVNI/28PLNu YG5OeIKBPF0YbrVkt34ggyxsmZ3h3qJE8dINct5xddazN6u0pAJLEeJWfO2FeAcHjHOc isew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=iOaftM0s; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w191-20020a6382c8000000b0050fb1a00d3dsi466888pgd.46.2023.06.07.22.14.38; Wed, 07 Jun 2023 22:14:52 -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=iOaftM0s; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233170AbjFHFBk (ORCPT + 99 others); Thu, 8 Jun 2023 01:01:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234278AbjFHFBd (ORCPT ); Thu, 8 Jun 2023 01:01:33 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68BBB26AF; Wed, 7 Jun 2023 22:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=IAO4FrOfs1P1S/rh6JwNk0FG/9u/tz0QHuvVjkXbpDY=; b=iOaftM0svwdaamuTg4GXrVYUAN FdmapHcgBrEI/eCTofTu8QIr2ztV/MxfFgowMaNrqvzKsP216gJP7tC4/PunnnC+pWtyDqqdI+qD5 jiDn2H8Wkfrp1NcDYG45vzdsJO/FB5fdXaubBxAruqUnbdWaZWKYjzmLfvH1Wh9UbjDXFTHbrlVts USLCKerVnFqLAa5+/XE15VCRWIA6ZP6Vaq5CjlIFeudrfiFf1ZRKH30fNxvLh1ZSQ9qWbSAdVRpEC gjorD+v6oygp0F3tsgYTYF5/jGg8SxPoa9S/X0wfwwxYl7wDubzLL4ILiBW1Suv13Cao4k90plMsb 7GDsY7bw==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q77lq-0086dy-2B; Thu, 08 Jun 2023 05:01:14 +0000 Date: Wed, 7 Jun 2023 22:01:14 -0700 From: Christoph Hellwig To: Luis Chamberlain Cc: hch@infradead.org, 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: <20230508011717.4034511-2-mcgrof@kernel.org> 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.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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? 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. Also please explain the actual different locking contexts and what semantics you unify in the commit log please. > - * freeze_super - lock the filesystem and force it into a consistent state > + * freeze_super - force a filesystem backed by a block device into a consistent state > * @sb: the super to lock This is not actually true. Nothing in here has anything to do with block devices, and it is used on a at least one non-block file system.