-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
Fails on ZFS because of fallocate not being supported #802
Comments
This seems to be from ostree, because flatpak never calls this itself. The only calls seem to be in _ostree_repo_open_content_bare() and create_regular_tmpfile_linkable_with_content(). @cgwalters, is there any chance fallocate calls in ostree could be optional? A fallback could just use ftruncate() right? |
There's one in libglnx too. Hmm, but glibc has a fallback for this. Are you not using glibc? And is this a new kernel? Can you try e.g.: strace -f -o strace.log flatpak ... |
I'm using musl libc. ......
|
Right, compare: So...it looks like coreutils does silently ignore |
So it's an edge case involving [+ZFS,-glibc,-systemd] ? Where does the responsibility here lie, do you think? With musl or with the init manager? Interestingly, this is the first time I'm run into this issue, though admittedly I've only been running this system a couple of months. (My current workaround for the flatpak issue is an ext4-formatted |
Systemd is not involved in this particular case, just musl, but systemd will also run into similar issues. |
This is the fallback that glibc uses: |
The glibc "fallback" is dangerously buggy and the subject of a bug report that was closed as wontfix: https://sourceware.org/bugzilla/show_bug.cgi?id=15661 musl will obviously not be adopting the same. posix_fallocate is permitted to fail, and must fail if it can't accomplish what it's specified to do on success. I'm not sure what flatpak needs from it; simply using ftruncate to set the file size to the desired length might suffice, or it might be necessary to perform writes on every block. |
The glibc `posix_fallocate()` implementation has a bad fallback, and further we need to handle `EOPNOTSUPP` for musl. flatpak/flatpak#802
The glibc `posix_fallocate()` implementation has a bad fallback, and further we need to handle `EOPNOTSUPP` for musl. flatpak/flatpak#802
Fixed by ostreedev/ostree#970 |
Is there a way to force flatpak to use
dd
instead offallocate
? I am unable to install any flatpaks on a ZFS filesystem (on Linux).The text was updated successfully, but these errors were encountered: