1. 26 7月, 2017 1 次提交
    • J
      nvme-fc: revise TRADDR parsing · 9c5358e1
      James Smart 提交于
      The FC-NVME spec hasn't locked down on the format string for TRADDR.
      Currently the spec is lobbying for "nn-<16hexdigits>:pn-<16hexdigits>"
      where the wwn's are hex values but not prefixed by 0x.
      
      Most implementations so far expect a string format of
      "nn-0x<16hexdigits>:pn-0x<16hexdigits>" to be used. The transport
      uses the match_u64 parser which requires a leading 0x prefix to set
      the base properly. If it's not there, a match will either fail or return
      a base 10 value.
      
      The resolution in T11 is pushing out. Therefore, to fix things now and
      to cover any eventuality and any implementations already in the field,
      this patch adds support for both formats.
      
      The change consists of replacing the token matching routine with a
      routine that validates the fixed string format, and then builds
      a local copy of the hex name with a 0x prefix before calling
      the system parser.
      
      Note: the same parser routine exists in both the initiator and target
      transports. Given this is about the only "shared" item, we chose to
      replicate rather than create an interdendency on some shared code.
      Signed-off-by: NJames Smart <james.smart@broadcom.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      9c5358e1
  2. 25 7月, 2017 1 次提交
    • J
      nvme-fc: address target disconnect race conditions in fcp io submit · 8b25f351
      James Smart 提交于
      There are cases where threads are in the process of submitting new
      io when the LLDD calls in to remove the remote port. In some cases,
      the next io actually goes to the LLDD, who knows the remoteport isn't
      present and rejects it. To properly recovery/restart these i/o's we
      don't want to hard fail them, we want to treat them as temporary
      resource errors in which a delayed retry will work.
      
      Add a couple more checks on remoteport connectivity and commonize the
      busy response handling when it's seen.
      Signed-off-by: NJames Smart <james.smart@broadcom.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      8b25f351
  3. 06 7月, 2017 2 次提交
  4. 04 7月, 2017 3 次提交
  5. 02 7月, 2017 2 次提交
  6. 28 6月, 2017 6 次提交
  7. 15 6月, 2017 4 次提交
  8. 09 6月, 2017 1 次提交
  9. 07 6月, 2017 2 次提交
  10. 05 6月, 2017 1 次提交
  11. 26 5月, 2017 1 次提交
  12. 23 5月, 2017 6 次提交
  13. 21 5月, 2017 2 次提交
  14. 02 5月, 2017 1 次提交
  15. 26 4月, 2017 1 次提交
  16. 24 4月, 2017 4 次提交
    • C
      nvme-fc: mark two symbols static · baee29ac
      Christoph Hellwig 提交于
      Found by sparse.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NJames Smart <james.smart@broadcom.com>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
      baee29ac
    • J
      nvme_fc: add controller reset support · 61bff8ef
      James Smart 提交于
      This patch actually does quite a few things.  When looking to add
      controller reset support, the organization modeled after rdma was
      very fragmented. rdma duplicates the reset and teardown paths and does
      different things to the block layer on the two paths. The code to build
      up the controller is also duplicated between the initial creation and
      the reset/error recovery paths. So I decided to make this sane.
      
      I reorganized the controller creation and teardown so that there is a
      connect path and a disconnect path.  Initial creation obviously uses
      the connect path.  Controller teardown will use the disconnect path,
      followed last access code. Controller reset will use the disconnect
      path to stop operation, and then the connect path to re-establish
      the controller.
      
      Along the way, several things were fixed
      - aens were not properly set up. They are allocated differently from
        the per-request structure on the blk queues.
      - aens were oddly torn down. the prior patch corrected to abort, but
        we still need to dma unmap and free relative elements.
      - missed a few ref counting points: in aen completion and on i/o's
        that fail
      - controller initial create failure paths were still confused vs teardown
        before converting to ref counting vs after we convert to refcounting.
      Signed-off-by: NJames Smart <james.smart@broadcom.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      61bff8ef
    • J
      nvme_fc: add aen abort to teardown · 78a7ac26
      James Smart 提交于
      Add abort support for aens. Commonized the op abort to apply to aen or
      real ios (caused some reorg/routine movement). Abort path sets termination
      flag in prep for next patch that will be watching i/o abort completion
      before proceeding with controller teardown.
      
      Now that we're aborting aens, the "exit" code that simply cleared out
      their context no longer applies.
      
      Also clarified how we detect an AEN vs a normal io - by a flag, not
      by whether a rq exists or the a rqno is out of range.
      
      Note: saw some interesting cases where if the queues are stopped and
      we're waiting for the aborts, the core layer can call the complete_rq
      callback for the io. So the io completion synchronizes link side completion
      with possible blk layer completion under error.
      Signed-off-by: NJames Smart <james.smart@broadcom.com>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      78a7ac26
    • J
      nvme_fc: fix command id check · 458f280d
      James Smart 提交于
      The code validates the command_id in the response to the original
      sqe command. But prior code was using the rq->rqno as the sqe command
      id. The core layer overwrites what the transport set there originally.
      
      Use the actual sqe content.
      Signed-off-by: NJames Smart <james.smart@broadcom.com>
      Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      458f280d
  17. 21 4月, 2017 2 次提交