From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A472819BCA for ; Fri, 3 Nov 2023 14:19:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CF2E1BD for ; Fri, 3 Nov 2023 07:19:44 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id A349E67373; Fri, 3 Nov 2023 15:19:40 +0100 (CET) Date: Fri, 3 Nov 2023 15:19:40 +0100 From: Christoph Hellwig To: Christian Brauner Cc: Dave Chinner , Christoph Hellwig , Jan Kara , "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, Chandan Babu R Subject: Re: [PATCH] fs: handle freezing from multiple devices Message-ID: <20231103141940.GA3732@lst.de> References: <87bkccnwxc.fsf@debian-BULLSEYE-live-builder-AMD64> <20231103-vfs-multi-device-freeze-v1-1-fe922b30bfb6@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231103-vfs-multi-device-freeze-v1-1-fe922b30bfb6@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Nov 03, 2023 at 02:52:27PM +0100, Christian Brauner wrote: > Fix this by counting the number of block devices that requested the > filesystem to be frozen in @bdev_count in struct sb_writers and only > unfreeze once the @bdev_count hits zero. Survives fstests and blktests > and makes the reproducer succeed. Is there a good reason to not just refcount the freezes in general?