From: David Howells <dhowells@redhat.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: dhowells@redhat.com, Jens Axboe <axboe@kernel.dk>,
Al Viro <viro@zeniv.linux.org.uk>,
Christoph Hellwig <hch@infradead.org>,
Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>,
Jeff Layton <jlayton@kernel.org>,
David Hildenbrand <david@redhat.com>,
Jason Gunthorpe <jgg@nvidia.com>,
Logan Gunthorpe <logang@deltatee.com>,
Hillf Danton <hdanton@sina.com>,
Christian Brauner <brauner@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Christoph Hellwig <hch@lst.de>,
"Darrick J . Wong" <djwong@kernel.org>,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH v22 25/31] zonefs: Provide a splice-read wrapper
Date: Tue, 23 May 2023 21:43:14 +0100 [thread overview]
Message-ID: <3071148.1684874594@warthog.procyon.org.uk> (raw)
In-Reply-To: <12153db1-20af-040b-ded0-31286b5bafca@kernel.org>
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
next prev parent reply other threads:[~2023-05-23 20:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230522135018.2742245-1-dhowells@redhat.com>
2023-05-22 13:49 ` [PATCH v22 08/31] splice: Make splice from a DAX file use copy_splice_read() David Howells
2023-05-22 13:50 ` [PATCH v22 24/31] xfs: Provide a splice-read wrapper David Howells
2023-05-22 13:50 ` [PATCH v22 25/31] zonefs: " David Howells
2023-05-23 2:48 ` Damien Le Moal
2023-05-23 20:43 ` David Howells [this message]
2023-05-24 23:13 ` Damien Le Moal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3071148.1684874594@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=david@redhat.com \
--cc=djwong@kernel.org \
--cc=dlemoal@kernel.org \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=hdanton@sina.com \
--cc=jack@suse.cz \
--cc=jgg@nvidia.com \
--cc=jlayton@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox