lkml.org 
[lkml]   [2023]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v22 25/31] zonefs: Provide a splice-read wrapper
    Date
    Damien Le Moal <dlemoal@kernel.org> wrote:

    > > + if (len > 0) {
    > > + ret = filemap_splice_read(in, ppos, pipe, len, flags);
    > > + if (ret == -EIO)
    >
    > Is -EIO the only error that filemap_splice_read() may return ? There are other
    > IO error codes that we could get from the block layer, e.g. -ETIMEDOUT etc. So
    > "if (ret < 0)" may be better here ?

    It can return -ENOMEM, -EINTR and -EAGAIN at least, none of which really count
    as I/O errors. I based the splice function on what zonefs_file_read_iter()
    does:

    } else {
    ret = generic_file_read_iter(iocb, to);
    if (ret == -EIO)
    zonefs_io_error(inode, false);
    }

    David

    \
     
     \ /
      Last update: 2023-05-23 22:45    [W:4.541 / U:0.228 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site