From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B9976C77B73 for ; Tue, 23 May 2023 00:33:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6KbYUTYBak7uLC4q0yQVo1rkKM8wjFrTcTOYw8W4QhQ=; b=NeJFVympXTdskE My5a4o4z9arVmG7bXMedxTm60Q5jZQC5WSQiL/yk1zXZQ6ucn73BprDWvY1T2ni5guP4i9AZCywqj ZW4C4XVMrFZRHUrSMun3EmqtVwr5e1kYPiLyHn4Oos/0JmVgI3QmVO/Ttjlu+crFU6E7iXJx+QJb3 kdr193+5bFmrzH7QB6D8mzApeghL4rg7DWww46t934nSo7d02GkCMmwGCbGmDEQ51EjfEa15mk7ZY 7LwWKtwtPoEDYlGi9DeIKD5OGTcY9JDBn9LPAn4lDVcdQmpfgWXkQTP7zvIg1bRe8ESyt2UnTk6Ir FkLgVS4JvZBePghqeI+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1Fxf-008TtU-0Q; Tue, 23 May 2023 00:33:11 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1Fxb-008TrD-0f for kexec@lists.infradead.org; Tue, 23 May 2023 00:33:09 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A6AB362CEA; Tue, 23 May 2023 00:33:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D3D0C4339B; Tue, 23 May 2023 00:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684801986; bh=Wc57SKsFBDE16TH7waBFfpgF5H4uaoIYfuZNE4myOQo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V4LrZz2dEMvGM/CkhAugkjKp5JNmUzSX+WlbBTW4fEqMZ/fzjuXVhXME0AT1hhFqx saI8I2Tl6/aPd2k6zQUQ0nJvmaLaH8Kw51kXjaSWu0yWzd5do0SXJl5VkhcKZBc3nP bLroTTpGqKLxjZ+QU3h1pmSNqRVwuuGSD3b/5mVim3S0KuljSCzj+GKmVIYsh2cOmz 7yH84M7+INoTyxVyK4Y/WeA7hObG4hbdnLG6OvbUlrEfbNcMZ03Q+KGFeHJ1RPEWGX 2Ad78LOGwjG+a2vZjg1A2sMgJwpkKR0jQTNpxN73GrgbJsgF4e/fbDacxtHJqrs1u9 tu7yWqbY+fdzA== Date: Mon, 22 May 2023 17:33:05 -0700 From: "Darrick J. Wong" To: Luis Chamberlain Cc: Jan Kara , hch@infradead.org, song@kernel.org, rafael@kernel.org, gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk, bvanassche@acm.org, ebiederm@xmission.com, mchehab@kernel.org, keescook@chromium.org, p.raghav@samsung.com, linux-fsdevel@vger.kernel.org, kernel@tuxforce.de, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, xfs Subject: Re: [RFC v3 03/24] fs: distinguish between user initiated freeze and kernel initiated freeze Message-ID: <20230523003305.GD11620@frogsfrogsfrogs> References: <20230114003409.1168311-1-mcgrof@kernel.org> <20230114003409.1168311-4-mcgrof@kernel.org> <20230118092812.2gl3cde6mocbngli@quack3> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230522_173307_333602_39870E9F X-CRM114-Status: GOOD ( 27.20 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org On Sat, May 06, 2023 at 09:08:35PM -0700, Luis Chamberlain wrote: > On Wed, Jan 18, 2023 at 10:28:12AM +0100, Jan Kara wrote: > > On Tue 17-01-23 18:25:40, Darrick J. Wong wrote: > > > [add linux-xfs to cc on this one] > > > > > > On Fri, Jan 13, 2023 at 04:33:48PM -0800, Luis Chamberlain wrote: > > > > Userspace can initiate a freeze call using ioctls. If the kernel decides > > > > to freeze a filesystem later it must be able to distinguish if userspace > > > > had initiated the freeze, so that it does not unfreeze it later > > > > automatically on resume. > > > > > > Hm. Zooming out a bit here, I want to think about how kernel freezes > > > should behave... > > > > > > > Likewise if the kernel is initiating a freeze on its own it should *not* > > > > fail to freeze a filesystem if a user had already frozen it on our behalf. > > > > > > ...because kernel freezes can absorb an existing userspace freeze. Does > > > that mean that userspace should be prevented from undoing a kernel > > > freeze? Even in that absorption case? > > > > > > Also, should we permit multiple kernel freezes of the same fs at the > > > same time? And if we do allow that, would they nest like freeze used to > > > do? > > > > > > (My suggestions here are 'yes', 'yes', and '**** no'.) > > > > Yeah, makes sense to me. So I think the mental model to make things safe > > is that there are two flags - frozen_by_user, frozen_by_kernel - and the > > superblock is kept frozen as long as either of these is set. > > Makes sense to me. Just sent a patch for this, sorry it took a couple of weeks while I was busy merging in parent pointers... --D > Luis _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec