<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gocryptfs/internal/fusefrontend/node.go, branch unlinked_fsync</title>
<subtitle>Mirror of gocryptfs source code on Github</subtitle>
<id>http://nuetzlich.net/cgit/gocryptfs/atom?h=unlinked_fsync</id>
<link rel='self' href='http://nuetzlich.net/cgit/gocryptfs/atom?h=unlinked_fsync'/>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/'/>
<updated>2026-08-30T20:49:34+00:00</updated>
<entry>
<title>fusefrontend: take ContentLock for truncate through node.Setattr</title>
<updated>2026-08-30T20:49:34+00:00</updated>
<author>
<name>max</name>
</author>
<published>2026-08-17T01:15:41+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=9c2130d6c2e54c45c6787fbc49a896a8544a5e47'/>
<id>urn:sha1:9c2130d6c2e54c45c6787fbc49a896a8544a5e47</id>
<content type='text'>
node.Setattr opens its own file handle and called truncate directly,
without ContentLock. truncate ends in doWrite, which documents that the
caller holds that lock, and file.Setattr and Allocate both take it.

Besides leaving a path truncate unserialized against concurrent writes,
this skipped the write-operation counter that ContentLock.Lock()
increments. isConsecutiveWrite() reads that counter to notice foreign
modifications, so an already-open handle kept assuming its next write
appends, skipped writePadHole() and grew the file past a short last
block. That block no longer decrypted, and every later operation on the
file failed with EIO.

Fixes #1024
</content>
</entry>
<entry>
<title>fusefrontend: make translateSize Stat_t/Statx_t agnostic</title>
<updated>2026-07-22T19:51:40+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2026-07-22T19:49:43+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=b3b292a8a3c1478b769e213e0e590f38cb1b923c'/>
<id>urn:sha1:b3b292a8a3c1478b769e213e0e590f38cb1b923c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fusefronted: fake fstat for deleted fifos</title>
<updated>2025-06-15T18:11:06+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-06-15T17:52:21+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=4ef2678917ddc26ab8e5f64a3158720da6e0a5d1'/>
<id>urn:sha1:4ef2678917ddc26ab8e5f64a3158720da6e0a5d1</id>
<content type='text'>
git test suite t9300-fast-import.sh test 245 does the equivalent of this:

	mkfifo fifo
	exec 8&lt;&gt;fifo
	rm fifo
	cat /dev/null &gt;&amp;8

This used to fail with

	cat: standard output: No such file or directory

because cat tries to fstat stdout.

The open() on the fifo does not reach the filesystem, so we don't
have an fd open for the delted file, hence no way to access it.

Fake fstat success as good as we can to make cat happy.

Fixes https://github.com/rfjakob/gocryptfs/issues/929
</content>
</entry>
<entry>
<title>fusefrontend: fix unconditional FileGetattrer cast</title>
<updated>2025-03-26T21:50:54+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-03-26T21:50:54+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=810f074e75b4251b1520843b42c204e5a6e376d8'/>
<id>urn:sha1:810f074e75b4251b1520843b42c204e5a6e376d8</id>
<content type='text'>
Essentially a port of
https://github.com/hanwen/go-fuse/commit/531a68551e40e7303e94b53fb3792e6dfb28d15a .

This fixes

	panic: interface conversion: *fs.dirStreamAsFile is not fs.FileGetattrer: missing method Getattr

	goroutine 20 [running]:
	github.com/rfjakob/gocryptfs/v2/internal/fusefrontend.(*Node).Getattr(0x55a7ac9d9090?, {0x55a7ac85a4d8, 0xc0013401c8}, {0x55a7ac80eb40?, 0xc0013401b0}, 0xc000586938)
		github.com/rfjakob/gocryptfs/v2/internal/fusefrontend/node.go:74 +0x22c
	github.com/hanwen/go-fuse/v2/fs.(*rawBridge).getattr(0xc0000b6180, {0x55a7ac85a4d8, 0xc0013401c8}, 0xc0010ea160, {0x55a7ac80eb40?, 0xc0013401b0}, 0xc000586938)
		github.com/hanwen/go-fuse/v2@v2.7.2/fs/bridge.go:569 +0x9b
	[...]

