Closed trofi closed 1 year ago
Before the change filerec_count_shared() incorrectly accounted for extent end compared to file end:
filerec_count_shared()
$ ls -lh /nix/var/nix/db/db.sqlite -rw-r--r-- 1 root root 1.4G Nov 9 22:21 /nix/var/nix/db/db.sqlite
Before the change due to incorrect tail handling sharing reported size larger than the file itself:
$ ./show-shared-extents /nix/var/nix/db/db.sqlite /nix/var/nix/db/db.sqlite: 27065321263104 shared bytes
After the change sharing reports a reasonable value:
$ ./show-shared-extents /nix/var/nix/db/db.sqlite /nix/var/nix/db/db.sqlite: 1169276928 shared bytes
Note: before the change sharing reported a few orders of magnitude savings larger than initial file size. After the change the value is more reasonable.
Thank you for improving this report
Before the change
filerec_count_shared()
incorrectly accounted for extent end compared to file end:Before the change due to incorrect tail handling sharing reported size larger than the file itself:
After the change sharing reports a reasonable value:
Note: before the change sharing reported a few orders of magnitude savings larger than initial file size. After the change the value is more reasonable.