Skip to content

9p: Convert to the new mount API

Eric Sandeen linux-fsdevel lkml v9fs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 18 repliesIn review
  2. v24 patches 11 repliesSuperseded
  3. v1 RFC4 patches 4 repliesSuperseded

Changes from V1 to V2 from the cover letter

Address "make W=1" warnings from kernel test robot, comments from dhowells, and some kernel-doc comments for changed arguments.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4fs/fs_parse: add back fsparam_u32hexinclude/linux/fs_parser.h+2 -00 replies
2/4net/9p: move structures and macros to header filesinclude/net/9p/client.h include/net/9p/transport.h net/9p/client.c +2 more+49 -470 replies
3/49p: create a v9fs_context structure to hold parsed optionsinclude/net/9p/client.h include/net/9p/transport.h+90 -320 replies
4/49p: convert to the new mount APIfs/9p/v9fs.c fs/9p/v9fs.h fs/9p/vfs_super.c +9 more+411 -65218 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH V3 0/4] 9p: Convert to the new mount API

This is another updated attempt to convert 9p to the new mount API. 9p is one of the last conversions needed, possibly because it is one of the trickier ones!

This has had only light testing. I confirmed that with the diod server, both of these mount successfully:

# mount -t 9p -o aname=/tmp/9,version=9p2000.L,uname=fsgqa,access=user,trans=tcp 127.0.0.1 /mnt

and

# mount.diod localhost:/tmp/9 /mnt

(The latter passes trans=fd under the covers)

I have not been able to test other transports, or exhaustively test functionality of all mount options.

Changes from V1 to V2:
Address "make W=1" warnings from kernel test robot, comments from dhowells, and some kernel-doc comments for changed arguments.

Changes from V2 to V3:

Patch 1:
None
Patch 2:
None
Patch 3:
Change to not re-use v9fs_session_info and p9_client in the v9fs_context structure. Instead, new structures p9_client_opts and p9_session_opts are introduced. This avoids confusion about what is used only for option parsing, and what is used for the actual mounted instance.
Patch 4:
Allows unknown mount options as prior code did. I noticed that mount.diod passes a "rwdepth" option by default, which was ignored previously but breaks mount with strict unknown option rejection.

Adjust variable names in v9fs_parse_param, v9fs_apply_options, and v9fs_init_fs_context to reflect new context structure and to clarify difference.

Limit the msize option to INT_MAX as the old code did.

Remove redundant v9fs_set_super function, set_anon_super is enough.

Properly extract v9fs_seesion_info from sb->s_fs_info, not the fc context, in v9fs_fill_super. (thanks [email protected])

Remove unneeded fc arg from v9fs_fill_super.