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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9607EC71148 for ; Fri, 13 Jun 2025 15:19:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1CAE26B007B; Fri, 13 Jun 2025 11:19:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 154EB6B0089; Fri, 13 Jun 2025 11:19:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01CD86B0092; Fri, 13 Jun 2025 11:18:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D36566B007B for ; Fri, 13 Jun 2025 11:18:59 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 6BD6ABCBE3 for ; Fri, 13 Jun 2025 15:18:59 +0000 (UTC) X-FDA: 83550735198.24.26D5BA3 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf26.hostedemail.com (Postfix) with ESMTP id A7E08140005 for ; Fri, 13 Jun 2025 15:18:57 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=AtlrWRtf; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of pratyush@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=pratyush@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1749827937; a=rsa-sha256; cv=none; b=VzU8WK/SvLc7caG7pdcqJ8WN+olr6OilH0woLimv/jCPejGje/gV68vZfkOdo2cEYvvaGp IJSegiP8k1FUHkz8TLuw3fJ8tuEDLSUmm+zOZHeaXjGPijsLvcbPLlvwQ1S7BqLo1Dg6vp t1QZ1DpUSdkJobvF3v5JyZ79xFkDHqc= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=AtlrWRtf; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of pratyush@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=pratyush@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1749827937; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0FTMnUt2nglL0/z86ym/gq/vQlFWySpMUeX9hwtRKJ4=; b=j0GuWrlXRkEQ9mA0QWzOIirdxkb6+fXwJTn8Bplm+kqw0limYrEI8bP3gPKBId0Nie1Mlg XWFnVd7nALzOVf9ke7xiD6+HLmU/9+xJj6PCNb+o5Fa6FK3BcAtoUYHqhNqXg4NE99iwbQ ILEXeLCB8eGP1RjF8yuCMh1sBtI+/cs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E41B55C4210; Fri, 13 Jun 2025 15:16:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6303C4CEED; Fri, 13 Jun 2025 15:18:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749827936; bh=d3YgWUVRWKg58VispgWHX09hXScELBYDKFXpt5XFraA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=AtlrWRtf2Kufmhvu5sy7r4LAHiaKOtkOzUBYatM6VCdu4h4cdfyZ7e9hfIfV7mCyx ccQYIUKTJuWgUJhUU30EEnoxLXhW81Y9ac5mLTjrgI6Hqx/KBcBC9WB0Vu9ejdxrc+ ciKSzbU5xZr9qlKs/K+Lp83FIbR/TAurjRs91YSsdOuLosVOumwAgwHhRDENTCj4vQ Of5fndiZVPFw9gI/4BoLOPv0TWOii5uiJhz2QfWsz0eVcT133/3aWXfGIitCMN3uJ2 pdYFRjlBI+QGV/Megpp+qYfBOu9IdSf/m6eSHwQMzqkJM7ymQXGpc/oFkyu+RV/HhD 29BkcFt1Nmpiw== From: Pratyush Yadav To: Pasha Tatashin Cc: Pratyush Yadav , jasonmiu@google.com, graf@amazon.com, changyuanl@google.com, rppt@kernel.org, dmatlack@google.com, rientjes@google.com, corbet@lwn.net, rdunlap@infradead.org, ilpo.jarvinen@linux.intel.com, kanie@linux.alibaba.com, ojeda@kernel.org, aliceryhl@google.com, masahiroy@kernel.org, akpm@linux-foundation.org, tj@kernel.org, yoann.congal@smile.fr, mmaurer@google.com, roman.gushchin@linux.dev, chenridong@huawei.com, axboe@kernel.dk, mark.rutland@arm.com, jannh@google.com, vincent.guittot@linaro.org, hannes@cmpxchg.org, dan.j.williams@intel.com, david@redhat.com, joel.granados@kernel.org, rostedt@goodmis.org, anna.schumaker@oracle.com, song@kernel.org, zhangguopeng@kylinos.cn, linux@weissschuh.net, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, gregkh@linuxfoundation.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, rafael@kernel.org, dakr@kernel.org, bartosz.golaszewski@linaro.org, cw00.choi@samsung.com, myungjoo.ham@samsung.com, yesanishhere@gmail.com, Jonathan.Cameron@huawei.com, quic_zijuhu@quicinc.com, aleksander.lobakin@intel.com, ira.weiny@intel.com, andriy.shevchenko@linux.intel.com, leon@kernel.org, lukas@wunner.de, bhelgaas@google.com, wagi@kernel.org, djeffery@redhat.com, stuart.w.hayes@gmail.com Subject: Re: [RFC v2 09/16] luo: luo_files: implement file systems callbacks In-Reply-To: References: <20250515182322.117840-1-pasha.tatashin@soleen.com> <20250515182322.117840-10-pasha.tatashin@soleen.com> Date: Fri, 13 Jun 2025 17:18:47 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam01 X-Stat-Signature: 54sh7er75kbia6ureo6egmn7p6oqxmoc X-Rspamd-Queue-Id: A7E08140005 X-Rspam-User: X-HE-Tag: 1749827937-293466 X-HE-Meta: U2FsdGVkX1827tCOMx/ctDc7gR+v/zd6eUilj9klU03VFHem+J4YQF7Gfxo7PnBpF/jheDv4GFOaVaCM91gXY3DcLbenY3KMXtxSGdjmY6uosHfOepdEMpWtPr0rqRt9/mpq+jGZnJAgcDtwTZle56elC3A8MLw0ZMyqMaWFr0oHCmY+KpYOSsM3bVngRFRC0Q7b8KVpRAhGM5MLxcosoXruQgFXItOXQor59lEdA/5QhoI5jtWyWP0yygaoxrm3eyqviL8Kqai2mbkscJjap3LgbIK96PhVrtsHhyK3zQpPKoGlD3OR1tNwjCefrbpKJjJxv5cZLsCArDvHka9FbBSWp2sz2b3JgGYX06AThwbh2YU54OpdhMsCbxCoO/tECWsers44hBirORdzsB4gVLutOz/w+63BWL440GWEtYpjQR4zJNKDJxbIVCcOuXDrjBzBmLHmxc6E1XdpB9Hv4ZcV0fnqzD8Ghx1rtij7llye0IXDt60Urslv8G6Zut1OIXwRaXgTRSOEZqeT3gYEkrWrGKart7uSaWBbZGfyqpmlJGXDBewMCxlEL3ikVRoWYFx3szklMEOXMzJuyCHVG4kgRQCQJUtg/Xey/hIRCHvhSaVQnJMPVxWtavbN9u+S8FyizkRzBDf9dLtGwgoveZo5ptc+SEICs/BY7XtFEBzaufWGhcS0Y0b6pmNZFVoqXVf1uvvKgUg/wZlAXM850zJZgvSulWfQn+9GZMDi8yUGqZ+UTqRWnq42kj0Upb1mCoRS3NJhUh9EaTfh/j3NK2HmrH2jy+ttcdLHOI2C9rGNLLhxBB0ASrpB/zz2GZt/Ud8FKOpvRPHcuKKA7fjYQHIO7P2G0oxdj08kWSYET1hKd7oNKV2+F+5lHJtf50ayDwK96P9fpguJ7F/Q3ubcqxJvD3LWouhEWI3+4tczxljOvezOnQ2gTGGMvDTciPXUjIAfIk6LxuP+/Y0FiMe egyY7+BG yycvF37Hbfn3N5vv+Q4E2kJ3A/QuBheWlVDZUjGpRBM2AVYWXBcsitfkTVhe2y48MloxVi5QZiFmOMLbFIa3DoEJFTl9uCVkUUpUFgC45hqxmWzyIav6hU1Oqjz7UnLl8T3V+yzKUEN3X5k/hlZ7AR4dDsWMrQ/QKCaQwtzjuGXfna9oI9ORtvxpZciVQ1IX09rKkcH4+lJFwtbM7VXQgpcCn01W6mI+8sOy5M32HZ7PzSqEmSGDoN65V8pYBezyooJ3SFd7gFHt8Gz0imtJCdwjjUUOx1yM7/nUGhvW6PB/czpBrtK6xwnTnqr4qULAEyd8EYLYSszNhJjEX0hOnVmCvjPRadWFDvPrCaI8v5w+hzwc6ECl2PqIrMkRTV+OXUAN0wDL1hw+CW4ySEE0c3VXmtUit76UYVGuNvoKjzUPk658= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Sun, Jun 08 2025, Pasha Tatashin wrote: > On Thu, Jun 5, 2025 at 12:04=E2=80=AFPM Pratyush Yadav wrote: >> >> On Thu, May 15 2025, Pasha Tatashin wrote: >> >> > Implements the core logic within luo_files.c to invoke the prepare, >> > reboot, finish, and cancel callbacks for preserved file instances, >> > replacing the previous stub implementations. It also handles >> > the persistence and retrieval of the u64 data payload associated with >> > each file via the LUO FDT. >> > >> > This completes the core mechanism enabling registered filesystem >> > handlers to actively manage file state across the live update >> > transition using the LUO framework. >> > >> > Signed-off-by: Pasha Tatashin >> > --- >> > drivers/misc/liveupdate/luo_files.c | 105 +++++++++++++++++++++++++++- >> > 1 file changed, 103 insertions(+), 2 deletions(-) >> > >> [...] >> > @@ -305,7 +369,29 @@ int luo_do_files_prepare_calls(void) >> > */ >> > int luo_do_files_freeze_calls(void) >> > { >> > - return 0; >> > + unsigned long token; >> > + struct luo_file *h; >> > + int ret; >> > + >> > + xa_for_each(&luo_files_xa_out, token, h) { >> >> Should we also ensure at this point that there are no open handles to >> this file? How else would a file system ensure the file is in quiescent >> state to do its final serialization? > > Do you mean check refcnt here? If so, this is a good idea, but first > we need to implement the lifecycle of liveupdate agent correctectly, > where owner of FD must survive through entering into reboot() with > /dev/liveupdate still open. Yes, by this point we should ensure refcnt =3D=3D 1. IIUC you plan to implement the lifecycle change in the next revision, so this can be added there as well I suppose. [...] --=20 Regards, Pratyush Yadav