• 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
fc.c 77.9 KB