linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: dhowells@redhat.com, Naohiro Aota <naohiro.aota@wdc.com>,
	Johannes Thumshirn <jth@kernel.org>,
	Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
	Jens Axboe <axboe@kernel.dk>,
	linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org,
	linux-mm@kvack.org, linux-kernel@kvack.org
Subject: [PATCH] zonefs: Call zonefs_io_error() on any error from filemap_splice_read()
Date: Thu, 25 May 2023 09:38:57 +0100	[thread overview]
Message-ID: <3788353.1685003937@warthog.procyon.org.uk> (raw)

    
Call zonefs_io_error() after getting any error from filemap_splice_read()
in zonefs_file_splice_read(), including non-fatal errors such as ENOMEM,
EINTR and EAGAIN.

Suggested-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/5d327bed-b532-ad3b-a211-52ad0a3e276a@kernel.org/
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Naohiro Aota <naohiro.aota@wdc.com>
cc: Johannes Thumshirn <jth@kernel.org>
cc: Christoph Hellwig <hch@lst.de>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: Jens Axboe <axboe@kernel.dk>
cc: linux-fsdevel@vger.kernel.org
cc: linux-block@vger.kernel.org
cc: linux-mm@kvack.org
---
 fs/zonefs/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c
index 65d4c4fe6364..0660cffc5ed8 100644
--- a/fs/zonefs/file.c
+++ b/fs/zonefs/file.c
@@ -782,7 +782,7 @@ static ssize_t zonefs_file_splice_read(struct file *in, loff_t *ppos,
 
 	if (len > 0) {
 		ret = filemap_splice_read(in, ppos, pipe, len, flags);
-		if (ret == -EIO)
+		if (ret < 0)
 			zonefs_io_error(inode, false);
 	}
 


             reply	other threads:[~2023-05-25  8:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25  8:38 David Howells [this message]
2023-05-25 11:18 ` [PATCH] zonefs: Call zonefs_io_error() on any error from filemap_splice_read() Johannes Thumshirn
2023-05-25 15:21 ` Matthew Wilcox
2023-05-25 23:04   ` Damien Le Moal
2023-05-25 23:46     ` Damien Le Moal
2023-05-26 14:07       ` Matthew Wilcox

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=3788353.1685003937@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --cc=jth@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@kvack.org \
    --cc=linux-mm@kvack.org \
    --cc=naohiro.aota@wdc.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).