All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [Bug 210797] New: resize.f2fs over 2 (LVM) disks corrupts whole filesystem
Date: Sun, 20 Dec 2020 06:10:38 +0000	[thread overview]
Message-ID: <bug-210797-202145@https.bugzilla.kernel.org/> (raw)

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

            Bug ID: 210797
           Summary: resize.f2fs over 2 (LVM) disks corrupts whole
                    filesystem
           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: filesystem_f2fs@kernel-bugs.kernel.org
          Reporter: thiemel@centrum.cz
        Regression: No

Scenario: F2FS over 2 LVM volumes; when both volumes size extended, then
resize.f2fs corrupts the F2FS



ftp1 ~ # lvresize -L 4G /dev/vgftp1a/f2fs-testa
  New size (8 extents) matches existing size (8 extents).


ftp1 ~ # lvresize -L 4G /dev/vgftp1b/f2fs-testb
  New size (8 extents) matches existing size (8 extents).


ftp1 ~ # mkfs.f2fs -f -O inode_checksum,sb_checksum,extra_attr -l f2fs-test -c
/dev/vgftp1b/f2fs-testb /dev/vgftp1a/f2fs-testa

        F2FS-tools: mkfs.f2fs Ver: 1.14.0 (2020-08-24)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Label = f2fs-test
Info: Trim is enabled
Info: [/dev/vgftp1a/f2fs-testa] Disk Model: SanDisk SDSSDXPS
Info: [/dev/vgftp1b/f2fs-testb] Disk Model: SanDisk SDSSDXPS
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 16777216 (8192 MB)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
  "Linux version 5.9.15-xeon (root@ftp1.wifizabreh.net) (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: [/dev/vgftp1a/f2fs-testa] Discarding device
Info: This device doesn't support BLKSECDISCARD
Info: Discarded 4096 MB
Info: [/dev/vgftp1b/f2fs-testb] Discarding device
Info: This device doesn't support BLKSECDISCARD
Info: Discarded 4096 MB
Info: Overprovision ratio = 2.220%
Info: Overprovision segments = 186 (GC reserved = 98)
Info: format successful


ftp1 ~ # lvresize -L 5G /dev/vgftp1b/f2fs-testb
  Size of logical volume vgftp1b/f2fs-testb changed from 4.00 GiB (8 extents)
to 5.00 GiB (10 extents).
  Logical volume vgftp1b/f2fs-testb successfully resized.


ftp1 ~ # lvresize -L 5G /dev/vgftp1a/f2fs-testa
  Size of logical volume vgftp1a/f2fs-testa changed from 4.00 GiB (8 extents)
to 5.00 GiB (10 extents).
  Logical volume vgftp1a/f2fs-testa successfully resized.


ftp1 ~ # resize.f2fs /dev/vgftp1a/f2fs-testa
Info: [/dev/vgftp1a/f2fs-testa] Disk Model: SanDisk SDSSDXPS
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 10485760 (5120 MB)
Info: MKFS version
  "Linux version 5.9.15-xeon (root@ftp1.wifizabreh.net) (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 (root@ftp1.wifizabreh.net) (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 (root@ftp1.wifizabreh.net) (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/f2fs-testa blkaddr = 0--fffff
Info: [/dev/vgftp1b/f2fs-testb] Disk Model: SanDisk SDSSDXPS
Info: Device[1] : /dev/vgftp1b/f2fs-testb blkaddr = 100000--1fffff
Info: total FS sectors = 16777216 (8192 MB)
Info: CKPT version = 611403e1
Info: Duplicate valid checkpoint to mirror position 512 -> 1024
Info: Write valid nat_bits in checkpoint
[migrate_block:  56] Migrate node block 3e00 -> 4e00
[migrate_block:  56] Migrate data block 4400 -> 5000
[FIX] (move_one_curseg_info:2798)  --> Move curseg[0] 3 -> 9 after 4e00

[FIX] (move_one_curseg_info:2798)  --> Move curseg[1] 7ef -> a after 4e00

[FIX] (move_one_curseg_info:2798)  --> Move curseg[2] 3f7 -> b after 4e00

[FIX] (move_one_curseg_info:2798)  --> Move curseg[3] 0 -> 8 after 4e00

[FIX] (move_one_curseg_info:2798)  --> Move curseg[4] 1 -> c after 4e00

[FIX] (move_one_curseg_info:2798)  --> Move curseg[5] 2 -> d after 4e00

Info: Write valid nat_bits in checkpoint
Try to do defragement: Done
[migrate_ssa: 270] Info: Done to migrate SSA blocks: sum_blkaddr = 0x2e00 ->
0x3a00
[migrate_nat: 386] Info: Done to migrate NAT blocks: nat_blkaddr = 0xa00 ->
0xa00
[migrate_sit: 444] Info: Done to restore new SIT blocks: 0x600
Info: Write valid nat_bits in checkpoint
[rebuild_checkpoint: 585] Info: Done to rebuild checkpoint blocks
[update_superblock: 695] Info: Done to update superblock

Done: 0.426219 secs


ftp1 ~ # fsck.f2fs /dev/vgftp1a/f2fs-testa
Info: [/dev/vgftp1a/f2fs-testa] Disk Model: SanDisk SDSSDXPS
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 10485760 (5120 MB)
Segment count (5119) mismatch with total segments from devices (4095)   Can't
find a valid F2FS superblock at 0x0
Segment count (5119) mismatch with total segments from devices (4095)   Can't
find a valid F2FS superblock at 0x1

-- 
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
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

             reply	other threads:[~2020-12-20  6:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-20  6:10 bugzilla-daemon [this message]
2020-12-21  2:04 ` [f2fs-dev] [Bug 210797] resize.f2fs over 2 (LVM) disks corrupts whole filesystem bugzilla-daemon
2023-09-29 14:47 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-210797-202145@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.