fuse: Report fuse.Attr.Blocks correctly

Fixes #4239.
This commit is contained in:
greatroar
2023-03-07 22:12:08 +01:00
parent a7786c67f1
commit cb5694d136
5 changed files with 46 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
Bugfix: Correct number of blocks reported in mount point
Restic mount points incorrectly reported the number of 512-byte (POSIX
standard) blocks for files and links, due to a rounding bug. In particular,
empty files were reported as taking one block instead of zero.
The rounding is now fixed: the number of blocks reported is the file size
(or link target size), divided by 512 and rounded up to a whole number.
https://github.com/restic/restic/issues/4239
https://github.com/restic/restic/pull/4240