linux-stable/drivers/nvme/host
Niklas Cassel 793fcab83f nvme: report write pointer for a full zone as zone start + zone len
The write pointer in NVMe ZNS is invalid for a zone in zone state full.
The same also holds true for ZAC/ZBC.

The current behavior for NVMe is to simply propagate the wp reported by
the drive, even for full zones. Since the wp is invalid for a full zone,
the wp reported by the drive may be any value.

The way that the sd_zbc driver handles a full zone is to always report
the wp as zone start + zone len, regardless of what the drive reported.
null_blk also follows this convention.

Do the same for NVMe, so that a BLKREPORTZONE ioctl reports the write
pointer for a full zone in a consistent way, regardless of the interface
of the underlying zoned block device.

blkzone report before patch:
start: 0x000040000, len 0x040000, cap 0x03e000, wptr 0xfffffffffffbfff8
reset:0 non-seq:0, zcond:14(fu) [type: 2(SEQ_WRITE_REQUIRED)]

blkzone report after patch:
start: 0x000040000, len 0x040000, cap 0x03e000, wptr 0x040000 reset:0
non-seq:0, zcond:14(fu) [type: 2(SEQ_WRITE_REQUIRED)]

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2021-12-06 08:52:08 +01:00
..
core.c nvme: disable namespace access for unsupported metadata 2021-12-06 08:52:08 +01:00
fabrics.c nvme-fabrics: ignore invalid fast_io_fail_tmo values 2021-11-23 17:22:41 +01:00
fabrics.h nvme: display correct subsystem NQN 2021-10-20 19:16:02 +02:00
fault_inject.c
fc.c for-5.16/drivers-2021-10-29 2021-11-01 09:27:38 -07:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme-hwmon: Return error code when registration fails 2021-03-05 13:41:03 +01:00
ioctl.c remove the lightnvm subsystem 2021-08-14 15:54:09 -06:00
Kconfig nvme: Have NVME_FABRICS select NVME_CORE instead of transport drivers 2021-08-16 21:03:18 +02:00
Makefile remove the lightnvm subsystem 2021-08-14 15:54:09 -06:00
multipath.c nvmet: use flex_array_size and struct_size 2021-10-27 08:06:41 +02:00
nvme.h for-5.16/drivers-2021-10-29 2021-11-01 09:27:38 -07:00
pci.c for-5.16/drivers-2021-10-29 2021-11-01 09:27:38 -07:00
rdma.c for-5.16/drivers-2021-10-29 2021-11-01 09:27:38 -07:00
tcp.c nvme-tcp: fix memory leak when freeing a queue 2021-11-23 17:22:41 +01:00
trace.c nvme: add set feature tracing support 2021-08-16 14:42:23 +02:00
trace.h nvme: fix nvme_setup_command metadata trace event 2021-07-21 09:55:44 +02:00
zns.c nvme: report write pointer for a full zone as zone start + zone len 2021-12-06 08:52:08 +01:00