Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lklfuse: vfs mount and open flags #545

Merged
merged 2 commits into from
Jun 27, 2024
Merged

Conversation

ddiss
Copy link

@ddiss ddiss commented Jun 25, 2024

The following changes since commit b8618cd3c65eec363c0b6052fbf7647952fcba98:

  lklfuse: enable fuse_config.use_ino (2024-06-04 14:32:52 +1000)

are available in the Git repository at:

  https://github.com/ddiss/linux lklfuse_vfs_open_flags

for you to fetch changes up to afa783baffc2255181c6c3af67c53494210eb5fc:

  lklfuse: map more open flags (2024-06-25 22:26:47 +1000)

----------------------------------------------------------------
David Disseldorp (2):
      lklfuse: parse mount flags
      lklfuse: map more open flags

 tools/lkl/lklfuse.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 144 insertions(+), 2 deletions(-)

tools/lkl/lklfuse.c Outdated Show resolved Hide resolved
ddiss added 2 commits June 27, 2024 14:26
Generic VFS mount options are normally parsed by the mount binary and
mapped to MS_X mount flags. lklfuse should do the same for kernel mount
options.
This implementation includes a simple string -> flag map, with
corresponding inverted noX flags.

Signed-off-by: David Disseldorp <[email protected]>
Proper open flag semantics are important for some applications and tests
such as xfstests generic/130 (for O_TRUNCATE). Pass all open flags from
fuse through to the corresponding LKL open syscall, with the exception
of O_CREAT, O_EXCL and O_NOCTTY, which fuse handles internally. Other
flags may also be filtered out by fuse.

Signed-off-by: David Disseldorp <[email protected]>
@ddiss ddiss force-pushed the lklfuse_vfs_open_flags branch from afa783b to b42cf5f Compare June 27, 2024 04:41
@ddiss
Copy link
Author

ddiss commented Jun 27, 2024

changes since v1:

  • add comment explaining opts \, and \= escapes
  • zero-terminate remaining_mopts in lklfuse_parse_vfs_flags() even if opts zero length

Copy link
Member

@tavip tavip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @ddiss ! We can ignore the x86_64_qemu failure, that test is flaky.

@tavip tavip merged commit 699f87c into lkl:master Jun 27, 2024
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants