svn commit: r256473 - projects/zfsd/head/cddl/sbin/zfsd
Alan Somers
asomers at FreeBSD.org
Mon Oct 14 23:15:59 UTC 2013
Author: asomers
Date: Mon Oct 14 23:15:58 2013
New Revision: 256473
URL: http://svnweb.freebsd.org/changeset/base/256473
Log:
Modify Zfsd to honor shutdown signals even when started during a devctl
event flood.
cddl/sbin/zfsd/zfsd.cc:
In ZfsDaemon::Run(), catch DevCtl::Exceptions instead of one
of its derived classes ZfsdExceptions. libdevctl, which
contains some of the methods we call in this context, only
emits DevCtl::Exceptions, and we must catch these too.
In ZfsDaemon::DetectMissedEvents(), monitor
s_terminateEventLoop so we are guaranteed to exit our loop
if a shutdown is requested.
Submitted by: gibbs
Approved by: ken (mentor)
Sponsored by: Spectra Logic Corporation
Modified:
projects/zfsd/head/cddl/sbin/zfsd/zfsd.cc
Modified: projects/zfsd/head/cddl/sbin/zfsd/zfsd.cc
==============================================================================
--- projects/zfsd/head/cddl/sbin/zfsd/zfsd.cc Mon Oct 14 23:13:03 2013 (r256472)
+++ projects/zfsd/head/cddl/sbin/zfsd/zfsd.cc Mon Oct 14 23:15:58 2013 (r256473)
@@ -145,7 +145,7 @@ ZfsDaemon::Run()
daemon.EventLoop();
- } catch (const ZfsdException &exp) {
+ } catch (const DevCtl::Exception &exp) {
exp.Log();
}
}
@@ -287,7 +287,7 @@ ZfsDaemon::DetectMissedEvents()
* If the system state has changed durring our
* interrogation, start over.
*/
- } while (EventsPending());
+ } while (s_terminateEventLoop == false && EventsPending());
RescanSystem();
}
More information about the svn-src-projects
mailing list