<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gocryptfs, branch LockSharedStorage</title>
<subtitle>Mirror of gocryptfs source code on Github</subtitle>
<id>http://nuetzlich.net/cgit/gocryptfs/atom?h=LockSharedStorage</id>
<link rel='self' href='http://nuetzlich.net/cgit/gocryptfs/atom?h=LockSharedStorage'/>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/'/>
<updated>2024-12-05T20:16:33+00:00</updated>
<entry>
<title>ci: allow manual execution</title>
<updated>2024-12-05T20:16:33+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2024-12-05T20:16:33+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=fda035ba73b9b80979a069385e88c7b0bc8268db'/>
<id>urn:sha1:fda035ba73b9b80979a069385e88c7b0bc8268db</id>
<content type='text'>
https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_dispatch
</content>
</entry>
<entry>
<title>fusefrontend: sharedstorage: add warnings for lock failure</title>
<updated>2023-06-19T11:35:29+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-19T11:35:29+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=15d34762ab9f375b9aa738119aa7e2dd1497102e'/>
<id>urn:sha1:15d34762ab9f375b9aa738119aa7e2dd1497102e</id>
<content type='text'>
Complain loudly when the underlying storage does not support
byte-range locks.

https://github.com/rfjakob/gocryptfs/issues/754
</content>
</entry>
<entry>
<title>fusefrontend: sharedstorage: retry read-path on EIO error</title>
<updated>2023-06-19T11:27:44+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-19T11:26:44+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=a97df8508a3f9bfc6d398c152bf15c6fcd98c74b'/>
<id>urn:sha1:a97df8508a3f9bfc6d398c152bf15c6fcd98c74b</id>
<content type='text'>
With -sharedstorage, when we get a decryption error, we lock the
byte range and try again.

This makes concurrent R/W safe agains torn writes.

https://github.com/rfjakob/gocryptfs/issues/754
</content>
</entry>
<entry>
<title>tests/cluster: enable TestClusterConcurrentRW per default</title>
<updated>2023-06-09T13:07:45+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T12:35:04+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=751acc4698aa299624a593745d0daf82f5a4fe10'/>
<id>urn:sha1:751acc4698aa299624a593745d0daf82f5a4fe10</id>
<content type='text'>
Add the -sharedstorage flag to the mounts and make it more
severe by adjusting the I/O and file sizes to arbitrary unaligned
values.

It passes *most of the time*.

If it fails, it's like this, and the reason is that there is no
fcntl locks in the READ path yet.

gocryptfs/tests/cluster$ go test -run TestClusterConcurrentRW -v
=== RUN   TestClusterConcurrentRW
doRead 2895433: corrupt block #0: cipher: message authentication failed
doRead 2895433: corrupt block #0: cipher: message authentication failed
doRead 2895433: corrupt block #0: cipher: message authentication failed
    cluster_test.go:98: readThread iteration 9165: ReadAt failed: read /var/tmp/gocryptfs-test-parent-1026/3021427391/TestClusterConcurrentRW.366469887.mnt1/foo: input/output error
 --- FAIL: TestClusterConcurrentRW (0.40s)
FAIL
exit status 1
FAIL	github.com/rfjakob/gocryptfs/v2/tests/cluster	0.406s
</content>
</entry>
<entry>
<title>fusefrontend: sharedstorage: add file content byte-range locks</title>
<updated>2023-06-09T13:07:45+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T12:34:20+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=d8f4bdb72a1bcef509fd3e4258c96f8f67db8203'/>
<id>urn:sha1:d8f4bdb72a1bcef509fd3e4258c96f8f67db8203</id>
<content type='text'>
As we must write complete ciphertext blocks (except at EOF), non-overlapping
plaintext writes can overlap in the ciphertext.
And because overlapping writes can turn the data into data soup (see
TestPoCTornWrite) we serialize them using fcntl locking.
</content>
</entry>
<entry>
<title>tests/cluster: add TestPoCTornWriteLocked</title>
<updated>2023-06-09T12:33:07+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T12:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=5ae35e904ab7b536a8c8c8a05cd8c69953b3b093'/>
<id>urn:sha1:5ae35e904ab7b536a8c8c8a05cd8c69953b3b093</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: note that ext4 provides no atomicity</title>
<updated>2023-06-09T05:50:11+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-09T05:50:11+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=1b4dc795bd0060bd64992f1355cbf197e0a20172'/>
<id>urn:sha1:1b4dc795bd0060bd64992f1355cbf197e0a20172</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests/cluster: simplify TestPoCTornWrite</title>
<updated>2023-06-09T05:30:04+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-08T19:35:45+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=5d78814da3786ed0786234ec5249723018274355'/>
<id>urn:sha1:5d78814da3786ed0786234ec5249723018274355</id>
<content type='text'>
Turns out we can get the same error with a simpler flow.
</content>
</entry>
<entry>
<title>tests/cluster: add TestPoCTornWrite</title>
<updated>2023-06-09T05:29:54+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-08T13:50:05+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=1418565a6b28a91f2f15d5b957d7fd31392a47a1'/>
<id>urn:sha1:1418565a6b28a91f2f15d5b957d7fd31392a47a1</id>
<content type='text'>
Scary. But explains why TestConcurrentCreate fails.

gocryptfs/tests/cluster$ go test -run TestPoCTornWrite
 --- FAIL: TestPoCTornWrite (0.00s)
    poc_test.go:210: iteration 214: inconsistent block: d6d6d6d6d6d6d6d6d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1d1
FAIL
</content>
</entry>
<entry>
<title>tests/cluster: TestConcurrentCreate: make sure buf2 is zero'ed</title>
<updated>2023-06-09T05:29:49+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-08T13:04:22+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=2b416942b0366c41672bf6bab69b2f1a1ceb5f5d'/>
<id>urn:sha1:2b416942b0366c41672bf6bab69b2f1a1ceb5f5d</id>
<content type='text'>
</content>
</entry>
</feed>
