linux-apfs-rw icon indicating copy to clipboard operation
linux-apfs-rw copied to clipboard

Mounting with -o cknodes,readwrite shows problem

Open Luflosi opened this issue 3 years ago • 1 comments

While writing a simple test for NixOS, I experimented a bit and found a problem. This is what I did:

  1. truncate -s 1G /tmp/tmp.img
  2. losetup -f /tmp/tmp.img
  3. mkapfs /dev/loop0
  4. mkdir /mnt/tmp
  5. mount -o cknodes,readwrite /dev/loop0 /mnt/tmp
  6. touch /mnt/tmp/testfile fails with "touch: cannot touch '/mnt/tmp/testfile': Bad message"
  7. "APFS (86g): bad checksum for the space manager" and "APFS (86g): aborting transaction" appear in dmesg

Is this a known problem?

Luflosi avatar Jul 10 '21 15:07 Luflosi

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.

eafer avatar Jul 17 '21 00:07 eafer

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.

eafer avatar Jan 31 '23 03:01 eafer

Yep, I can also confirm that it seems to work now, thanks.

Luflosi avatar Jan 31 '23 16:01 Luflosi