All of lore.kernel.org
 help / color / mirror / Atom feed
From: nl6720 via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: linux-f2fs-devel@lists.sourceforge.net, Chao Yu <chao@kernel.org>
Subject: Re: [f2fs-dev] [PATCH] f2fs-tools: prefer physical over logical block size
Date: Sun, 27 Apr 2025 12:30:31 +0300	[thread overview]
Message-ID: <2375737.ElGaqSPkdT@nl6720.me> (raw)
In-Reply-To: <c2f5bc82-3e8d-4ca8-9818-d90be8ce374f@kernel.org>

On Sunday, 27 April 2025 11:45:59 EEST Chao Yu wrote:
> On 4/25/25 09:36, nl6720 via Linux-f2fs-devel wrote:
> > Some drives operate in "512e" configuration with their logical block
> > size set to 512 bytes for legacy compatibility reasons while providing
> > a more optimal 4096 byte value as the physical block size.
> > 
> > Since the physical block size is the smallest unit a physical storage
> > device can write atomically, prefer it over the logical block size.
> > 
> > Closes: https://github.com/jaegeuk/f2fs-tools/issues/29
> 
> f2fs uses PAGE_SIZE as block size, commonly it's 4096 rather than 512?

The thing mkfs.f2fs calls "sector size" in its output is 512 on 512e drives
instead of 4096.
E.g.:

    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/disk/by-partlabel/512e] Disk Model: QEMU HARDDISK   
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 124997632 (61034 MB)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
  "Linux version 6.13.8-arch1-1 (linux@archlinux) (gcc (GCC) 14.2.1 20250207, GNU ld (GNU Binutils) 2.44) #1 SMP PREEMPT_DYNAMIC Sun, 23 Mar 2025 17:17:30 +0000"
Info: [/dev/disk/by-partlabel/512e] Discarding device
Info: This device doesn't support BLKSECDISCARD
Info: Discarded 61034 MB
Info: Overprovision ratio = 0.590%
Info: Overprovision segments = 179 (GC reserved = 176)
Info: format successful


nl6720




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2025-04-27  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25  1:36 [f2fs-dev] [PATCH] f2fs-tools: prefer physical over logical block size nl6720 via Linux-f2fs-devel
2025-04-27  8:45 ` Chao Yu via Linux-f2fs-devel
2025-04-27  9:30   ` nl6720 via Linux-f2fs-devel [this message]
2025-04-28  7:33     ` Chao Yu via Linux-f2fs-devel
2025-04-29 16:53       ` nl6720 via Linux-f2fs-devel

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=2375737.ElGaqSPkdT@nl6720.me \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=chao@kernel.org \
    --cc=devnull@nl6720.me \
    /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.