From: Al Viro <viro@zeniv.linux.org.uk>
To: Eric Sandeen <sandeen@redhat.com>
Cc: v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, ericvh@kernel.org,
lucho@ionkov.net, asmadeus@codewreck.org,
linux_oss@crudebyte.com, eadavis@qq.com,
Remi Pommarel <repk@triplefau.lt>
Subject: Re: [PATCH V3 5/4] 9p: fix cache option printing in v9fs_show_options
Date: Tue, 2 Dec 2025 23:13:52 +0000 [thread overview]
Message-ID: <20251202231352.GF1712166@ZenIV> (raw)
In-Reply-To: <54b93378-dcf1-4b04-922d-c8b4393da299@redhat.com>
On Tue, Dec 02, 2025 at 04:30:53PM -0600, Eric Sandeen wrote:
> commit 4eb3117888a92 changed the cache= option to accept either string
> shortcuts or bitfield values. It also changed /proc/mounts to emit the
> option as the hexadecimal numeric value rather than the shortcut string.
>
> However, by printing "cache=%x" without the leading 0x, shortcuts such
> as "cache=loose" will emit "cache=f" and 'f' is not a string that is
> parseable by kstrtoint(), so remounting may fail if a remount with
> "cache=f" is attempted.
>
> Fix this by adding the 0x prefix to the hexadecimal value shown in
> /proc/mounts.
>
> Fixes: 4eb3117888a92 ("fs/9p: Rework cache modes and add new options to Documentation")
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
> index 05fc2ba3c5d4..d684cb406ed6 100644
> --- a/fs/9p/v9fs.c
> +++ b/fs/9p/v9fs.c
> @@ -148,7 +148,7 @@ int v9fs_show_options(struct seq_file *m, struct dentry *root)
> if (v9ses->nodev)
> seq_puts(m, ",nodevmap");
> if (v9ses->cache)
> - seq_printf(m, ",cache=%x", v9ses->cache);
> + seq_printf(m, ",cache=0x%x", v9ses->cache);
What's wrong with "cache=%#x"?
next prev parent reply other threads:[~2025-12-02 23:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 21:36 [PATCH V3 0/4] 9p: Convert to the new mount API Eric Sandeen
2025-10-10 21:36 ` [PATCH V3 1/4] fs/fs_parse: add back fsparam_u32hex Eric Sandeen
2025-10-10 21:36 ` [PATCH V3 2/4] net/9p: move structures and macros to header files Eric Sandeen
2025-10-10 21:36 ` [PATCH V3 3/4] 9p: create a v9fs_context structure to hold parsed options Eric Sandeen
2025-10-10 21:36 ` [PATCH V3 4/4] 9p: convert to the new mount API Eric Sandeen
2025-10-13 10:26 ` Dominique Martinet
2025-10-13 18:46 ` Eric Sandeen
2025-10-13 19:04 ` Dominique Martinet
2025-11-26 20:16 ` Remi Pommarel
2025-11-26 22:43 ` Dominique Martinet
2025-12-01 22:36 ` Eric Sandeen
2025-12-02 1:04 ` Dominique Martinet
2025-12-02 22:12 ` Eric Sandeen
2025-12-03 15:13 ` Dominique Martinet
2025-12-03 16:23 ` Eric Sandeen
2025-12-05 11:53 ` Remi Pommarel
2025-12-05 12:56 ` Dominique Martinet
2025-12-02 22:30 ` [PATCH V3 5/4] 9p: fix cache option printing in v9fs_show_options Eric Sandeen
2025-12-02 23:13 ` Al Viro [this message]
2025-12-03 1:09 ` Eric Sandeen
2025-12-03 15:04 ` Dominique Martinet
2025-12-03 18:04 ` Al Viro
2025-12-02 22:34 ` [PATCH V3 6/4] 9p: fix new mount API cache option handling Eric Sandeen
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=20251202231352.GF1712166@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=asmadeus@codewreck.org \
--cc=eadavis@qq.com \
--cc=ericvh@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=repk@triplefau.lt \
--cc=sandeen@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.