dm writecache: write at least 4k when committing
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 21 Jun 2021 18:48:29 +0000 (14:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 08:01:27 +0000 (10:01 +0200)
commit0b5187d7245af9e3f7cf48f76b9bfa5fad8cd400
treee310538f6238cce745e261f9d88b9a36274831de
parent31afeb3f5e7848675c31015d6b2ba601fd81e920
dm writecache: write at least 4k when committing

commit 867de40c4c23e6d7f89f9ce4272a5d1b1484c122 upstream.

SSDs perform badly with sub-4k writes (because they perfrorm
read-modify-write internally), so make sure writecache writes at least
4k when committing.

Fixes: 991bd8d7bc78 ("dm writecache: commit just one block, not a full page")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-writecache.c