Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the sparse test #1170

Closed
ThomasWaldmann opened this issue Jun 15, 2016 · 2 comments
Closed

fix the sparse test #1170

ThomasWaldmann opened this issue Jun 15, 2016 · 2 comments
Assignees

Comments

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Jun 15, 2016

as seen in #1150 this test has issues on zfs. and also on xfs as seen in some borg 1.0.3 SuSE build log.

as all these filesystems also exist on linux (or freebsd), disabling by OS is not good enough.

@ThomasWaldmann ThomasWaldmann self-assigned this Jun 15, 2016
@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Jun 15, 2016

found out that xfs is doing stuff behind the scenes: it is pre-allocating 16MB to prevent fragmentation (in my case, value depends on misc factors).

fixed the test so it just checks that the extracted sparse file uses less (not necessary much less) space than a non-sparse file would.

another problem showed up when i tried to verify the holes in the sparse file via SEEK_HOLE, SEEK_DATA: after the few bytes of real data in the file, there was another 16MB preallocated space. So I ended up checking just the hole at the start of the file.

ThomasWaldmann added a commit to ThomasWaldmann/borg that referenced this issue Jun 15, 2016
found out that xfs is doing stuff behind the scenes: it is pre-allocating 16MB
to prevent fragmentation (in my case, value depends on misc factors).

fixed the test so it just checks that the extracted sparse file uses less (not
necessary much less) space than a non-sparse file would use.

another problem showed up when i tried to verify the holes in the sparse file
via SEEK_HOLE, SEEK_DATA:
after the few bytes of real data in the file, there was another 16MB
preallocated space.
So I ended up checking just the hole at the start of the file.

tested on: ext4, xfs, zfs, btrfs
ThomasWaldmann added a commit that referenced this issue Jun 19, 2016
@ThomasWaldmann
Copy link
Member Author

#1173 fixes this in 1.0-maint (and will be merged into master soon also).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant