https://bugzilla.kernel.org/show_bug.cgi?id=200871
--- Comment #7 from Stathis Maneas (sman...@cs.toronto.edu) --- Please find attached the required files to reproduce the error. Start with the Makefile to compile and install the module into your kernel. Assuming the underlying device is /dev/vdb, please execute the following commands to initialize the file system: $ dd if=/dev/zero of=/dev/vdb bs=4096 $ mkfs.f2fs -l F2FS /dev/vdb -d 10 -a 0 -O extra_attr -O inode_checksum $ mount -t f2fs /dev/vdb /mnt/f2fs -o background_gc=off $ cd /mnt/f2fs $ dd if=/dev/urandom of=inline_file bs=3400 count=1 $ cd; umount /mnt/f2fs In order to reproduce the error, we need two pieces of information: - The device's number of sectors (invoking fdisk -l should be more than sufficient to extract this information). In my case, this number is equal to 262,144. - The block number (on disk) that will accommodate the newly updated inode (after its mode has changed). In my case, this block number is equal to 4609. Then, please execute the following commands to reproduce the error: $ sudo dmsetup create f2fs_dev --table '0 262144 injector /dev/vdb 0 W4609' --readahead none $ dmesg -C; dmsetup message f2fs_dev 0 start $ sudo mount -t f2fs /dev/mapper/f2fs_dev /mnt/f2fs -o background_gc=off $ cd /mnt/f2fs/ $ /tmp/run_chmod inline_file The operation "chmod" returned: 0 (errno: 0) (Comment: During the execution of this command, the write operation that is related to the newly updated inode (BlockID: 4609) is failed.) $ cd; umount /mnt/f2fs If everything is executed as expected, then dmesg should contain an entry similar to the following: Injecting (W) error for sec: 36872 and block: 4609 At this point, if we re-mount the file system, the file cannot be accessed since its inode was never persisted on disk: $ mount -t f2fs /dev/vdb /mnt/f2fs -o background_gc=off $ cd /mnt/f2fs $ ls -alR .: ls: cannot access inline_file: Invalid argument total 8 drwxr-xr-x 2 root root 4096 Aug 20 17:04 . drwxr-xr-x 3 root root 4096 Jun 5 14:50 .. -????????? ? ? ? ? ? inline_file $ dmesg ... [3247.026533] F2FS-fs (vdb): inconsistent node block, nid:4, node_footer[nid:0,ino:0,ofs:0,cpver:0,blkaddr:0] ... $ cd; umount /mnt/f2fs After invoking f2fs.fsck and answering 'yes' to all questions, we end up with a consistent file system image, but now, the entry has disappeared: $ mount -t f2fs /dev/vdb /mnt/f2fs -o background_gc=off $ cd /mnt/f2fs $ ls -alR .: total 8 drwxr-xr-x 2 root root 4096 Aug 20 17:04 . drwxr-xr-x 3 root root 4096 Jun 5 14:50 .. $ cd; umount /mnt/f2fs Please let me know if you run into any issues while trying to reproduce the error. -- 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