summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorChris Leech <cleech@redhat.com>2015-06-16 16:07:13 -0700
committerJames Bottomley <JBottomley@Odin.com>2015-07-30 12:43:00 -0700
commit9c8108a4d3a837c51a29f28229a06d97654eaeb6 (patch)
tree1e7fbe222eca926a5cef1507d95ed08b407bd437 /include/scsi
parentaaf1b059387863ac9675eb42d01d03415c7529a5 (diff)
downloadlinux-9c8108a4d3a837c51a29f28229a06d97654eaeb6.tar.bz2
iSCSI: let session recovery_tmo sysfs writes persist across recovery
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: Chris Leech <cleech@redhat.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_transport_iscsi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 2555ee5343fd..6183d20a01fb 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -241,6 +241,7 @@ struct iscsi_cls_session {
/* recovery fields */
int recovery_tmo;
+ bool recovery_tmo_sysfs_override;
struct delayed_work recovery_work;
unsigned int target_id;