nvmet: fix a wrong error status returned in error log page
authorAmit <amit.engel@emc.com>
Thu, 12 Sep 2019 05:29:39 +0000 (08:29 +0300)
committerSagi Grimberg <sagi@grimberg.me>
Thu, 12 Sep 2019 15:50:46 +0000 (08:50 -0700)
commit5f8badbcbeac298a77ee634a10a375f3e66923f9
tree17b87a38201c2d41661454c49eb19e3639994679
parent85f8a4351dfd75a719a82c681739e7bcf17bbf9e
nvmet: fix a wrong error status returned in error log page

When the command data_len cannot hold all the controller errors,
we should simply return as much errors as we can fit
instead of failing the command.

Signed-off-by: Amit Engel <amit.engel@dell.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/target/admin-cmd.c