diff options
author | Lee Duncan <leeman.duncan@gmail.com> | 2020-11-17 11:53:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 11:53:04 -0800 |
commit | bf035ee1784f28e81917c5bd9d930bf238f372e2 (patch) | |
tree | 751835ada094ab6701f7fe8d0974433d69f856f4 | |
parent | 5a2ee575bc61141054e1d96132fccd336532d4d3 (diff) | |
parent | 9258c8eae046d98511d92912983778ca57ba201f (diff) | |
download | open-iscsi-bf035ee1784f28e81917c5bd9d930bf238f372e2.tar.gz |
Merge pull request #229 from gulams/master
iscsid: Poll timeout value to 1 minute for iscsid
-rw-r--r-- | usr/iscsi_sysfs.c | 2 | ||||
-rw-r--r-- | usr/iscsi_sysfs.h | 1 | ||||
-rw-r--r-- | usr/iscsid_req.c | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c index 5298a6b..540adfd 100644 --- a/usr/iscsi_sysfs.c +++ b/usr/iscsi_sysfs.c @@ -1438,7 +1438,7 @@ int iscsi_sysfs_for_each_session(void *data, int *nr_found, if (!info) return ISCSI_ERR_NOMEM; - info->iscsid_req_tmo = -1; + info->iscsid_req_tmo = ISCSID_RESP_POLL_TIMEOUT; n = scandir(ISCSI_SESSION_DIR, &namelist, trans_filter, alphasort); if (n <= 0) diff --git a/usr/iscsi_sysfs.h b/usr/iscsi_sysfs.h index 1d0377f..9575c65 100644 --- a/usr/iscsi_sysfs.h +++ b/usr/iscsi_sysfs.h @@ -34,6 +34,7 @@ struct iscsi_auth_config; struct flashnode_rec; #define SCSI_MAX_STATE_VALUE 32 +#define ISCSID_RESP_POLL_TIMEOUT 60000 extern void free_transports(void); extern char *iscsi_sysfs_get_iscsi_kernel_version(void); diff --git a/usr/iscsid_req.c b/usr/iscsid_req.c index 3bbf5b9..a3aba6d 100644 --- a/usr/iscsid_req.c +++ b/usr/iscsid_req.c @@ -156,7 +156,7 @@ int iscsid_response(int fd, iscsiadm_cmd_e cmd, iscsiadm_rsp_t *rsp, if (!err) { if (poll_wait) continue; - return ISCSI_ERR_ISCSID_NOTCONN; + return ISCSI_ERR_SESSION_NOT_CONNECTED; } else if (err < 0) { if (errno == EINTR) continue; |