diff options
author | Christoph Hellwig <hch@lst.de> | 2018-06-06 14:39:00 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-07-27 19:12:01 +0200 |
commit | 0e98719b0e4b48b61965e1d1cba037c2005d01d7 (patch) | |
tree | c413633790ddf1fa7961ef92967fa7c117b79e4d /drivers/nvme/host/lightnvm.c | |
parent | 1a37621658fe06b10cf8bac02c32304d2a1c888c (diff) | |
download | linux-0e98719b0e4b48b61965e1d1cba037c2005d01d7.tar.gz linux-0e98719b0e4b48b61965e1d1cba037c2005d01d7.tar.bz2 linux-0e98719b0e4b48b61965e1d1cba037c2005d01d7.zip |
nvme: simplify the API for getting log pages
Merge nvme_get_log and nvme_get_log_ext into a single helper, which takes
a plain nsid instead of the nvme_ns pointer. Also add support for the
log specific field while we're at it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Diffstat (limited to 'drivers/nvme/host/lightnvm.c')
-rw-r--r-- | drivers/nvme/host/lightnvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index d9e4cccd5b66..7e4cf4eb9d66 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -604,8 +604,9 @@ static int nvme_nvm_get_chk_meta(struct nvm_dev *ndev, while (left) { len = min_t(unsigned int, left, max_len); - ret = nvme_get_log_ext(ctrl, ns, NVME_NVM_LOG_REPORT_CHUNK, - dev_meta, len, offset); + ret = nvme_get_log(ctrl, ns->head->ns_id, + NVME_NVM_LOG_REPORT_CHUNK, 0, dev_meta, len, + offset); if (ret) { dev_err(ctrl->device, "Get REPORT CHUNK log error\n"); break; |