linux/drivers/nvme/target
Keith Busch d808b7f759 nvmet: fix discover log page when offsets are used
The nvme target hadn't been taking the Get Log Page offset parameter
into consideration, and so has been returning corrupted log pages when
offsets are used. Since many tools, including nvme-cli, split the log
request to 4k, we've been breaking discovery log responses when more
than 3 subsystems exist.

Fix the returned data by internally generating the entire discovery
log page and copying only the requested bytes into the user buffer. The
command log page offset type has been modified to a native __le64 to
make it easier to extract the value from a command.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Tested-by: Minwoo Im <minwoo.im@samsung.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2019-04-11 17:28:30 +02:00
..
Kconfig nvmet-tcp: add NVMe over TCP target driver 2018-12-13 09:58:57 +01:00
Makefile nvmet-tcp: add NVMe over TCP target driver 2018-12-13 09:58:57 +01:00
admin-cmd.c nvmet: fix discover log page when offsets are used 2019-04-11 17:28:30 +02:00
configfs.c nvmet: convert to SPDX identifiers 2019-02-20 07:22:42 -07:00
core.c nvmet: fix error flow during ns enable 2019-03-28 18:15:03 +01:00
discovery.c nvmet: fix discover log page when offsets are used 2019-04-11 17:28:30 +02:00
fabrics-cmd.c nvmet: convert to SPDX identifiers 2019-02-20 07:22:42 -07:00
fc.c nvmet-fc: bring Disconnect into compliance with FC-NVME spec 2019-03-13 12:57:34 -06:00
fcloop.c nvmet-fcloop: convert to SPDX identifiers 2019-02-20 07:22:34 -07:00
io-cmd-bdev.c nvmet: ignore EOPNOTSUPP for discard 2019-03-13 12:57:34 -06:00
io-cmd-file.c nvmet: fix building bvec from sg list 2019-03-28 18:15:02 +01:00
loop.c nvme-loop: convert to SPDX identifiers 2019-02-20 07:22:36 -07:00
nvmet.h nvmet: fix discover log page when offsets are used 2019-04-11 17:28:30 +02:00
rdma.c nvmet-rdma: convert to SPDX identifiers 2019-02-20 07:22:39 -07:00
tcp.c nvmet-tcp: fix uninitialized variable access 2019-01-16 09:44:20 -07:00