diff options
| author | Jack Meng <Jack.Meng@Sun.COM> | 2010-02-22 09:39:28 +0800 |
|---|---|---|
| committer | Jack Meng <Jack.Meng@Sun.COM> | 2010-02-22 09:39:28 +0800 |
| commit | 08dcd69c259e91563982b9e7715366f99fee816e (patch) | |
| tree | 0aef8ced484e9e4e647820bd6496bd0ddc5c0efb /usr/src/cmd/iscsid | |
| parent | c0c934808d1b7d058148814255f32064a0e09555 (diff) | |
| download | illumos-joyent-08dcd69c259e91563982b9e7715366f99fee816e.tar.gz | |
6908887 shutdown of cluster node hangs long time with iscsi discovery failure
6885238 confusing notice during the reboot of iSCSI rooted Solaris
6911748 Unable to unload iscsi module
Diffstat (limited to 'usr/src/cmd/iscsid')
| -rw-r--r-- | usr/src/cmd/iscsid/iscsid.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/usr/src/cmd/iscsid/iscsid.c b/usr/src/cmd/iscsid/iscsid.c index 268dcfe3c0..6d134689e4 100644 --- a/usr/src/cmd/iscsid/iscsid.c +++ b/usr/src/cmd/iscsid/iscsid.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -132,6 +132,7 @@ main( int retry = 0; sigset_t sigs, allsigs; struct sigaction act; + uint32_t rval; /* * Get the locale set up before calling any other routines @@ -262,10 +263,8 @@ main( case SIGTERM: do { ret = ioctl(iscsi_dev_handle, - ISCSI_SMF_OFFLINE, NULL); + ISCSI_SMF_OFFLINE, &rval); if (ret == -1) { - perror(gettext("ioctl: disable" - " iscsi initiator")); /* * Keep retrying if unable * to stop @@ -273,9 +272,13 @@ main( (void) sleep(ISCSI_SMF_OFFLINE_DELAY); retry++; } - } while (ret == -1 && - retry < ISCSI_SMF_OFFLINE_MAX_RETRY_TIMES); + } while ((ret == -1) && + (retry < ISCSI_SMF_OFFLINE_MAX_RETRY_TIMES)); (void) close(iscsi_dev_handle); + if (rval == B_FALSE) { + syslog(LOG_DAEMON, gettext("iSCSI initiator" + " service exited with sessions left.")); + } return (0); break; default: |
