mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 18:50:31 -04:00
iscsi: adjust shutdown_pre_sync handler
Don't attempt to service reconnections if RB_NOSYNC is set. More
crucially, don't do it if the scheduler is stopped, as the maintenance
thread will never run again.
Reviewed by: jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42342
(cherry picked from commit 2ce1c45b34)
This commit is contained in:
parent
aaebd6d069
commit
a8ba64ca91
1 changed files with 4 additions and 2 deletions
|
|
@ -44,6 +44,7 @@
|
|||
#include <sys/mbuf.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sockopt.h>
|
||||
|
|
@ -2680,11 +2681,12 @@ iscsi_terminate_sessions(struct iscsi_softc *sc)
|
|||
}
|
||||
|
||||
static void
|
||||
iscsi_shutdown_pre(struct iscsi_softc *sc)
|
||||
iscsi_shutdown_pre(struct iscsi_softc *sc, int howto)
|
||||
{
|
||||
struct iscsi_session *is;
|
||||
|
||||
if (!fail_on_shutdown)
|
||||
if (!fail_on_shutdown || (howto & RB_NOSYNC) != 0 ||
|
||||
SCHEDULER_STOPPED())
|
||||
return;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue