1. 19 1月, 2021 1 次提交
    • C
      nvmet: set right status on error in id-ns handler · bffcd507
      Chaitanya Kulkarni 提交于
      The function nvmet_execute_identify_ns() doesn't set the status if call
      to nvmet_find_namespace() fails. In that case we set the status of the
      request to the value return by the nvmet_copy_sgl().
      
      Set the status to NVME_SC_INVALID_NS and adjust the code such that
      request will have the right status on nvmet_find_namespace() failure.
      
      Without this patch :-
      NVME Identify Namespace 3:
      nsze    : 0
      ncap    : 0
      nuse    : 0
      nsfeat  : 0
      nlbaf   : 0
      flbas   : 0
      mc      : 0
      dpc     : 0
      dps     : 0
      nmic    : 0
      rescap  : 0
      fpi     : 0
      dlfeat  : 0
      nawun   : 0
      nawupf  : 0
      nacwu   : 0
      nabsn   : 0
      nabo    : 0
      nabspf  : 0
      noiob   : 0
      nvmcap  : 0
      mssrl   : 0
      mcl     : 0
      msrc    : 0
      nsattr	: 0
      nvmsetid: 0
      anagrpid: 0
      endgid  : 0
      nguid   : 00000000000000000000000000000000
      eui64   : 0000000000000000
      lbaf  0 : ms:0   lbads:0  rp:0 (in use)
      
      With this patch-series :-
      feb3b88b501e (HEAD -> nvme-5.11) nvmet: remove extra variable in identify ns
      6302aa67210a nvmet: remove extra variable in id-desclist
      ed57951da453 nvmet: remove extra variable in smart log nsid
      be384b8c24dc nvmet: set right status on error in id-ns handler
      
      NVMe status: INVALID_NS: The namespace or the format of that namespace is invalid(0xb)
      Signed-off-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      bffcd507
  2. 02 12月, 2020 1 次提交
  3. 27 9月, 2020 1 次提交
  4. 29 7月, 2020 2 次提交
    • L
      nvmet: add passthru code to process commands · c1fef73f
      Logan Gunthorpe 提交于
      Add passthru command handling capability for the NVMeOF target and
      export passthru APIs which are used to integrate passthru
      code with nvmet-core.
      
      The new file passthru.c handles passthru cmd parsing and execution.
      In the passthru mode, we create a block layer request from the nvmet
      request and map the data on to the block layer request.
      
      Admin commands and features are on an allow list as there are a number
      of each that don't make too much sense with passthrough. We use an
      allow list such that new commands can be considered before being blindly
      passed through. In both cases, vendor specific commands are always
      allowed.
      
      We also reject reservation IO commands as the underlying device cannot
      differentiate between multiple hosts behind a fabric.
      Based-on-a-patch-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Signed-off-by: NLogan Gunthorpe <logang@deltatee.com>
      Reviewed-by: NKeith Busch <kbusch@kernel.org>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      c1fef73f
    • C
      nvmet: use xarray for ctrl ns storing · 7774e77e
      Chaitanya Kulkarni 提交于
      This patch replaces the ctrl->namespaces tracking from linked list to
      xarray and improves the performance when accessing one namespce :-
      
      XArray vs Default:-
      
      IOPS and BW (more the better) increase BW (~1.8%):-
      ---------------------------------------------------
      
       XArray :-
        read:  IOPS=160k,  BW=626MiB/s  (656MB/s)(18.3GiB/30001msec)
        read:  IOPS=160k,  BW=626MiB/s  (656MB/s)(18.3GiB/30001msec)
        read:  IOPS=162k,  BW=631MiB/s  (662MB/s)(18.5GiB/30001msec)
      
       Default:-
        read:  IOPS=156k,  BW=609MiB/s  (639MB/s)(17.8GiB/30001msec)
        read:  IOPS=157k,  BW=613MiB/s  (643MB/s)(17.0GiB/30001msec)
        read:  IOPS=160k,  BW=626MiB/s  (656MB/s)(18.3GiB/30001msec)
      
      Submission latency (less the better) decrease (~8.3%):-
      -------------------------------------------------------
      
       XArray:-
        slat  (usec):  min=7,  max=8386,  avg=11.19,  stdev=5.96
        slat  (usec):  min=7,  max=441,   avg=11.09,  stdev=4.48
        slat  (usec):  min=7,  max=1088,  avg=11.21,  stdev=4.54
      
       Default :-
        slat  (usec):  min=8,   max=2826.5k,  avg=23.96,  stdev=3911.50
        slat  (usec):  min=8,   max=503,      avg=12.52,  stdev=5.07
        slat  (usec):  min=8,   max=2384,     avg=12.50,  stdev=5.28
      
      CPU Usage (less the better) decrease (~5.2%):-
      ----------------------------------------------
      
       XArray:-
        cpu  :  usr=1.84%,  sys=18.61%,  ctx=949471,  majf=0,  minf=250
        cpu  :  usr=1.83%,  sys=18.41%,  ctx=950262,  majf=0,  minf=237
        cpu  :  usr=1.82%,  sys=18.82%,  ctx=957224,  majf=0,  minf=234
      
       Default:-
        cpu  :  usr=1.70%,  sys=19.21%,  ctx=858196,  majf=0,  minf=251
        cpu  :  usr=1.82%,  sys=19.98%,  ctx=929720,  majf=0,  minf=227
        cpu  :  usr=1.83%,  sys=20.33%,  ctx=947208,  majf=0,  minf=235.
      Signed-off-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      7774e77e
  5. 08 7月, 2020 1 次提交
  6. 27 5月, 2020 3 次提交
  7. 10 5月, 2020 1 次提交
  8. 26 3月, 2020 2 次提交
  9. 25 3月, 2020 1 次提交
  10. 05 3月, 2020 1 次提交
  11. 10 1月, 2020 1 次提交
  12. 05 11月, 2019 3 次提交
  13. 12 9月, 2019 1 次提交
  14. 30 8月, 2019 1 次提交
  15. 10 7月, 2019 1 次提交
  16. 11 4月, 2019 1 次提交
  17. 20 2月, 2019 1 次提交
  18. 13 12月, 2018 4 次提交
  19. 08 12月, 2018 6 次提交
  20. 17 10月, 2018 1 次提交
  21. 02 10月, 2018 1 次提交
  22. 17 9月, 2018 1 次提交
  23. 08 8月, 2018 1 次提交
    • C
      nvmet: add ns write protect support · dedf0be5
      Chaitanya Kulkarni 提交于
      This patch implements the Namespace Write Protect feature described in
      "NVMe TP 4005a Namespace Write Protect". In this version, we implement
      No Write Protect and Write Protect states for target ns which can be
      toggled by set-features commands from the host side.
      
      For write-protect state transition, we need to flush the ns specified
      as a part of command so we also add helpers for carrying out synchronous
      flush operations.
      Signed-off-by: NChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      [hch: fixed an incorrect endianess conversion, minor cleanups]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      dedf0be5
  24. 28 7月, 2018 3 次提交