Skip to contentSkip to conversation

autofs updates

GIT PULL Merged Christian Brauner 5 participants 10 messages Oct 27, 2023 – Nov 6, 2023 VFS

lore
Share & tools
lore

Christian Brauner

author maintainer
#0 lore raw

Hey Linus,

/* Summary */
This ports autofs to the new mount api. The patchset has existed for quite a while but never made it upstream. Ian picked it back up.

This also fixes a bug where fs_param_is_fd() was passed a garbage param->dirfd but it expected it to be set to the fd that was used to set param->file otherwise result->uint_32 contains nonsense. So make sure it's set.

One less filesystem using the old mount api. We're getting there, albeit rather slow. The last remaining major filesystem that hasn't converted is btrfs. Patches exist - I even wrote them - but so far they haven't made it upstream.

/* Testing */
clang: Debian clang version 16.0.6 (16)
gcc: gcc (Debian 13.2.0-5) 13.2.0

All patches are based on v6.6-rc2 and have been sitting in linux-next. No build failures or warnings were observed.

/* Conflicts */
At the time of creating this PR no merge conflicts were reported from linux-next and no merge conflicts showed up doing a test-merge with current mainline.

The following changes since commit ce9ecca0238b140b88f43859b211c9fdfd8e5b70:

Linux 6.6-rc2 (2023-09-17 14:40:24 -0700)

are available in the Git repository at:

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.7.autofs

for you to fetch changes up to d3c50061765d4b5616dc97f5804fc18122598a9b:

autofs: fix add autofs_parse_fd() (2023-10-24 11:04:45 +0200)

Please consider pulling these changes from the signed vfs-6.7.autofs tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.7.autofs

----------------------------------------------------------------
Christian Brauner (1):
fsconfig: ensure that dirfd is set to aux

Ian Kent (9):
autofs: refactor autofs_prepare_pipe()
autofs: add autofs_parse_fd()
autofs: refactor super block info init
autofs: reformat 0pt enum declaration
autofs: refactor parse_options()
autofs: validate protocol version
autofs: convert autofs to use the new mount api
autofs: fix protocol sub version setting
autofs: fix add autofs_parse_fd()

 fs/autofs/autofs_i.h |  20 ++-
 fs/autofs/init.c     |   9 +-
 fs/autofs/inode.c    | 435 +++++++++++++++++++++++++++++++--------------------
 fs/fsopen.c          |   1 +
 4 files changed, 283 insertions(+), 182 deletions(-)
#1 lore raw
Quoted 11 lines · Christian Brauner

Hey Linus,

/* Summary */
This ports autofs to the new mount api. The patchset has existed for quite a while but never made it upstream. Ian picked it back up.

This also fixes a bug where fs_param_is_fd() was passed a garbage param->dirfd but it expected it to be set to the fd that was used to set param->file otherwise result->uint_32 contains nonsense. So make sure it's set.

Quoted 4 lines

One less filesystem using the old mount api. We're getting there, albeit rather slow. The last remaining major filesystem that hasn't converted is btrfs. Patches exist - I even wrote them - but so far they haven't made it upstream.

Yes, looks like about 39 still to be converted.

Just for information, excluding btrfs, what would you like to see as the

priority for conversion (in case me or any of my colleagues get a chance

to spend a bit more time on it)?

Ian

author maintainer
#2 lore raw
Quoted 17 lines · Ian Kent
Quoted 11 lines · Christian Brauner

Hey Linus,

/* Summary */
This ports autofs to the new mount api. The patchset has existed for quite a while but never made it upstream. Ian picked it back up.

This also fixes a bug where fs_param_is_fd() was passed a garbage param->dirfd but it expected it to be set to the fd that was used to set param->file otherwise result->uint_32 contains nonsense. So make sure it's set.

Quoted 4 lines

One less filesystem using the old mount api. We're getting there, albeit rather slow. The last remaining major filesystem that hasn't converted is btrfs. Patches exist - I even wrote them - but so far they haven't made it upstream.

Quoted 8 lines

Yes, looks like about 39 still to be converted.

Just for information, excluding btrfs, what would you like to see as the

priority for conversion (in case me or any of my colleagues get a chance

to spend a bit more time on it)?

I think one way to prioritize them is by how likely they are to have (more than a couple) active users.

So recently I've done overlayfs because aside from btrfs that was probably one of the really actively used filesystems that hadn't yet been converted. And that did surface some regression

So 9p, fat, devpts, f2fs, zonefs, ext2 are pretty obvious targets. Judging from experience, the more mount options a filesystem has the bigger the conversion patch will usually be.

Another way is by function. For example, we expose mount_bdev() which is basically the legacy version of get_tree_bdev(). And they sort of are almost copies of each other. So converting all callers to the new mount api means we can get rid of mount_bdev(). But that's like 25 of the remaining 39.

But in the end any filesystem that is converted is great.

#3 lore raw
Quoted 36 lines · Christian Brauner
Quoted 16 lines · Ian Kent
Quoted 11 lines · Christian Brauner

Hey Linus,

/* Summary */
This ports autofs to the new mount api. The patchset has existed for quite a while but never made it upstream. Ian picked it back up.

This also fixes a bug where fs_param_is_fd() was passed a garbage param->dirfd but it expected it to be set to the fd that was used to set param->file otherwise result->uint_32 contains nonsense. So make sure it's set.

Quoted 4 lines

One less filesystem using the old mount api. We're getting there, albeit rather slow. The last remaining major filesystem that hasn't converted is btrfs. Patches exist - I even wrote them - but so far they haven't made it upstream.

Quoted 8 lines

Yes, looks like about 39 still to be converted.

