/* * FS Summary Counters * =================== * * We correct errors in the filesystem summary counters by setting them to the * values computed during the obligatory scrub phase. However, we must be * careful not to allow any other thread to change the counters while we're * computing and setting new values. To achieve this, we freeze the * filesystem for the whole operation if the REPAIR flag is set. The checking * function is stricter when we've frozen the fs.
*/
/* * Reset the superblock counters. Caller is responsible for freezing the * filesystem during the calculation and reset phases.
*/ int
xrep_fscounters( struct xfs_scrub *sc)
{ struct xfs_mount *mp = sc->mp; struct xchk_fscounters *fsc = sc->buf;
/* * Reinitialize the in-core counters from what we computed. We froze * the filesystem, so there shouldn't be anyone else trying to modify * these counters.
*/ if (!fsc->frozen) {
ASSERT(fsc->frozen); return -EFSCORRUPTED;
}
/* * Online repair is only supported on v5 file systems, which require * lazy sb counters and thus no update of sb_fdblocks here. But * sb_frextents only uses a lazy counter with rtgroups, and thus needs * to be updated directly here otherwise. And for that we need to keep * track of the delalloc reservations separately, as they are are * subtracted from m_frextents, but not included in sb_frextents.
*/ if (!xfs_has_zoned(mp)) {
xfs_set_freecounter(mp, XC_FREE_RTEXTENTS,
fsc->frextents - fsc->frextents_delayed); if (!xfs_has_rtgroups(mp))
mp->m_sb.sb_frextents = fsc->frextents;
}
return 0;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.