-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fallocate on a file with size equal to the length #6860
Comments
This also happens for files with different size:
I don't think there's an issue here: On ZFS
This is documented: http://man7.org/linux/man-pages/man3/posix_fallocate.3.html#NOTES
Change open("./randomfile", O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); to open("./randomfile", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); in your reproducer to avoid this. |
Does tmpfs supply a "native syscall" for fallocate? Ok I see the issue now. |
On tmpfs we have no
@CMCDragonkai can we close this? |
Yep |
Reposted from #326 (comment)
I'm using 0.7.2-1, and I noticed that if you run
posix_fallocate
on a file with the same size as the length specified, it returns withEBADF
. This doesn't happen when I do it on tmpfs.Running the above on an empty or non-existent file works fine, as soon as you run it again, it fails with EBADF. This is bit strange behaviour.
The text was updated successfully, but these errors were encountered: