MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zil_commit_waiter_skip

Function zil_commit_waiter_skip

freebsd/contrib/openzfs/module/zfs/zil.c:988–996  ·  view source on GitHub ↗

* When an itx is "skipped", this function is used to properly mark the * waiter as "done, and signal any thread(s) waiting on it. An itx can * be skipped (and not committed to an lwb) for a variety of reasons, * one of them being that the itx was committed via spa_sync(), prior to * it being committed to an lwb; this can happen if a thread calling * zil_commit() is racing with spa_sync(). */

Source from the content-addressed store, hash-verified

986 * zil_commit() is racing with spa_sync().
987 */
988static void
989zil_commit_waiter_skip(zil_commit_waiter_t *zcw)
990{
991 mutex_enter(&zcw->zcw_lock);
992 ASSERT3B(zcw->zcw_done, ==, B_FALSE);
993 zcw->zcw_done = B_TRUE;
994 cv_broadcast(&zcw->zcw_cv);
995 mutex_exit(&zcw->zcw_lock);
996}
997
998/*
999 * This function is used when the given waiter is to be linked into an

Callers 3

zil_itxg_cleanFunction · 0.85
zil_prune_commit_listFunction · 0.85
zil_process_commit_listFunction · 0.85

Calls 3

mutex_enterFunction · 0.85
cv_broadcastFunction · 0.85
mutex_exitFunction · 0.85

Tested by

no test coverage detected