Optimize zfsd for the happy case
If there are no damaged pools, then ignore all GEOM events. We only use them to fix damaged pools. However, still pay attention to ZFS events. MFC after: 20 days X-MFC-With: 329284 Sponsored by: Spectra Logic Corp
This commit is contained in:
parent
aff4f2d315
commit
d727d8b0b1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329344
@ -186,6 +186,12 @@ CaseFile::DeSerialize()
|
|||||||
free(caseFiles);
|
free(caseFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
CaseFile::Empty()
|
||||||
|
{
|
||||||
|
return (s_activeCases.empty());
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CaseFile::LogAll()
|
CaseFile::LogAll()
|
||||||
{
|
{
|
||||||
|
@ -134,6 +134,11 @@ class CaseFile
|
|||||||
*/
|
*/
|
||||||
static void DeSerialize();
|
static void DeSerialize();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief returns true if there are no CaseFiles
|
||||||
|
*/
|
||||||
|
static bool Empty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Emit syslog data on all active CaseFile%%s in the system.
|
* \brief Emit syslog data on all active CaseFile%%s in the system.
|
||||||
*/
|
*/
|
||||||
|
@ -98,8 +98,16 @@ bool
|
|||||||
GeomEvent::Process() const
|
GeomEvent::Process() const
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We are only concerned with create arrivals and physical path changes,
|
* We only use GEOM events to repair damaged pools. So return early if
|
||||||
* because those can be used to satisfy online and autoreplace operations
|
* there are no damaged pools
|
||||||
|
*/
|
||||||
|
if (CaseFile::Empty())
|
||||||
|
return (false);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We are only concerned with arrivals and physical path changes,
|
||||||
|
* because those can be used to satisfy online and autoreplace
|
||||||
|
* operations
|
||||||
*/
|
*/
|
||||||
if (Value("type") != "GEOM::physpath" && Value("type") != "CREATE")
|
if (Value("type") != "GEOM::physpath" && Value("type") != "CREATE")
|
||||||
return (false);
|
return (false);
|
||||||
|
Loading…
Reference in New Issue
Block a user