• J
    block: handle invalid lseek returns gracefully · a03083a0
    Jeff Cody 提交于
    In commit 223a23c1, 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 223a23c1 did for gluster.c,
    except in file-posix.c
    Signed-off-by: NJeff Cody <jcody@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    a03083a0
file-posix.c 85.5 KB