• Daniel Wagner's avatar
    nvmet: force reconnect when number of queue changes · 2be2cd52
    Daniel Wagner authored
    In order to test queue number changes we need to make sure that the
    host reconnects. Because only when the host disconnects from the
    target the number of queues are allowed to change according the spec.
    
    The initial idea was to disable and re-enable the ports and have the
    host wait until the KATO timer expires, triggering error
    recovery. Though the host would see a DNR reply when trying to
    reconnect. Because of the DNR bit the connection is dropped
    completely. There is no point in trying to reconnect with the same
    parameters according the spec.
    
    We can force to reconnect the host is by deleting all controllers. The
    host will observe any newly posted request to fail and thus starts the
    error recovery but this time without the DNR bit set.
    Signed-off-by: default avatarDaniel Wagner <dwagner@suse.de>
    Reviewed-by: default avatarChaitanya Kulkarni  <kch@nvidia.com>
    Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
    Acked-by: default avatarSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    2be2cd52
configfs.c 46 KB