From: Mikulas Patocka <mpatocka@redhat.com>
To: Itai Handler <itai.handler@gmail.com>
Cc: Eric Biggers <ebiggers@kernel.org>,
Milan Broz <gmazyland@gmail.com>,
Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
Benjamin Marzinski <bmarzins@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
dm-devel@lists.linux.dev, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/1] dm-crypt: allow encryption sector size up to PAGE_SIZE
Date: Wed, 23 Sep 2026 13:59:52 +0200 (CEST) [thread overview]
Message-ID: <947ecfba-353b-753e-53d1-30d894822401@redhat.com> (raw)
In-Reply-To: <20260923113903.901245-1-itai.handler@gmail.com>
On Wed, 23 Sep 2026, Itai Handler wrote:
> A torn sector is possible today
> -------------------------------
>
> Consumer NVMe are generally shipped with 512-byte logical blocks and
> stay that way in use. Installing Linux does not change it: partitioning
> and mkfs work inside the logical blocks the drive already exposes.
> Changing the block size is a separate low-level operation - nvme format
> with a different LBA format - which is destructive, which no installer
> performs, and which a drive may not offer at all.
>
> The machine I am writing from is one: a Samsung PM981a carrying a
> complete Ubuntu install - GPT, EFI partition, /boot, and the rest of the
> drive as LUKS over dm-crypt with LVM and ext4 on top - and it still
> reports logical_block_size = physical_block_size = 512, with no
> atomic_write_* attributes at all. The dm-crypt device on it reports a
> 512-byte logical block too.
I did some benchmarking some times ago - and all the SSDs that I tested
had worse IOPS for sub-4k writes than for 4k-aligned writes. This means
that the SSDs have 4k sectors internally and do read-modify-write cycle
for sub-4k writes.
The SATA standard doesn't specify well what 'physical block size' should
mean on SSD - the result is that some SATA SSDs report physical block size
512 and some 4k.
The SSDs have remapping table that maps logical blocks to locations in the
flash chips - and RAM is expensive, so I doubt that any SSD vendor would
put 8 times more RAM on the SSD in order to map 512-byte sectors
individually.
Mikulas
next prev parent reply other threads:[~2026-09-23 12:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 12:03 Itai Handler
2026-09-22 12:03 ` [PATCH v2 1/1] " Itai Handler
2026-09-22 12:34 ` [PATCH v2 0/1] " Itai Handler
2026-09-22 13:07 ` Milan Broz
2026-09-22 13:49 ` Itai Handler
2026-09-22 21:34 ` Eric Biggers
2026-09-23 7:29 ` Itai Handler
2026-09-23 9:58 ` Mikulas Patocka
2026-09-23 11:39 ` Itai Handler
2026-09-23 11:59 ` Mikulas Patocka [this message]
2026-09-23 12:43 ` Itai Handler
2026-09-23 15:28 ` David Laight
2026-09-23 15:42 ` Itai Handler
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=947ecfba-353b-753e-53d1-30d894822401@redhat.com \
--to=mpatocka@redhat.com \
--cc=agk@redhat.com \
--cc=bmarzins@redhat.com \
--cc=corbet@lwn.net \
--cc=dm-devel@lists.linux.dev \
--cc=ebiggers@kernel.org \
--cc=gmazyland@gmail.com \
--cc=itai.handler@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=snitzer@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®