]> 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:17:02 +0000 (10:17 +0100)
commitc7d8c1018aa6b898b03ec15ae4a66b602a868af3
tree263c65614a3324f963609021cb732c2a91436b45
parente36fd1a4c2ec8485b3ad48833c1fed4bb02348e6
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