Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
range invalidate to grow file sees zero content #237
This bug happens with OSXFUSE 3.0.6.
Here's a sample session from Linux:
$ cat mnt/hello hello, world $ cat mnt/hello hello, world goodbye
Here's the observed behavior on OSXFUSE 3.0.6:
$ cat mnt/hello hello, world $ cat mnt/hello hello, world $ cat mnt/hello|hexdump -C 00000000 68 65 6c 6c 6f 2c 20 77 6f 72 6c 64 0a 00 00 00 |hello, world....| 00000010 00 00 00 00 00 |.....| 00000015
This seems to be related specifically to range invalidations. If I
As you can see from the debug logs, there are no
Extra files at https://gist.github.com/tv42/699e01290ad91f5903e7
Thanks for the bug report. The problem seem to be that the last page in the ubc cache (before extending the file) is not invalidated automatically when extending the file. This page contains "hello world\n" and is padded with zeros.
Please check again with the following build. Unless the file ends on a page boundary the new build will invalidate the last page of the file's unified buffer cache (before expanding the file). This fixes the issue for me. In my opinion it is kind of odd that the kernel invalidates the last page when shrinking files but not when expanding files.
…ata" This reverts commit e2be6410b85f28f9458f4eab954b1dd0182e1a94. osxfuse/osxfuse#237 was fixed by OSXFUSE 3.0.7