• Chris Leech's avatar
    iSCSI: let session recovery_tmo sysfs writes persist across recovery · 9c8108a4
    Chris Leech authored
    The iSCSI session recovery_tmo setting is writeable in sysfs, but it's
    also set every time a connection is established when parameters are set
    from iscsid over netlink.  That results in the timeout being reset to
    the default value after every recovery.
    
    The DM multipath tools want to use the sysfs interface to lower the
    default timeout when there are multiple paths to fail over.  It has
    caused confusion that we have a writeable sysfs value that seem to keep
    resetting itself.
    
    This patch adds an in-kernel flag that gets set once a sysfs write
    occurs, and then ignores netlink parameter setting once it's been
    modified via the sysfs interface.  My thinking here is that the sysfs
    interface is much simpler for external tools to influence the session
    timeout, but if we're going to allow it to be modified directly we
    should ensure that setting is maintained.
    Signed-off-by: default avatarChris Leech <cleech@redhat.com>
    Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
    Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
    9c8108a4
scsi_transport_iscsi.h 17.2 KB