Skip to content

Instantly share code, notes, and snippets.

@sdimitro
Created February 10, 2019 22:14
Show Gist options
  • Save sdimitro/8e6dfe0312962fc3840e736edb59d010 to your computer and use it in GitHub Desktop.
Save sdimitro/8e6dfe0312962fc3840e736edb59d010 to your computer and use it in GitHub Desktop.
/*
* ==========================================================================
* Metaslabs
* ==========================================================================
*/
static void
metaslab_aux_histograms_clear(metaslab_t *msp)
{
/*
* Auxiliary histograms are only cleared when resetting them,
* which can only happen while the metaslab is loaded.
*/
ASSERT(msp->ms_loaded);
bzero(msp->ms_synchist, sizeof (msp->ms_synchist));
for (int t = 0; t < TXG_DEFER_SIZE; t++)
bzero(msp->ms_deferhist[t], sizeof (msp->ms_deferhist[t]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment