[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220920103812.GA12541@172.21.0.10>
Date: Tue, 20 Sep 2022 12:38:12 +0200
From: Philippe De Muyter <phdm@...q.eu>
To: Jaegeuk Kim <jaegeuk@...nel.org>
Cc: Wu Bo <bo.wu@...o.com>, wubo.oduw@...il.com,
linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: does fsck.f2fs-1.14 breaks f2fs filesystem from linux-4.1.15 ?
Hello Kim,
On Mon, Sep 19, 2022 at 05:52:44PM -0700, Jaegeuk Kim wrote:
> Hi Philippe,
>
> Kernel 4.1 is really old one, so is there any chance to upgrade the kernel
> at least 4.14? You can find all the backports from below.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-stable.git
Actually it's freescale-originated kernel based on 4.1.15. I can update
the f2fs driver if it remains compatible with the rest of the kernel,
but I cannot update the kernel because all the freescale drivers
are based on 4.1.15 and are not compatible with higher kernel versions.
Actually, the f2fs driver in 4.1.15 works well enough, but I would like
to run fsck.f2fs on the partition before mounting it. I had picked up
the 1.14 version of fsck.f2fs which was the last available some weeks
ago. I could use another one if you recommend another one to me.
What I noticed when using fsck.f2fs-1.14 is :
It detects that my f2fs partition is from an old version :
Info: Force to fix corruption
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 7372800 (3600 MB)
Info: MKFS version
""
Info: FSCK version
from ""
to "Linux version 4.1.15-02187-g7bc7275 (phdm@...dita) (gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -- Built at 2011/08/10 09:20) ) #173 SMP PREEMPT Thu Sep 15 18:15:41 CEST 2022"
Info: superblock features = 0 :
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 7372800 (3600 MB)
Info: CKPT version = 31bff9
Info: Corrupted valid nat_bits in checkpoint
Info: Write valid nat_bits in checkpoint
Info: checkpoint state = 284 : allow_nocrc nat_bits compacted_summary sudden-power-off
Then it changes i_gc_failures from 0x1 to 0x00, for many items; the amount
seems to be proportional to the number of new files in the partition.
Then it terminates with what looks to me as a success message :
[FSCK] Max image size: 3600 MB, Free space: 963 MB
[FSCK] Unreachable nat entries [Ok..] [0x0]
[FSCK] SIT valid block bitmap checking [Ok..]
[FSCK] Hard link checking for regular file [Ok..] [0x956]
[FSCK] valid_block_count matching with CP [Ok..] [0x91e7b]
[FSCK] valid_node_count matching with CP (de lookup) [Ok..] [0x128b9]
[FSCK] valid_node_count matching with CP (nat lookup) [Ok..] [0x128b9]
[FSCK] valid_inode_count matched with CP [Ok..] [0x127be]
[FSCK] free segment_count matched with CP [Ok..] [0x263]
[FSCK] next block offset is free [Ok..]
[FSCK] fixing SIT types
[FSCK] other corrupted bugs [Ok..]
Info: Duplicate valid checkpoint to mirror position 512 -> 1024
Info: Write valid nat_bits in checkpoint
Info: Write valid nat_bits in checkpoint
But thereafter, the f2fs driver in the 4.1.15 kernel complains once with
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2359 at fs/f2fs/node.c:1863 flush_nat_entries+0x734/0x7c4()
Modules linked in:
CPU: 0 PID: 2359 Comm: python3 Not tainted 4.1.15-02177-gcef0cbe-dirty #166
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[<80015f58>] (unwind_backtrace) from [<80012020>] (show_stack+0x10/0x14)
[<80012020>] (show_stack) from [<80732e64>] (dump_stack+0x68/0xb8)
[<80732e64>] (dump_stack) from [<8002b694>] (warn_slowpath_common+0x74/0xac)
[<8002b694>] (warn_slowpath_common) from [<8002b6e8>] (warn_slowpath_null+0x1c/0x24)
[<8002b6e8>] (warn_slowpath_null) from [<8024f8dc>] (flush_nat_entries+0x734/0x7c4)
[<8024f8dc>] (flush_nat_entries) from [<8024456c>] (write_checkpoint+0x208/0xe68)
[<8024456c>] (write_checkpoint) from [<802400c4>] (f2fs_sync_fs+0x50/0x70)
[<802400c4>] (f2fs_sync_fs) from [<8010436c>] (sync_fs_one_sb+0x28/0x2c)
[<8010436c>] (sync_fs_one_sb) from [<800df9e0>] (iterate_supers+0xac/0xd4)
[<800df9e0>] (iterate_supers) from [<80104414>] (sys_sync+0x48/0x98)
[<80104414>] (sys_sync) from [<8000f440>] (ret_fast_syscall+0x0/0x3c)
---[ end trace 5d91f10cd7a61715 ]---
The same run of the kernel afterwards complains about accesses beyond
end of the device , with three different sizes: 112, 16384 and 16.
attempt to access beyond end of device
mmcblk0p2: rw=112, want=58078880, limit=7372800
...
attempt to access beyond end of device
mmcblk0p2: rw=16384, want=6874055224, limit=7372800
...
attempt to access beyond end of device
mmcblk0p2: rw=16, want=2693281864, limit=7372800
And after a reboot, the run of fsck.f2fs removes many not new files and
directories !!! I have attached a log. So it seems to me that despite
the efforts in that sense, fsck.f2fs is currently not compatible with
the f2fs driver from linux-4.1. Could you recommend me a version of
fsck.f2fs that really checks a linux-4.1 filesystem or find out
why version 1.14 breaks a linux-4.1 filesystem and fix the problem ?
Best regards
Philippe
View attachment "fsck-f2fs-after-beyond.log" of type "text/x-log" (117771 bytes)
Powered by blists - more mailing lists