https://bugzilla.kernel.org/show_bug.cgi?id=200871
Chao Yu (c...@kernel.org) changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from Chao Yu (c...@kernel.org) --- I think there are two problems: 1. you made IO error, and return the error to upper, but fsync() didn't fail. To reproduce this: a) I add below code in f2fs_write_end_io, and use fault_injection to simulate error under block layer: if (time_to_inject(F2FS_P_SB(bio_first_page_all(bio)), FAULT_IO)) { f2fs_show_injection_info(FAULT_IO); bio->bi_status = BLK_STS_IOERR; } b) xfs_io -f /mnt/f2fs/file -c "pwrite 0 4k" -c "fsync" fsync: Input/output error This is because, in f2fs_write_end_io(), if error is injected, -EIO will be set into node inode's page mapping as below: if (unlikely(bio->bi_status)) { mapping_set_error(page->mapping, -EIO); if (type == F2FS_WB_CP_DATA) f2fs_stop_checkpoint(sbi, true); } And later filemap_check_errors() in f2fs_sync_file() will capture such error, and propagate it to user. So how you inject error in bio? by fail_make_request? 2. image became inconsistent, so that we can index node block of inlien_file, but could not read detail info of it due to the node block is corrupted. "inconsistent node block, nid:4, node_footer[nid:0,ino:0,ofs:0,cpver:0,blkaddr:0]" I think this is related to first problem. -- You are receiving this mail because: You are watching the assignee of the bug. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel