<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gocryptfs/internal, branch LockSharedStorage_rebase1</title>
<subtitle>Mirror of gocryptfs source code on Github</subtitle>
<id>http://nuetzlich.net/cgit/gocryptfs/atom?h=LockSharedStorage_rebase1</id>
<link rel='self' href='http://nuetzlich.net/cgit/gocryptfs/atom?h=LockSharedStorage_rebase1'/>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/'/>
<updated>2024-12-30T11:08:41+00:00</updated>
<entry>
<title>fusefrontend: sharedstorage: lock truncate agains concurrent access</title>
<updated>2024-12-30T11:08:41+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2024-12-30T11:08:41+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=b11aeec30866fe97b3c23488d51a47a040991b04'/>
<id>urn:sha1:b11aeec30866fe97b3c23488d51a47a040991b04</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>fusefrontend: sharedstorage: add warnings for lock failure</title>
<updated>2024-12-13T20:21:15+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=8d2078b9cceaedd76a86f339165d0211cd78c8d9'/>
<id>urn:sha1:8d2078b9cceaedd76a86f339165d0211cd78c8d9</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>2024-12-13T20:21:15+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=5c91672f190316d17f2293cb6f9602eac94b8b83'/>
<id>urn:sha1:5c91672f190316d17f2293cb6f9602eac94b8b83</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>fusefrontend: sharedstorage: add file content byte-range locks</title>
<updated>2024-12-13T20:21:15+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=321471f513646663fcb6b9037dd85ffef52f558a'/>
<id>urn:sha1:321471f513646663fcb6b9037dd85ffef52f558a</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>fusefrontend: sharedstorage: keep file header on truncate</title>
<updated>2024-12-13T20:21:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-05T12:22:21+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=433f7d7379b9533611957644c5ee7a5ad15542eb'/>
<id>urn:sha1:433f7d7379b9533611957644c5ee7a5ad15542eb</id>
<content type='text'>
With -sharedstorage, we keep the on-disk file header.
Other mounts may have the file ID cached so we cannot mess with it.

This makes TestOpenTruncate pass.
</content>
</entry>
<entry>
<title>fusefrontend: sharedstorage: use byte-range lock on file header creation</title>
<updated>2024-12-04T18:53:15+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2023-06-02T12:24:44+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=8f76d1ea0a63f546ad09fa70be1ed7b6a7d29fe6'/>
<id>urn:sha1:8f76d1ea0a63f546ad09fa70be1ed7b6a7d29fe6</id>
<content type='text'>
Multiple host writing to the same empty file at the same time
could have overwritten each other's newly created file header,
leading to data corruption.

Fix the race by placing a byte-range lock on the file when
creating the file header.
</content>
</entry>
<entry>
<title>passfile: drop byte counter from trailing garbage warning</title>
<updated>2024-12-04T18:06:56+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2024-12-04T17:55:21+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=11f338f74fffc94bf16cea834aafccda30bd1240'/>
<id>urn:sha1:11f338f74fffc94bf16cea834aafccda30bd1240</id>
<content type='text'>
We don't know the exact value as we only read 2kiB.

Relates-to: https://github.com/rfjakob/gocryptfs/discussions/882
</content>
</entry>
<entry>
<title>Report inode number for the root node</title>
<updated>2024-11-11T21:33:07+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2024-11-11T21:27:42+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=86891054ef2a5d1b0b59c7c140aae284e7c5bd87'/>
<id>urn:sha1:86891054ef2a5d1b0b59c7c140aae284e7c5bd87</id>
<content type='text'>
Now that https://github.com/hanwen/go-fuse/issues/399 has
landed we can report an inode number for the root node.

Fixes https://github.com/rfjakob/gocryptfs/issues/580
</content>
</entry>
<entry>
<title>reverse: fix import sorting in root_node.go</title>
<updated>2024-11-11T21:33:07+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2024-11-11T21:26:55+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=12c0f3a0bdd11444b8bf880af7c63ea7850391f2'/>
<id>urn:sha1:12c0f3a0bdd11444b8bf880af7c63ea7850391f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ctlsock: delete colliding orphaned socket file</title>
<updated>2024-09-03T14:01:46+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2024-09-03T14:00:24+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=2c01b1ab3774ace723b2700fc539dda5f0350633'/>
<id>urn:sha1:2c01b1ab3774ace723b2700fc539dda5f0350633</id>
<content type='text'>
Detect and delete an orphaned socket file that collides with
the ctlsock we want to create.

Fixes https://github.com/rfjakob/gocryptfs/issues/776
</content>
</entry>
</feed>
