linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: zhanchengbin <zhanchengbin1@huawei.com>
Cc: linux-ext4@vger.kernel.org, linfeilong@huawei.com,
	louhongxiang@huawei.com, liuzhiqiang26@huawei.com
Subject: Re: [PATCH 0/2] Add some msg for io error
Date: Sun, 26 Mar 2023 10:31:28 -0400	[thread overview]
Message-ID: <20230326143128.GA436186@mit.edu> (raw)
In-Reply-To: <20230325065652.2111384-1-zhanchengbin1@huawei.com>

On Sat, Mar 25, 2023 at 02:56:50PM +0800, zhanchengbin wrote:
> If there is an EIO during the process of fsck, the user can be notified of it.

Can you identify a code path where the user is *not* getting notified
while e2fsck is running without this patch series?

The unix_io.c module calls fsync() through unix_flush() only.  When
unix_write_byte() calls flush_cached blocks(), if the read or write
system call fails, the error will be returned to the caller of
flush_cached_byte(), and the unix_write_byte() will return the error
back to the caller (in this case, e2fsck).

So in both cases, e2fsck checks the error return from ext2fs_flush()
(which is the only place where write_byte gets called) and
io_channel->flush(), and so the user will get some kind of error
report already.

The error message might not identify exactly what I/O failed, but the
"Error sync" message that this commit series provides is not going to
be much better.

						- Ted

  parent reply	other threads:[~2023-03-26 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-25  6:56 [PATCH 0/2] Add some msg for io error zhanchengbin
2023-03-25  6:56 ` [PATCH 1/2] lib/ext2fs: add error handle in unix_flush and unix_write_byte zhanchengbin
2023-03-25  6:56 ` [PATCH 2/2] e2fsck: add sync error handle to e2fsck zhanchengbin
2023-03-25 17:13   ` Darrick J. Wong
2023-03-30  3:00     ` zhanchengbin
2023-03-26 14:31 ` Theodore Ts'o [this message]
2023-03-30  2:56   ` [PATCH 0/2] Add some msg for io error zhanchengbin

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=20230326143128.GA436186@mit.edu \
    --to=tytso@mit.edu \
    --cc=linfeilong@huawei.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=liuzhiqiang26@huawei.com \
    --cc=louhongxiang@huawei.com \
    --cc=zhanchengbin1@huawei.com \
    /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).