All of
 help / color / mirror / Atom feed
From: Su Yue <>
Cc:, Su Yue <>
Subject: [PATCH 1/4] ocfs2: return real error code in ocfs2_dio_wr_get_block
Date: Sun, 31 Mar 2024 19:17:41 +0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Su Yue <>

ocfs2_dio_wr_get_block always returns -EIO in case of errors.
However, some programs expect right exit codes while doing dio.
For example, tools like fio treat -ENOSPC as expected code while
doing stress jobs. And quota tools expect -QUOTA when disk quota

-EIO is too strong return code in the dio path. I have checked
return codes from collees of ocfs2_dio_wr_get_block to make sure
the change does not hurt us.

Signed-off-by: Su Yue <>
 fs/ocfs2/aops.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index b82185075de7..f0467d3b3c88 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -2283,8 +2283,6 @@ static int ocfs2_dio_wr_get_block(struct inode *inode, sector_t iblock,
 	ocfs2_inode_unlock(inode, 1);
-	if (ret < 0)
-		ret = -EIO;
 	return ret;

  reply	other threads:[~2024-03-31 11:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-31 11:17 [PATCH 0/4] ocfs2 bugs fixes exposed by fstests Su Yue
2024-03-31 11:17 ` Su Yue [this message]
2024-04-01  1:44   ` [PATCH 1/4] ocfs2: return real error code in ocfs2_dio_wr_get_block Joseph Qi
2024-04-01  3:51     ` Su Yue
2024-03-31 11:17 ` [PATCH 2/4] ocfs2: fix races between hole punching and AIO+DIO Su Yue
2024-04-01  1:52   ` Joseph Qi
2024-03-31 11:17 ` [PATCH 3/4] ocfs2: update inode fsync transaction id in ocfs2_unlink and ocfs2_link Su Yue
2024-04-01  1:55   ` Joseph Qi
2024-03-31 11:17 ` [PATCH 4/4] ocfs2: use coarse time for new created files Su Yue
2024-04-01  2:02   ` Joseph Qi

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.