Just for information, excluding btrfs, what would you like to see as the

priority for conversion (in case me or any of my colleagues get a chance

to spend a bit more time on it)?

I think one way to prioritize them is by how likely they are to have (more than a couple) active users.

So recently I've done overlayfs because aside from btrfs that was probably one of the really actively used filesystems that hadn't yet been converted. And that did surface some regression

So 9p, fat, devpts, f2fs, zonefs, ext2 are pretty obvious targets. Judging from experience, the more mount options a filesystem has the bigger the conversion patch will usually be.

Quoted 7 lines

Another way is by function. For example, we expose mount_bdev() which is basically the legacy version of get_tree_bdev(). And they sort of are almost copies of each other. So converting all callers to the new mount api means we can get rid of mount_bdev(). But that's like 25 of the remaining 39.

But in the end any filesystem that is converted is great.

Thanks Christian, I know Bill was considering spending a bit of time on

this and I may have some cycles myself in the not too distant future. But

things change all too quickly so we'll need to see how it goes, ;)

Ian

I'll

#4 lore raw
In reply to Ian Kent
Quoted 17 lines · Ian Kent
Quoted 11 lines · Christian Brauner

Hey Linus,

/* Summary */
This ports autofs to the new mount api. The patchset has existed for quite a while but never made it upstream. Ian picked it back up.

This also fixes a bug where fs_param_is_fd() was passed a garbage param->dirfd but it expected it to be set to the fd that was used to set param->file otherwise result->uint_32 contains nonsense. So make sure it's set.

Quoted 4 lines

One less filesystem using the old mount api. We're getting there, albeit rather slow. The last remaining major filesystem that hasn't converted is btrfs. Patches exist - I even wrote them - but so far they haven't made it upstream.

Quoted 8 lines

Yes, looks like about 39 still to be converted.

Just for information, excluding btrfs, what would you like to see as the

priority for conversion (in case me or any of my colleagues get a chance

to spend a bit more time on it)?

I'm just starting to have a look at zonefs as a candidate. -Bill

#5 lore raw
Quoted 20 lines · Bill O'Donnell
Quoted 19 lines · Ian Kent
Quoted 11 lines · Christian Brauner

Hey Linus,

/* Summary */
This ports autofs to the new mount api. The patchset has existed for quite a while but never made it upstream. Ian picked it back up.

This also fixes a bug where fs_param_is_fd() was passed a garbage param->dirfd but it expected it to be set to the fd that was used to set param->file otherwise result->uint_32 contains nonsense. So make sure it's set.

Quoted 4 lines

One less filesystem using the old mount api. We're getting there, albeit rather slow. The last remaining major filesystem that hasn't converted is btrfs. Patches exist - I even wrote them - but so far they haven't made it upstream.

Yes, looks like about 39 still to be converted.

Quoted 8 lines
Quoted 5 lines

Just for information, excluding btrfs, what would you like to see as the

priority for conversion (in case me or any of my colleagues get a chance

to spend a bit more time on it)?

I'm just starting to have a look at zonefs as a candidate. -Bill

And devpts looks fairly straight forward and is used a lot ... I'll see if

I can get time to get that one done, ;)

Ian

#6 lore raw
Quoted 23 lines · Ian Kent
Quoted 22 lines · Bill O'Donnell
Quoted 21 lines · Ian Kent
Quoted 11 lines · Christian Brauner

Hey Linus,

/* Summary */
This ports autofs to the new mount api. The patchset has existed for quite a while but never made it upstream. Ian picked it back up.

This also fixes a bug where fs_param_is_fd() was passed a garbage param->dirfd but it expected it to be set to the fd that was used to set param->file otherwise result->uint_32 contains nonsense. So make sure it's set.

Quoted 4 lines

One less filesystem using the old mount api. We're getting there, albeit rather slow. The last remaining major filesystem that hasn't converted is btrfs. Patches exist - I even wrote them - but so far they haven't made it upstream.

Yes, looks like about 39 still to be converted.

Just for information, excluding btrfs, what would you like to see as the

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

priority for conversion (in case me or any of my colleagues get a chance

to spend a bit more time on it)?

I'm just starting to have a look at zonefs as a candidate. -Bill

And devpts looks fairly straight forward and is used a lot ... I'll see if

Christian, David's original conversion patch for devpts looks like it's

still relevant, it also looks fairly small to the point that I'm wondering

if it's worth breaking it down into smaller patches.

Would you be ok with me just doing a straight patch apply, detailed review

and some testing before posting it?

David, are you ok with me resurrecting your conversion patch and posting it

on your behalf?

Ian

#7 lore raw
Quoted 2 lines · Ian Kent

David, are you ok with me resurrecting your conversion patch and posting it on your behalf?

Yes, that's fine.

David

author maintainer
#8 lore raw
In reply to Ian Kent
Quoted 5 lines

Christian, David's original conversion patch for devpts looks like it's

still relevant, it also looks fairly small to the point that I'm wondering

if it's worth breaking it down into smaller patches.

I vaguely remember that patch and no, for simple fses like devpts breaking this into smaller chunks is probably not worth it.

These conversions patches often aren't easy to split nicely anyway.

Quoted 3 lines

Would you be ok with me just doing a straight patch apply, detailed review

and some testing before posting it?

Sure.

merge bot Merged
#9 lore raw
In reply to Christian Brauner
The pull request you sent on Fri, 27 Oct 2023 16:33:41 +0200:

The pull request you sent on Fri, 27 Oct 2023 16:33:41 +0200:

Quoted 1 line

[email protected]:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.7.autofs

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0d63d8b2294b228147bf58def506dde35e57daef

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html