1. 25 9月, 2017 1 次提交
  2. 29 8月, 2017 2 次提交
    • J
      nvme-fc: Reattach to localports on re-registration · 5533d424
      James Smart 提交于
      If the LLDD resets or detaches from an fc port, the LLDD will
      deregister all remoteports seen by the fc port and deregister the
      localport associated with the fc port. The teardown of the localport
      structure will be held off due to reference counting until all the
      remoteports are removed (and they are held off until all
      controllers/associations to terminated). Currently, if the fc port
      is reinit/reattached and registered again as a localport it is
      treated as an independent entity from the prior localport and all
      prior remoteports and controllers cannot be revived. They are
      created as new and separate entities.
      
      This patch changes the localport registration to look at the known
      localports that are waiting to be torndown. If they are the same port
      based on wwn's, the local port is transitioned out of the teardown
      state.  This allows the remote ports and controller connections to
      be reestablished and resumed as long as the localport can also be
      reregistered within the timeout windows.
      
      The patch adds a new routine nvme_fc_attach_to_unreg_lport() with
      the functionality and moves the lport get/put routines to avoid
      forward references.
      Signed-off-by: NJames Smart <james.smart@broadcom.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      5533d424
    • S
      nvme: Add admin_tagset pointer to nvme_ctrl · 34b6c231
      Sagi Grimberg 提交于
      Will be used when we centralize control flows.
      Signed-off-by: NSagi Grimberg <sagi@grimberg.me>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      34b6c231
  3. 18 8月, 2017 1 次提交
  4. 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
  5. 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
  6. 06 7月, 2017 2 次提交
  7. 04 7月, 2017 3 次提交
  8. 02 7月, 2017 2 次提交
  9. 28 6月, 2017 6 次提交
  10. 15 6月, 2017 4 次提交
  11. 09 6月, 2017 1 次提交
  12. 07 6月, 2017 2 次提交
  13. 05 6月, 2017 1 次提交
  14. 26 5月, 2017 1 次提交
  15. 23 5月, 2017 6 次提交
  16. 21 5月, 2017 2 次提交
  17. 02 5月, 2017 1 次提交
  18. 26 4月, 2017 1 次提交
  19. 24 4月, 2017 2 次提交
    • 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