From: Tingmao Wang <m@maowtm.org>
To: Dominique Martinet <asmadeus@codewreck.org>
Cc: "Christian Schoenebeck" <linux_oss@crudebyte.com>,
"Eric Van Hensbergen" <ericvh@kernel.org>,
"Dan Carpenter" <dan.carpenter@linaro.org>,
"Latchesar Ionkov" <lucho@ionkov.net>,
"Mickaël Salaün" <mic@digikod.net>,
v9fs@lists.linux.dev, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] fs/9p: delete unnnecessary condition
Date: Sat, 25 Oct 2025 16:39:10 +0100 [thread overview]
Message-ID: <73432e36-de5b-48fb-b314-052b2668bb8e@maowtm.org> (raw)
In-Reply-To: <aPuAXaHNWMhZOeuv@codewreck.org>
On 10/24/25 14:34, Dominique Martinet wrote:
> [...]
> Anyway, thanksfully this particular double retval < 0 check is harmless
> -- I'll pick this up for -next for now but hopefully we'll be able to
> "revert the revert" and fix the other problems Tingmao pointed out by
> the time we reach the 6.19 merge window...
I'm hoping that the solution I proposed [1], which is to pass
V9FS_STAT2INODE_KEEP_ISIZE in v9fs_refresh_inode_dotl if v9ses->cache &
(CACHE_LOOSE | CACHE_WRITEBACK), would be good enough to prevent these
sorts of issues. But given I've already missed a thing the first time,
I'm less confident in my judgement now 😅
(The other alternative I see is to flush the cache before updating
metadata, like we do in v9fs_vfs_getattr, but then that's a even larger
change, and I'm also not sure if it would be race-free (i.e. if another
write is processed after we flush but before we refresh metadata))
I can try and do some more testing on this, and would welcome pointers on
things to try. Also let me know if you think the above suggestion
(V9FS_V9FS_STAT2INODE_KEEP_ISIZE) is safe on its own.
(Also, for some context, the main victim of this stale metadata issue,
afaik, is just the workaround for Landlock to work on 9pfs, in which we
get something to deliberately hold the paths used in rules open for the
inode to be reused. Although I guess some other workloads which do a
similar thing might also suffer from this so still good to get this (stale
metadata issue) fixed. I hope we eventually come to a proper solution for
the Landlock issue tho)
[1]: https://lore.kernel.org/all/6c74ad63-3afc-4549-9ac6-494b9a63e839@maowtm.org/
prev parent reply other threads:[~2025-10-25 15:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 11:26 Dan Carpenter
2025-10-24 11:59 ` Christian Schoenebeck
2025-10-24 13:34 ` Dominique Martinet
2025-10-25 15:39 ` Tingmao Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73432e36-de5b-48fb-b314-052b2668bb8e@maowtm.org \
--to=m@maowtm.org \
--cc=asmadeus@codewreck.org \
--cc=dan.carpenter@linaro.org \
--cc=ericvh@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=mic@digikod.net \
--cc=v9fs@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®