[PATCH V2 0/4] nvmet: admin-cmd related cleanups and a fix

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Sun Jan 3 23:51:59 EST 2021


Hi,

There are three functions where local variable ns is used instead of
using req->ns which leads to duplicate nvmet_put_namespace() calls.
We can just use req->ns and not the local variable to avoid duplicate
calls. First three patches fix that.

The last patch sets the right error status code when namespace is not
found in nvmet_execute_identify_ns().

I've tested this series with nvme blktests, all the testcases are
passing.

-ck

Changes from V1:-

1. Rebase and retest on the latest nvme-5.11.

Chaitanya Kulkarni (4):
  nvmet: remove extra variable in smart log nsid
  nvmet: remove extra variable in identify ns
  nvmet: remove extra variable in id-desclist
  nvmet: set right status on error in id-ns handler

 drivers/nvme/target/admin-cmd.c | 77 +++++++++++++++++----------------
 1 file changed, 39 insertions(+), 38 deletions(-)

Test Result :-

blktests (master) # ./check tests/nvme/
nvme/002 (create many subsystems and test discovery)         [passed]
    runtime  24.027s  ...  24.214s
nvme/003 (test if we're sending keep-alives to a discovery controller) [passed]
    runtime  10.134s  ...  10.134s
nvme/004 (test nvme and nvmet UUID NS descriptors)           [passed]
    runtime  2.463s  ...  2.436s
nvme/005 (reset local loopback target)                       [not run]
    nvme_core module does not have parameter multipath
nvme/006 (create an NVMeOF target with a block device-backed ns) [passed]
    runtime  0.091s  ...  0.093s
nvme/007 (create an NVMeOF target with a file-backed ns)     [passed]
    runtime  0.061s  ...  0.062s
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
    runtime  2.446s  ...  2.457s
nvme/009 (create an NVMeOF host with a file-backed ns)       [passed]
    runtime  2.457s  ...  2.427s
nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  19.340s  ...  28.696s
nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  225.867s  ...  235.098s
nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  42.473s  ...  42.824s
nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  251.344s  ...  714.369s
nvme/014 (flush a NVMeOF block device-backed ns)             [passed]
    runtime  21.070s  ...  30.622s
nvme/015 (unit test for NVMe flush for file backed ns)       [passed]
    runtime  23.212s  ...  29.880s
nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [passed]
    runtime  14.002s  ...  18.465s
nvme/017 (create/delete many file-ns and test discovery)     [passed]
    runtime  13.758s  ...  14.368s
nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed]
    runtime  2.424s  ...  2.458s
nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed]
    runtime  2.439s  ...  2.520s
nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed]
    runtime  2.409s  ...  2.586s
nvme/021 (test NVMe list command on NVMeOF file-backed ns)   [passed]
    runtime  2.440s  ...  2.470s
nvme/022 (test NVMe reset command on NVMeOF file-backed ns)  [passed]
    runtime  2.843s  ...  3.091s
nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed]
    runtime  2.439s  ...  2.520s
nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed]
    runtime  2.419s  ...  2.451s
nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed]
    runtime  2.417s  ...  2.582s
nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed]
    runtime  2.399s  ...  2.546s
nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed]
    runtime  2.419s  ...  2.641s
nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed]
    runtime  2.394s  ...  2.575s
nvme/029 (test userspace IO via nvme-cli read/write interface) [passed]
    runtime  2.694s  ...  3.300s
nvme/030 (ensure the discovery generation counter is updated appropriately) [passed]
    runtime  0.327s  ...  0.390s
nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed]
    runtime  13.381s  ...  15.152s
nvme/038 (test deletion of NVMeOF subsystem without enabling) [passed]
    runtime  0.038s  ...  0.043s

-- 
2.22.1




More information about the Linux-nvme mailing list