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)
committerMikulas Patocka <mpatocka@redhat.com>
Wed, 10 Dec 2025 18:28:22 +0000 (19:28 +0100)
commitd0ac06ae53be0cdb61f5fe6b62d25d3317c51657
tree8ed71307df50056811081721f42f6de5c5791492
parentce51c6963a91cc6d5c9cf6c3735991882f72587d
dm-bufio: align write boundary on physical block size

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
drivers/md/dm-bufio.c