linux-apfs-rw
linux-apfs-rw copied to clipboard
Mounting with -o cknodes,readwrite shows problem
While writing a simple test for NixOS, I experimented a bit and found a problem. This is what I did:
-
truncate -s 1G /tmp/tmp.img
-
losetup -f /tmp/tmp.img
-
mkapfs /dev/loop0
-
mkdir /mnt/tmp
-
mount -o cknodes,readwrite /dev/loop0 /mnt/tmp
-
touch /mnt/tmp/testfile
fails with "touch: cannot touch '/mnt/tmp/testfile': Bad message" - "APFS (86g): bad checksum for the space manager" and "APFS (86g): aborting transaction" appear in dmesg
Is this a known problem?
I don't think I had noticed, no; thanks for the report. I never try the cknodes
option, so I'm guessing it never worked with readwrite
at all. It's not a big priority though, so it may take me a couple of weeks to get to it.
I just pushed a patch for this before the release. I won't ask you to confirm it since it's been so long since the report, but I ran all my write tests with cknodes enabled and it seems to work. As always feel free to reopen if you disagree.
Yep, I can also confirm that it seems to work now, thanks.