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

Function bundirty

freebsd/kern/vfs_bio.c:2497–2515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2495 */
2496
2497void
2498bundirty(struct buf *bp)
2499{
2500
2501 CTR3(KTR_BUF, "bundirty(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags);
2502 KASSERT(bp->b_bufobj != NULL, ("No b_bufobj %p", bp));
2503 KASSERT(bp->b_flags & B_REMFREE || bp->b_qindex == QUEUE_NONE,
2504 ("bundirty: buffer %p still on queue %d", bp, bp->b_qindex));
2505
2506 if (bp->b_flags & B_DELWRI) {
2507 bp->b_flags &= ~B_DELWRI;
2508 reassignbuf(bp);
2509 bdirtysub(bp);
2510 }
2511 /*
2512 * Since it is now being written, we can clear its deferred write flag.
2513 */
2514 bp->b_flags &= ~B_DEFERRED;
2515}
2516
2517/*
2518 * bawrite:

Callers 3

bufwriteFunction · 0.85
brelseFunction · 0.85
cluster_wbuildFunction · 0.85

Calls 2

reassignbufFunction · 0.85
bdirtysubFunction · 0.85

Tested by

no test coverage detected