diff options
| author | Jeff Cody | 2018-04-03 06:37:26 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2018-04-03 15:25:17 +0200 |
| commit | a03083a0170d86ee1baa73476a48e715af665ddb (patch) | |
| tree | 916dab80030414e128ac00fc0e5a8d8cbc690c73 /scripts/modules | |
| parent | gluster: Fix blockdev-add with server.N.type=unix (diff) | |
| download | qemu-a03083a0170d86ee1baa73476a48e715af665ddb.tar.gz qemu-a03083a0170d86ee1baa73476a48e715af665ddb.tar.xz qemu-a03083a0170d86ee1baa73476a48e715af665ddb.zip | |
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 'scripts/modules')
0 files changed, 0 insertions, 0 deletions
