Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer the physical block size over the logical block size #29

Open
nl6720 opened this issue Oct 29, 2024 · 0 comments
Open

Prefer the physical block size over the logical block size #29

nl6720 opened this issue Oct 29, 2024 · 0 comments

Comments

@nl6720
Copy link

nl6720 commented Oct 29, 2024

On a block device with a 4096 byte physical block size and 512 byte logical block size (i.e. so called 512e), mkfs.f2fs creates the file system with 512 byte sectors.

# lsblk -t /dev/sdb
NAME   ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE  RA WSAME
sdb            0   4096      0    4096     512    1 none      256 128    0B
└─sdb1         0   4096      0    4096     512    1 none      256 128    0B
# mkfs.f2fs /dev/sdb1

    F2FS-tools: mkfs.f2fs Ver: 1.16.0 (2023-04-11)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Trim is enabled
Info: [/dev/sdb1] Disk Model: QEMU HARDDISK   
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 67104768 (32766 MB)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
  "Linux version 6.10.10-arch1-1 (linux@archlinux) (gcc (GCC) 14.2.1 20240910, GNU ld (GNU Binutils) 2.43.0) #1 SMP PREEMPT_DYNAMIC Thu, 12 Sep 2024 17:21:02 +0000"
Info: [/dev/sdb1] Discarding device
Info: This device doesn't support BLKSECDISCARD
Info: Discarded 32766 MB
Info: Overprovision ratio = 0.810%
Info: Overprovision segments = 132 (GC reserved = 130)
Info: format successful

Most other file system mkfs utilities prefer the underlying block device's physical block size over its logical block size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant