Skip to content

fuse: skip LOOKUP before exclusive create

Jimmy Zuber fuse-devel linux-kselftest 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Use INIT bit 46; bit 45 is FUSE_PASSTHROUGH_V2.
- Document that an existing name can fail with the error of a VFS check that runs before the request, such as -EROFS.
- Keep the test server's state mapped at teardown, where the server thread may still read it, and mount in a private mount namespace. Skip without /dev/fuse or kernel support. Test mknod() and link() of an existing name, and the dcache after each request.
- Rebase onto fuse for-next.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2fuse: skip LOOKUP before exclusive createfs/fuse/dir.c fs/fuse/fuse_i.h fs/fuse/inode.c +1 more+30 -20 replies
2/2selftests/fuse: test FUSE_EXCL_CREATEtools/testing/selftests/filesystems/fuse/.gitignore tools/testing/selftests/filesystems/fuse/Makefile tools/testing/selftests/filesystems/fuse/excl_create_test.c+389 -10 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/2] fuse: skip LOOKUP before exclusive create

mkdir(), mknod(), symlink(), link() and renameat2() with RENAME_NOREPLACE look the new name up with FUSE_LOOKUP before sending the request. This series adds an INIT flag, FUSE_EXCL_CREATE, with which the server fails these requests with -EEXIST for an existing name, so the kernel can skip the LOOKUP.

This series is independent of "fuse: atomic open" [1], which covers open(). Both add a 7.48 entry to the uapi changelog.

Tested with the new selftest under UML and KVM.

Changes in v2 (from the Sashiko review of v1 [2]):
- Use INIT bit 46; bit 45 is FUSE_PASSTHROUGH_V2.
- Document that an existing name can fail with the error of a VFS check that runs before the request, such as -EROFS.
- Keep the test server's state mapped at teardown, where the server thread may still read it, and mount in a private mount namespace. Skip without /dev/fuse or kernel support. Test mknod() and link() of an existing name, and the dcache after each request.
- Rebase onto fuse for-next.

v1: https://lore.kernel.org/fuse-devel/[email protected]/

[1] https://lore.kernel.org/fuse-devel/[email protected]/
[2] https://sashiko.dev/#/patchset/[email protected]

Jimmy Zuber (2):
fuse: skip LOOKUP before exclusive create
selftests/fuse: test FUSE_EXCL_CREATE

 fs/fuse/dir.c                                 |  10 +
 fs/fuse/fuse_i.h                              |   6 +
 fs/fuse/inode.c                               |   4 +-
 include/uapi/linux/fuse.h                     |  12 +-
 .../selftests/filesystems/fuse/.gitignore     |   1 +
 .../selftests/filesystems/fuse/Makefile       |   3 +-
 .../filesystems/fuse/excl_create_test.c       | 386 ++++++++++++++++++
 7 files changed, 419 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/filesystems/fuse/excl_create_test.c

base-commit: 9b1da7b4a4e197072e630c3b85d4100a399752ff

Signature · 1 line
2.50.1