Thread (8 messages) flat view 8 messages, 5 authors, 2017-09-25

[4.14-rc1 bug] fstests generic/441 failure on ext2

From: Eryu Guan <hidden>
Date: 2017-09-18 11:23:14
Also in: linux-fsdevel

Hi all,

With ext2 driven by ext4 module (or ext4 without journal, I haven't
tested ext2 module, but I guess the result is the same), v4.14-rc1
kernel starts to fail fstests generic/441 as:

+First fsync after reopen of fd[0] failed: Input/output error

git bisect shows that this is uncovered by commit ffb959bbdf92 ("mm:
remove optimizations based on i_size in mapping writeback waits"), which
removed (i_size == 0) check in filemap_fdatawait().

I say "uncovered" because test fails with 4.13 kernel too if we re-open
the test file without O_TRUNC flag in src/fsync-err.c (so file size is
not zero, and fails the i_size == 0 check).

The EIO was returned by sync_inode_metadata() in __generic_file_fsync(),
the call trace is like:

do_fsync
 vfs_fsync_range
  ext4_sync_file
   __generic_file_fsync
    sync_inode_metadata
     writeback_single_inode
      __writeback_single_inode
       filemap_fdatawait  => EIO here

Thanks,
Eryu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help