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

Function waitrunningbufspace

freebsd/kern/vfs_bio.c:937–947  ·  view source on GitHub ↗

* waitrunningbufspace() * * runningbufspace is a measure of the amount of I/O currently * running. This routine is used in async-write situations to * prevent creating huge backups of pending writes to a device. * Only asynchronous writes are governed by this function. * * This does NOT turn an async write into a sync write. It waits * for earlier writes to complete and generally retur

Source from the content-addressed store, hash-verified

935 * caller's write has reached the device.
936 */
937void
938waitrunningbufspace(void)
939{
940
941 mtx_lock(&rbreqlock);
942 while (runningbufspace > hirunningspace) {
943 runningbufreq = 1;
944 msleep(&runningbufreq, &rbreqlock, PVM, "wdrain", 0);
945 }
946 mtx_unlock(&rbreqlock);
947}
948
949/*
950 * vfs_buf_test_cache:

Callers 2

bufwriteFunction · 0.85
flushbufqueuesFunction · 0.85

Calls 2

mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected