]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
nvme: fix Write Zeroes limitations
authorChristoph Hellwig <hch@lst.de>
Mon, 15 Mar 2021 09:32:07 +0000 (10:32 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:12 +0000 (15:42 -0500)
commit0851c788228957465f83533da310a9aaf74bd43f
treeaa817a05765e10e17a08ede49a078b368e4b0368
parent98259beddc45aa3615355a74da118e9510c2f2c0
nvme: fix Write Zeroes limitations

BugLink: https://bugs.launchpad.net/bugs/1921712
commit b94e8cd2e6a94fc7563529ddc82726a7e77e04de upstream.

We voluntarily limit the Write Zeroes sizes to the MDTS value provided by
the hardware, but currently get the units wrong, so fix that.

Fixes: 6e02318eaea5 ("nvme: add support for the Write Zeroes command")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Tested-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/nvme/host/core.c