linux/drivers/nvme/target
Dennis Maisenbacher ddb0d1d4d4 nvmet: fix mar and mor off-by-one errors
[ Upstream commit b7e97872a6 ]

Maximum Active Resources (MAR) and Maximum Open Resources (MOR) are 0's
based vales where a value of 0xffffffff indicates that there is no limit.

Decrement the values that are returned by bdev_max_open_zones and
bdev_max_active_zones as the block layer helpers are not 0's based.
A 0 returned by the block layer helpers indicates no limit, thus convert
it to 0xffffffff (U32_MAX).

Fixes: aaf2e048af ("nvmet: add ZBD over ZNS backend support")
Suggested-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2022-09-15 10:47:16 +02:00
..
admin-cmd.c nvmet: use a private workqueue instead of the system workqueue 2022-03-29 09:29:04 +02:00
configfs.c nvmet: add a clear_ids attribute for passthru targets 2022-06-30 08:23:24 +02:00
core.c nvmet: fix a use-after-free 2022-09-15 10:47:11 +02:00
discovery.c nvmet: register discovery subsystem as 'current' 2021-10-27 08:06:04 +02:00
fabrics-cmd.c nvmet: set 'CNTRLTYPE' in the identify controller data 2021-10-20 19:16:02 +02:00
fc.c nvmet: use a private workqueue instead of the system workqueue 2022-03-29 09:29:04 +02:00
fcloop.c nvmet: use a private workqueue instead of the system workqueue 2022-03-29 09:29:04 +02:00
io-cmd-bdev.c block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD 2022-04-17 19:49:59 -06:00
io-cmd-file.c nvmet: use a private workqueue instead of the system workqueue 2022-03-29 09:29:04 +02:00
Kconfig nvme: Have NVME_FABRICS select NVME_CORE instead of transport drivers 2021-08-16 21:03:18 +02:00
loop.c nvmet: use a private workqueue instead of the system workqueue 2022-03-29 09:29:04 +02:00
Makefile nvmet: add ZBD over ZNS backend support 2021-06-17 15:51:21 +02:00
nvmet.h nvmet: add a clear_ids attribute for passthru targets 2022-06-30 08:23:24 +02:00
passthru.c nvmet: add a clear_ids attribute for passthru targets 2022-06-30 08:23:24 +02:00
rdma.c RDMA: Split kernel-only global device caps from uverbs device caps 2022-04-06 15:02:13 -03:00
tcp.c nvmet-tcp: fix lockdep complaint on nvmet_tcp_wq flush during queue teardown 2022-08-25 11:45:47 +02:00
trace.c nvmet: add set feature tracing support 2021-08-16 14:42:23 +02:00
trace.h nvmet: use min of device_path and disk len 2021-02-10 16:38:05 +01:00
zns.c nvmet: fix mar and mor off-by-one errors 2022-09-15 10:47:16 +02:00