]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm-bufio: align write boundary on physical block size
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 20 Oct 2025 12:48:13 +0000 (14:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:44 +0000 (10:14 +0100)
commit1e1104eb8aa27768e02c7bc19afd59accf7cf23b
tree4c16f403c3e4358f4801b03260f77f3b26932566
parent85787641830823355c4fb1f624797467e6bf028d
dm-bufio: align write boundary on physical block size

commit d0ac06ae53be0cdb61f5fe6b62d25d3317c51657 upstream.

There may be devices with physical block size larger than 4k.

If dm-bufio sends I/O that is not aligned on physical block size,
performance is degraded.

The 4k minimum alignment limit is there because some SSDs report logical
and physical block size 512 despite having 4k internally - so dm-bufio
shouldn't send I/Os not aligned on 4k boundary, because they perform
badly (the SSD does read-modify-write for them).

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-bufio.c