diff options
author | trasz <trasz@FreeBSD.org> | 2013-12-04 09:46:27 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2013-12-04 09:46:27 +0000 |
commit | 80dc28ceefe13b0c46b2dd699d1be54c04b4a5c5 (patch) | |
tree | 49268360efbdcf7e444069eee68cb1c380b0cd88 /sys/dev/iscsi | |
parent | a19b1d3a5826fe9fb069c28583b0d82ad975d928 (diff) | |
download | FreeBSD-src-80dc28ceefe13b0c46b2dd699d1be54c04b4a5c5.zip FreeBSD-src-80dc28ceefe13b0c46b2dd699d1be54c04b4a5c5.tar.gz |
MFC r258790:
Fix hang on reboot with active iSCSI connections.
Approved by: re (glebius)
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/iscsi')
-rw-r--r-- | sys/dev/iscsi/iscsi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 1e65416..2f5328d 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -2110,10 +2110,12 @@ iscsi_load(void) sc->sc_cdev->si_drv1 = sc; /* - * XXX: For some reason this doesn't do its job; active sessions still hang out there - * after final sync, making the reboot effectively hang. + * Note that this needs to get run before dashutdown(). Otherwise, + * when rebooting with iSCSI session with outstanding requests, + * but disconnected, dashutdown() will hang on cam_periph_runccb(). */ - sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, iscsi_shutdown, sc, SHUTDOWN_PRI_DEFAULT); + sc->sc_shutdown_eh = EVENTHANDLER_REGISTER(shutdown_post_sync, + iscsi_shutdown, sc, SHUTDOWN_PRI_FIRST); return (0); } |