diff options
author | Israel Rukshin <israelr@mellanox.com> | 2020-05-19 17:05:59 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-05-27 07:12:39 +0200 |
commit | 136cc1ffcf0a3309c59d844cb1a4ddad964ea3d8 (patch) | |
tree | deb76249e6604da68786594af290fce847394b06 /drivers/nvme/target/core.c | |
parent | 26af180c1bd9cdd6f9b96d8df58b51d5900a2978 (diff) | |
download | linux-136cc1ffcf0a3309c59d844cb1a4ddad964ea3d8.tar.gz linux-136cc1ffcf0a3309c59d844cb1a4ddad964ea3d8.tar.bz2 linux-136cc1ffcf0a3309c59d844cb1a4ddad964ea3d8.zip |
nvmet: rename nvmet_check_data_len to nvmet_check_transfer_len
The function doesn't check only the data length, because the transfer
length includes also the metadata length in some cases. This is
preparation for adding metadata (T10-PI) support.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/core.c')
-rw-r--r-- | drivers/nvme/target/core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index fb78b165c123..a4ed70e4afe3 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -950,9 +950,9 @@ void nvmet_req_uninit(struct nvmet_req *req) } EXPORT_SYMBOL_GPL(nvmet_req_uninit); -bool nvmet_check_data_len(struct nvmet_req *req, size_t data_len) +bool nvmet_check_transfer_len(struct nvmet_req *req, size_t len) { - if (unlikely(data_len != req->transfer_len)) { + if (unlikely(len != req->transfer_len)) { req->error_loc = offsetof(struct nvme_common_command, dptr); nvmet_req_complete(req, NVME_SC_SGL_INVALID_DATA | NVME_SC_DNR); return false; @@ -960,7 +960,7 @@ bool nvmet_check_data_len(struct nvmet_req *req, size_t data_len) return true; } -EXPORT_SYMBOL_GPL(nvmet_check_data_len); +EXPORT_SYMBOL_GPL(nvmet_check_transfer_len); bool nvmet_check_data_len_lte(struct nvmet_req *req, size_t data_len) { |