diff options
author | Jeff Cody <jcody@redhat.com> | 2018-04-03 00:37:26 -0400 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-04-03 15:25:17 +0200 |
commit | a03083a0170d86ee1baa73476a48e715af665ddb (patch) | |
tree | 916dab80030414e128ac00fc0e5a8d8cbc690c73 /slirp | |
parent | 3e4d88eabfd6ccceb49885cc026c2778b6d5b7d2 (diff) |
block: handle invalid lseek returns gracefully
In commit 223a23c198787328ae75bc65d84edf5fde33c0b6, we implemented a
workaround in the gluster driver to handle invalid values returned for
SEEK_DATA or SEEK_HOLE.
In some instances, these same invalid values can be seen in the posix
file handler as well - for example, it has been reported on FUSE gluster
mounts.
Calling assert() for these invalid values is overly harsh; we can safely
return -EIO and allow this case to be treated as a "learned nothing"
case (e.g., D4 / H4, as commented in the code).
This patch does the same thing that 223a23c198787 did for gluster.c,
except in file-posix.c
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'slirp')
0 files changed, 0 insertions, 0 deletions