]> www.infradead.org Git - users/dwmw2/linux.git/commit
dm zoned: support zone sizes smaller than 128MiB
authorDmitry Fomichev <dmitry.fomichev@wdc.com>
Tue, 24 Dec 2019 01:05:46 +0000 (17:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:36:56 +0000 (04:36 -0800)
commita64bb66fb641a33b0d412470739afdf7e2f90c83
treef5ce37586634ae4e7e3b9918a63abb6a9fdf906c
parent5d58beae097b13f9cc4a6521bfd5aa3564bb01b4
dm zoned: support zone sizes smaller than 128MiB

commit b39962950339912978484cdac50069258545d753 upstream.

dm-zoned is observed to log failed kernel assertions and not work
correctly when operating against a device with a zone size smaller
than 128MiB (e.g. 32768 bits per 4K block). The reason is that the
bitmap size per zone is calculated as zero with such a small zone
size. Fix this problem and also make the code related to zone bitmap
management be able to handle per zone bitmaps smaller than a single
block.

A dm-zoned-tools patch is required to properly format dm-zoned devices
with zone sizes smaller than 128MiB.

Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-zoned-metadata.c