• Tatsuya Sasaki's avatar
    nvme: update keep alive interval when kato is modified · b58da2d2
    Tatsuya Sasaki authored
    Currently the connection between host and NVMe-oF target gets
    disconnected by keep-alive timeout when a user connects to a target
    with a relatively large kato value and then sets the smaller kato
    with a set features command (e.g. connects with 60 seconds kato value
    and then sets 10 seconds kato value).
    
    The cause is that keep alive command interval on the host, which is
    defined as unsigned int kato in nvme_ctrl structure, does not follow
    the kato value changes.
    
    This patch updates the keep alive interval in the following steps when
    the kato is modified by a set features command: stops the keep alive
    work queue, then sets the kato as new timer value and re-start the queue.
    Signed-off-by: default avatarTatsuya Sasaki <tatsuya6.sasaki@kioxia.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    b58da2d2
core.c 121 KB