• Nitzan Carmi's avatar
    nvme-rdma: fix sysfs invoked reset_ctrl error flow · 8000d1fd
    Nitzan Carmi authored
    When reset_controller that is invoked by sysfs fails,
    it enters an error flow which practically removes the
    nvme ctrl entirely (similar to delete_ctrl flow). It
    causes the system to hang, since a sysfs attribute cannot
    be unregistered by one of its own methods.
    
    This can be fixed by calling delete_ctrl as a work rather
    than sequential code. In addition, it should give the ctrl
    a chance to recover using reconnection mechanism (consistant
    with FC reset_ctrl error flow). Also, while we're here, return
    suitable errno in case the reset ended with non live ctrl.
    Signed-off-by: default avatarNitzan Carmi <nitzanc@mellanox.com>
    Reviewed-by: default avatarMax Gurtovoy <maxg@mellanox.com>
    Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
    8000d1fd
core.c 90.1 KB