linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Dominique Martinet <asmadeus@codewreck.org>
Cc: Remi Pommarel <repk@triplefau.lt>,
	v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, ericvh@kernel.org,
	lucho@ionkov.net, linux_oss@crudebyte.com, eadavis@qq.com
Subject: Re: [PATCH V3 4/4] 9p: convert to the new mount API
Date: Tue, 2 Dec 2025 16:12:36 -0600	[thread overview]
Message-ID: <13d4a021-908e-4dff-874d-d4cbdcdd71d4@redhat.com> (raw)
In-Reply-To: <aS47OBYiF1PBeVSv@codewreck.org>

On 12/1/25 7:04 PM, Dominique Martinet wrote:
> Eric Sandeen wrote on Mon, Dec 01, 2025 at 04:36:58PM -0600:
>> I suppose it would be a terrible hack to just extend the enum to include
>> hexadecimal "strings" like this, right.... ;)
> 
> Yeah, that might work for all intent and purposes but we'll get someone
> who mounted with cache=0x3 next... :)
> 
>> I think the right approach would be to just reinstate get_cache_mode() to
>> do open-coded parsing as before, and get rid of the enum for the cache
>> option.
> 
> This sounds good to me!
> 
>> Would you like me to send a patch 5/4, or an updated 4/4 to implement this,
>> or would you rather do it yourself if you think you have a better chance
>> of getting it right than I do?
> 
> No strong feeling either way but I think a 5/4 would be better to
> clarify why we do this -- I could probably do it as well but I'd
> definietly appreciate if you could do it (and I'll just have to make
> time to test at the end!)

Working on this, but something that confuses me about the current
(not for-next) code:

If I mount with "cache=loose" I see this in /proc/mounts:

127.0.0.1 /mnt 9p rw,relatime,uname=fsgqa,aname=/tmp/9,cache=f,access=user,trans=tcp 0 0

note the "cache=f" thanks to show_options printing "cache=%x"

"mount -o cache=f" is rejected, though, because "f" is not a parseable
number.

Shouldn't it be printing "cache=0xf" instead of "cache=f?"

(for some reason, though, in my test "remount -o,ro" does still work even with
"cache=f" in /proc/mounts but that seems to be a side effect of mount.9p trying
to use the new mount API when it shouldn't, or ...???)

I'll send my fix-up patch with a (maybe?) extra bugfix of printing
"cache=0x%x" in show_options, and you can see what you think... it could
be moved into a pure bugfix patch first if you agree.

thanks,
-Eric


  reply	other threads:[~2025-12-02 22:12 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 [this message]
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
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=13d4a021-908e-4dff-874d-d4cbdcdd71d4@redhat.com \
    --to=sandeen@redhat.com \
    --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=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;
as well as URLs for NNTP newsgroup(s).