which is a bug exposed by a go-fuse update.

Fixes https://github.com/rfjakob/gocryptfs/issues/897
</content>
</entry>
<entry>
<title>fusefrontend: implement our own Access()</title>
<updated>2023-05-17T21:26:56+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-05-17T21:26:56+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=09954c4bdecf0ca6da65776f176dc934ffced2b0'/>
<id>urn:sha1:09954c4bdecf0ca6da65776f176dc934ffced2b0</id>
<content type='text'>
Not having Access() means go-fuse emulates it by looking at Getattr().
This works fine most of the time, but breaks down on sshfs, where
sshfs-benchmark.bash shows this:

	gocryptfs/tests$ ./sshfs-benchmark.bash nuetzlich.net
	working directory: /tmp/sshfs-benchmark.bash.JQC
	sshfs mounted: nuetzlich.net:/tmp -&gt; sshfs.mnt
	gocryptfs mounted: sshfs.mnt/sshfs-benchmark.bash.Wrz/gocryptfs.crypt -&gt; gocryptfs.mnt

	sshfs-benchmark.bash:    sshfs  gocryptfs-on-sshfs
	git init                  3.98                6.80
	rsync                     7.71               10.84
	rm -R                     4.30rm: descend into write-protected directory 'gocryptfs.mnt/git1'?

The go-fuse emulation gets it wrong here because sshfs reports
permissions but does not enforce them.

Implement it ourselves properly.
</content>
</entry>
<entry>
<title>fusefrontent: report correct size on hard link creation</title>
<updated>2023-03-29T20:16:14+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-03-29T20:16:14+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=24b3978715186bed3edc2703e81f165a73c0a74a'/>
<id>urn:sha1:24b3978715186bed3edc2703e81f165a73c0a74a</id>
<content type='text'>
And add a test for it.

Fixes https://github.com/rfjakob/gocryptfs/issues/724
</content>
</entry>
<entry>
<title>fusefrontend: support RENAME_WHITEOUT, RENAME_EXCHANGE</title>
<updated>2022-01-22T11:28:27+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2022-01-22T11:28:27+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=b7cac4ffd07733ab6bcd0d33345de3306a8a5a59'/>
<id>urn:sha1:b7cac4ffd07733ab6bcd0d33345de3306a8a5a59</id>
<content type='text'>
Both new internal test and xfstests generic/013 are happy.

https://github.com/rfjakob/gocryptfs/issues/641
</content>
</entry>
<entry>
<title>fusefrontend: fix -force_owner not affecting MKNOD</title>
<updated>2022-01-10T19:05:36+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2022-01-10T19:05:36+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=5f955423b736d56b5b741fbd1b853c83044aa0fe'/>
<id>urn:sha1:5f955423b736d56b5b741fbd1b853c83044aa0fe</id>
<content type='text'>
Fixes https://github.com/rfjakob/gocryptfs/issues/629
</content>
</entry>
<entry>
<title>fusefrontend: honor ForceOwner for LOOKUP and CREATE operations</title>
<updated>2021-10-15T15:35:12+00:00</updated>
<author>
<name>Charles Duffy</name>
</author>
<published>2021-10-08T20:54:41+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=8ec872e330985a2de87c3b15d6c49ab9e3281573'/>
<id>urn:sha1:8ec872e330985a2de87c3b15d6c49ab9e3281573</id>
<content type='text'>
</content>
</entry>
<entry>
<title>go mod: declare module version v2</title>
<updated>2021-08-23T13:05:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2021-08-23T13:05:15+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=69d88505fd7f4cb0d9e4f1918de296342fe05858'/>
<id>urn:sha1:69d88505fd7f4cb0d9e4f1918de296342fe05858</id>
<content type='text'>
Our git version is v2+ for some time now, but go.mod
still declared v1. Hopefully making both match makes
https://pkg.go.dev/github.com/rfjakob/gocryptfs/v2 work.

All the import paths have been fixed like this:

  find . -name \*.go | xargs sed -i s%github.com/rfjakob/gocryptfs/%github.com/rfjakob/gocryptfs/v2/%
</content>
</entry>
</feed>
