diff options
| author | Jakob Unterwurzacher | 2024-12-30 12:08:41 +0100 |
|---|---|---|
| committer | Jakob Unterwurzacher | 2026-07-16 22:07:54 +0200 |
| commit | 29000177b94c6c9aaab97b3f3d8ed5123ed7cf44 (patch) | |
| tree | a38f7dc81532664ad570cbe4944dc46f99f0cb43 /internal/fusefrontend/dircache.go | |
| parent | 836f4fc356ae860d8d3a323ada0bb0d71ed102bc (diff) | |
fusefrontend: sharedstorage: lock truncate agains concurrent access
Prevent reads and writes concurrent with the truncate operation. It's
racy on tmpfs and ext4 ( https://lore.kernel.org/all/18e9fa0f-ec31-9107-459c-ae1694503f87@gmail.com/t/ )
as evident by TestOpenTruncate test failures:
=== RUN TestOpenTruncate
cluster_test.go:209: POSIX compliance issue: non-exlusive create failed with err=file exists
doRead 16384215: corrupt block #0: cipher: message authentication failed
ino16384215 fh8: RMW read failed: errno=5
cluster_test.go:214: iteration 1: WriteAt: write /tmp/gocryptfs-test-parent-1026/1358464214/TestOpenTruncate.1788296708.mnt2/foo: input/output error
--- FAIL: TestOpenTruncate (0.06s)
FAIL
exit status 1
FAIL github.com/rfjakob/gocryptfs/v2/tests/cluster 7.880s
Relates-to: https://github.com/rfjakob/gocryptfs/issues/56
Diffstat (limited to 'internal/fusefrontend/dircache.go')
0 files changed, 0 insertions, 0 deletions
