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 D78CFC139 for ; Mon, 6 Nov 2023 07:21:41 +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 9F2A2CC for ; Sun, 5 Nov 2023 23:21:40 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 3B63F68AA6; Mon, 6 Nov 2023 08:21:37 +0100 (CET) Date: Mon, 6 Nov 2023 08:21:37 +0100 From: Christoph Hellwig To: Christian Brauner Cc: Jan Kara , Christoph Hellwig , Dave Chinner , "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, Chandan Babu R Subject: Re: [PATCH] fs: handle freezing from multiple devices Message-ID: <20231106072137.GA17374@lst.de> References: <87bkccnwxc.fsf@debian-BULLSEYE-live-builder-AMD64> <20231103-vfs-multi-device-freeze-v1-1-fe922b30bfb6@kernel.org> <20231103141940.GA3732@lst.de> <20231103-leiht-funkverkehr-48ed8d425fd9@brauner> <20231103154352.2iz6rqhsjkvcxpyk@quack3> <20231103-herzform-fabelhaft-3a46cbe7de83@brauner> 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-herzform-fabelhaft-3a46cbe7de83@brauner> User-Agent: Mutt/1.5.17 (2007-11-01) On Fri, Nov 03, 2023 at 05:49:17PM +0100, Christian Brauner wrote: > > > > Is there a good reason to not just refcount the freezes in general? > > > > > > If we start counting freezes in general we break userspace as > > > freeze_super() is called from ioctl_fsfreeze() and that expects to > > > return EBUSY on an already frozen filesystem. xfs scrub might be another > > > user that might break if we change that. > > > > I guess Christoph meant that we'd count all the sb freezes into the > > refcount (what is now bdev_count) but without HOLDER_BDEV flag we will > > Ah, sorry I didn't get that from the message. That's also not what I meant :) Jan's suggestion makes a little more sense than mine, which I think would have been a good idea when we started from scratch, but does indeed feel dangerous now.