]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
fuse2fs: allow O_APPEND and O_TRUNC opens
authorDarrick J. Wong <djwong@kernel.org>
Thu, 12 Jun 2025 00:13:34 +0000 (17:13 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 21 Aug 2025 00:00:54 +0000 (17:00 -0700)
commit6c6ce2d0c3cb7365c7ebe3457bcbc0e3874fe600
treeeff765540e2516f4b3b93f814a629fd1f37edd8d
parent6d6f7b7a1fba4cda551ab8851bc5172457bd3f13
fuse2fs: allow O_APPEND and O_TRUNC opens

Commit 9f69dfc4e275cc didn't quite get the permissions checking correct:

generic/362       - output mismatch (see /var/tmp/fstests/generic/362.out.bad)
    --- tests/generic/362.out   2025-04-30 16:20:44.563833050 -0700
    +++ /var/tmp/fstests/generic/362.out.bad    2025-06-11 17:04:24.061193618 -0700
    @@ -1,2 +1,3 @@
     QA output created by 362
    +Failed to open/create file: Operation not permitted
     Silence is golden
    ...
    (Run 'diff -u /run/fstests/bin/tests/generic/362.out /var/tmp/fstests/generic/362.out.bad'  to see the entire diff)

The kernel allows opening a file for append and truncation.  What it
doesn't allow is opening an append-only file for truncation.  Note that
this causes generic/079 to regress, but the root cause of that problem
is actually that fuse oddly supports FS_IOC_[GS]ETFLAGS but doesn't
actually set the VFS inode flags.

Cc: <linux-ext4@vger.kernel.org> # v1.47.3
Fixes: 9f69dfc4e275cc ("fuse2fs: implement O_APPEND correctly")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
misc/fuse2fs.c