Date: Mon, 14 Oct 2013 23:15:58 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r256473 - projects/zfsd/head/cddl/sbin/zfsd Message-ID: <201310142315.r9ENFwXn025341@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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(); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310142315.r9ENFwXn025341>