On Fri, 15 Jan 2021, J. Bruce Fields wrote: > Any recommendations? I spent some time with blktrace/blkparse/btt and > can't make head or tails of them, I'm afraid. > > --b. Hi Try this patch: From: Mikulas Patocka <mpatocka@xxxxxxxxxx> Fix a thinko in ssd_commit_superblock. region.count is in sectors, not bytes. This bug doesn't corrupt data, but it causes performance degradation. Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx> Fixes: dc8a01ae1dbd ("dm writecache: optimize superblock write") Cc: stable@xxxxxxxxxxxxxxx # v5.7 Reported-by: J. Bruce Fields <bfields@xxxxxxxxxx> --- drivers/md/dm-writecache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/drivers/md/dm-writecache.c =================================================================== --- linux-2.6.orig/drivers/md/dm-writecache.c 2021-01-23 10:51:31.000000000 +0100 +++ linux-2.6/drivers/md/dm-writecache.c 2021-01-23 15:16:53.000000000 +0100 @@ -523,7 +523,7 @@ static void ssd_commit_superblock(struct region.bdev = wc->ssd_dev->bdev; region.sector = 0; - region.count = PAGE_SIZE; + region.count = PAGE_SIZE >> SECTOR_SHIFT; if (unlikely(region.sector + region.count > wc->metadata_sectors)) region.count = wc->metadata_sectors - region.sector; -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel