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