From: "Fengnan Chang" <changfengnan@bytedance.com>
To: <brauner@kernel.org>, <djwong@kernel.org>, <hch@infradead.org>,
<ojaswin@linux.ibm.com>, <dgc@kernel.org>,
<linux-xfs@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<linux-ext4@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<lidiangang@bytedance.com>, <pankaj.raghav@linux.dev>
Cc: "Fengnan Chang" <changfengnan@bytedance.com>
Subject: [PATCH v5 3/4] iomap: pass error code to should_report_dio_fserror directly
Date: Mon, 29 Jun 2026 20:01:23 +0800 [thread overview]
Message-ID: <20260629120124.25223-4-changfengnan@bytedance.com> (raw)
In-Reply-To: <20260629120124.25223-1-changfengnan@bytedance.com>
Change should_report_dio_fserror() to take an error code instead of the
full struct iomap_dio, decoupling it for reuse by the upcoming simple
direct I/O path.
No functional change.
Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
---
fs/iomap/direct-io.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index c40350cdf3b14..4db79ddc1ddd4 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -88,9 +88,9 @@ static inline enum fserror_type iomap_dio_err_type(const struct iomap_dio *dio)
return FSERR_DIRECTIO_READ;
}
-static inline bool should_report_dio_fserror(const struct iomap_dio *dio)
+static inline bool should_report_dio_fserror(int error)
{
- switch (dio->error) {
+ switch (error) {
case 0:
case -EAGAIN:
case -ENOTBLK:
@@ -110,7 +110,7 @@ ssize_t iomap_dio_complete(struct iomap_dio *dio)
if (dops && dops->end_io)
ret = dops->end_io(iocb, dio->size, ret, dio->flags);
- if (should_report_dio_fserror(dio))
+ if (should_report_dio_fserror(dio->error))
fserror_report_io(file_inode(iocb->ki_filp),
iomap_dio_err_type(dio), offset, dio->size,
dio->error, GFP_NOFS);
--
2.39.5 (Apple Git-154)
next prev parent reply other threads:[~2026-06-29 12:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 12:01 [PATCH v5 0/4] iomap: add simple dio path for small direct I/O Fengnan Chang
2026-06-29 12:01 ` [PATCH v5 1/4] iomap: factor out iomap_dio_alignment helper Fengnan Chang
2026-06-30 6:13 ` Christoph Hellwig
2026-06-29 12:01 ` [PATCH v5 2/4] iomap: factor out iomap_dio_bio_release_pages helper Fengnan Chang
2026-06-30 6:17 ` Christoph Hellwig
2026-06-29 12:01 ` Fengnan Chang [this message]
2026-06-30 6:18 ` [PATCH v5 3/4] iomap: pass error code to should_report_dio_fserror directly Christoph Hellwig
2026-06-29 12:01 ` [PATCH v5 4/4] iomap: add simple dio path for small direct I/O Fengnan Chang
2026-06-30 11:48 ` Christoph Hellwig
2026-07-01 3:21 ` changfengnan
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=20260629120124.25223-4-changfengnan@bytedance.com \
--to=changfengnan@bytedance.com \
--cc=brauner@kernel.org \
--cc=dgc@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=lidiangang@bytedance.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=pankaj.raghav@linux.dev \
/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