Skip to content
Snippets Groups Projects
Commit fa95e9fb authored by Thomas Huth's avatar Thomas Huth Committed by Kevin Wolf
Browse files

block/file-posix: Try other fallbacks after invalid FALLOC_FL_ZERO_RANGE


If fallocate(... FALLOC_FL_ZERO_RANGE ...) returns EINVAL, it's likely
an indication that the file system is buggy and does not implement
unaligned accesses right. We still might be lucky with the other
fallback fallocate() calls later in this function, though, so we should
not return immediately and try the others first.
Since FALLOC_FL_ZERO_RANGE could also return EINVAL if the file descriptor
is not a regular file, we ignore this filesystem bug silently, without
printing an error message for the user.

Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Message-Id: <20210527172020.847617-3-thuth@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 73ebf297
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment