Skip to contentSkip to conversation

New: fsck.f2fs - 1.14.0 - error when not /dev/vgXX/lvYYY path provided - [ASSERT] (init_sb_info:1017) !strcmp((char *)sb->devs[i].path, (char *)c.devices[i].path)

f2fs-dev [email protected] 2 participants 3 messages Dec 20, 2020 – Sep 29, 2023

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=210795

            Bug ID: 210795
           Summary: fsck.f2fs - 1.14.0 - error when not /dev/vgXX/lvYYY
                    path provided - [ASSERT] (init_sb_info:1017)
                    !strcmp((char *)sb->devs[i].path, (char
                    *)c.devices[i].path)
           Product: File System
           Version: 2.5
    Kernel Version: 5.9.15
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: f2fs
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

Summary: fsck.f2fs version 1.14.0 has an error when not /dev/vgXX/lvYYY path
provided: "ASSERT] (init_sb_info:1017) !strcmp((char *)sb->devs[i].path, (char *)c.devices[i].path)"

Comment: only /dev/vgftp1a/VIRTUALa goes ok, the rest from the list below (including /dev/dm-15) throws an error.

Problem: when fsck enabled in /etc/fstab (6th field is non-zero value), bootup fails due to FSCK error (OS Gentoo)

Details:

ftp1 ~ # find /dev/ -type l |while read i; do ls -als $i; done|grep dm-15
0 lrwxrwxrwx 1 root root 8 Dec 20 06:20 /dev/vgftp1a/VIRTUALa -> ../dm-15
0 lrwxrwxrwx 1 root root 11 Dec 20 06:20 /dev/disk/by-uuid/f6d10195-322c-4844-8c9d-0f9208b2928b -> ../../dm-15
0 lrwxrwxrwx 1 root root 11 Dec 20 06:20 /dev/disk/by-label/VIRTUAL -> ../../dm-15
0 lrwxrwxrwx 1 root root 11 Dec 20 06:20 /dev/disk/by-id/dm-uuid-LVM-fDvtRBj3wclGxpSKSfh63QVaqCC05s2l3ASPKi48wLYF7PamZ6fBWpRM7zA2d7HR -> ../../dm-15
0 lrwxrwxrwx 1 root root 11 Dec 20 06:20 /dev/disk/by-id/dm-name-vgftp1a-VIRTUALa -> ../../dm-15
0 lrwxrwxrwx 1 root root 8 Dec 20 06:20 /dev/block/253:15 -> ../dm-15
0 lrwxrwxrwx 1 root root 8 Dec 20 06:20 /dev/mapper/vgftp1a-VIRTUALa -> ../dm-15

ftp1 ~ # ls -als /dev/dm-15
0 brw-rw---- 1 root disk 253, 15 Dec 20 06:20 /dev/dm-15

ftp1 ~ # uname -a
Linux ftp1.wifizabreh.net 5.9.15-xeon #2 SMP Sat Dec 19 02:48:01 CET 2020 x86_64 Intel(R) Xeon(R) CPU E3-1265L V2 @ 2.50GHz GenuineIntel GNU/Linux

ftp1 ~ # eix f2fs
[I] sys-fs/f2fs-tools

     Available versions:  1.14.0(0/8) {selinux}
     Installed versions:  1.14.0(0/8)(06:03:10 AM 12/20/2020)(-selinux)
     Homepage:           

https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/about/
Description: Tools for Flash-Friendly File System (F2FS)

ftp1 ~ # fsck.f2fs --dry-run /dev/disk/by-label/VIRTUAL
Info: Dry run
Info: [/dev/disk/by-label/VIRTUAL] Disk Model: SanDisk SDSSDXPS
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 209715200 (102400 MB)
Info: MKFS version
"Linux version 5.9.15-xeon ([email protected]) (gcc (Gentoo 9.3.0-r2
p4) 9.3.0, GNU ld (Gentoo 2.33.1 p2) 2.33.1) #2 SMP Sat Dec 19 02:48:01 CET 2020"
Info: FSCK version
from "Linux version 5.9.15-xeon ([email protected]) (gcc (Gentoo
9.3.0-r2 p4) 9.3.0, GNU ld (Gentoo 2.33.1 p2) 2.33.1) #2 SMP Sat Dec 19 02:48:01 CET 2020"
to "Linux version 5.9.15-xeon ([email protected]) (gcc (Gentoo
9.3.0-r2 p4) 9.3.0, GNU ld (Gentoo 2.33.1 p2) 2.33.1) #2 SMP Sat Dec 19 02:48:01 CET 2020"
Info: superblock features = 828 : extra_attr inode_checksum sb_checksum
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000 [ASSERT] (init_sb_info:1017) !strcmp((char *)sb->devs[i].path, (char *)c.devices[i].path)

ftp1 ~ # fsck.f2fs --dry-run /dev/dm-15
Info: Dry run
Info: [/dev/dm-15] Disk Model: SanDisk SDSSDXPS
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 209715200 (102400 MB)
Info: MKFS version
"Linux version 5.9.15-xeon ([email protected]) (gcc (Gentoo 9.3.0-r2
p4) 9.3.0, GNU ld (Gentoo 2.33.1 p2) 2.33.1) #2 SMP Sat Dec 19 02:48:01 CET 2020"
Info: FSCK version
from "Linux version 5.9.15-xeon ([email protected]) (gcc (Gentoo
9.3.0-r2 p4) 9.3.0, GNU ld (Gentoo 2.33.1 p2) 2.33.1) #2 SMP Sat Dec 19 02:48:01 CET 2020"
to "Linux version 5.9.15-xeon ([email protected]) (gcc (Gentoo
9.3.0-r2 p4) 9.3.0, GNU ld (Gentoo 2.33.1 p2) 2.33.1) #2 SMP Sat Dec 19 02:48:01 CET 2020"
Info: superblock features = 828 : extra_attr inode_checksum sb_checksum
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000 [ASSERT] (init_sb_info:1017) !strcmp((char *)sb->devs[i].path, (char *)c.devices[i].path)

ftp1 ~ # fsck.f2fs --dry-run /dev/vgftp1a/VIRTUALa
Info: Dry run
Info: [/dev/vgftp1a/VIRTUALa] Disk Model: SanDisk SDSSDXPS
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 209715200 (102400 MB)
Info: MKFS version
"Linux version 5.9.15-xeon ([email protected]) (gcc (Gentoo 9.3.0-r2
p4) 9.3.0, GNU ld (Gentoo 2.33.1 p2) 2.33.1) #2 SMP Sat Dec 19 02:48:01 CET 2020"
Info: FSCK version
from "Linux version 5.9.15-xeon ([email protected]) (gcc (Gentoo
9.3.0-r2 p4) 9.3.0, GNU ld (Gentoo 2.33.1 p2) 2.33.1) #2 SMP Sat Dec 19 02:48:01 CET 2020"
to "Linux version 5.9.15-xeon ([email protected]) (gcc (Gentoo
9.3.0-r2 p4) 9.3.0, GNU ld (Gentoo 2.33.1 p2) 2.33.1) #2 SMP Sat Dec 19 02:48:01 CET 2020"
Info: superblock features = 828 : extra_attr inode_checksum sb_checksum
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: Device[0] : /dev/vgftp1a/VIRTUALa blkaddr = 0--13fffff
Info: [/dev/vgftp1b/VIRTUALb] Disk Model: SanDisk SDSSDXPS
Info: Device[1] : /dev/vgftp1b/VIRTUALb blkaddr = 1400000--27fffff
Info: total FS sectors = 335544320 (163840 MB)
Info: CKPT version = 6d2e3efb
Info: Checked valid nat_bits in checkpoint
Info: checkpoint state = 1c5 : trimmed nat_bits crc compacted_summary unmount

[FSCK] Unreachable nat entries                        [Ok..] [0x0]
[FSCK] SIT valid block bitmap checking                [Ok..]
[FSCK] Hard link checking for regular file            [Ok..] [0x0]
[FSCK] valid_block_count matching with CP             [Ok..] [0x1dd6635]
[FSCK] valid_node_count matching with CP (de lookup)  [Ok..] [0x78a6]
[FSCK] valid_node_count matching with CP (nat lookup) [Ok..] [0x78a6]
[FSCK] valid_inode_count matched with CP              [Ok..] [0x94]
[FSCK] free segment_count matched with CP             [Ok..] [0x4fac]
[FSCK] next block offset is free                      [Ok..]

[FSCK] fixing SIT types
[FSCK] other corrupted bugs [Ok..]

Done: 27.694741 secs

Signature · 9 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
#1 lore raw

[f2fs-dev] [Bug 210795] fsck.f2fs - 1.14.0 - error when not /dev/vgXX/lvYYY path provided - [ASSERT] (init_sb_info:1017) !strcmp((char *)sb->devs[i].path, (char *)c.devices[i].path)

https://bugzilla.kernel.org/show_bug.cgi?id=210795

Chao Yu ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |ASSIGNED
                 CC|                            |[email protected]

--- Comment #1 from Chao Yu ([email protected]) ---

Quoted 3 lines

Info: Device[0] : /dev/vgftp1a/VIRTUALa blkaddr = 0--13fffff
Info: [/dev/vgftp1b/VIRTUALb] Disk Model: SanDisk SDSSDXPS
Info: Device[1] : /dev/vgftp1b/VIRTUALb blkaddr = 1400000--27fffff

You can see that in f2fs superblock, we record original paths of multipath instead of paths symlinks point to, when you use fsck.f2fs /dev/xxx to check multiple devices of f2fs image, fsck can only compare paths stored in superblock with parameters we passed, otherwise it will trigger ASSERT warning.

So we can only use

fsck.f2fs --dry-run /dev/vgftp1a/VIRTUALa

to check f2fs image, rather than using

fsck.f2fs --dry-run /dev/dm-15

Signature · 9 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
#2 lore raw

[f2fs-dev] [Bug 210795] fsck.f2fs - 1.14.0 - error when not /dev/vgXX/lvYYY path provided - [ASSERT] (init_sb_info:1017) !strcmp((char *)sb->devs[i].path, (char *)c.devices[i].path)

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=210795

Tomas Thiemel ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |DOCUMENTED
Signature · 9 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel