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

Function buf_flush

freebsd/kern/vfs_bio.c:3342–3359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3340SYSINIT(bufdaemon, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start, &buf_kp);
3341
3342static int
3343buf_flush(struct vnode *vp, struct bufdomain *bd, int target)
3344{
3345 int flushed;
3346
3347 flushed = flushbufqueues(vp, bd, target, 0);
3348 if (flushed == 0) {
3349 /*
3350 * Could not find any buffers without rollback
3351 * dependencies, so just write the first one
3352 * in the hopes of eventually making progress.
3353 */
3354 if (vp != NULL && target > 2)
3355 target /= 2;
3356 flushbufqueues(vp, bd, target, 1);
3357 }
3358 return (flushed);
3359}
3360
3361static void
3362buf_daemon()

Callers 2

bufspace_waitFunction · 0.85
buf_daemonFunction · 0.85

Calls 1

flushbufqueuesFunction · 0.85

Tested by

no test coverage detected