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

Function swapgeom_done

freebsd/vm/swap_pager.c:2787–2808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2785}
2786
2787static void
2788swapgeom_done(struct bio *bp2)
2789{
2790 struct swdevt *sp;
2791 struct buf *bp;
2792 struct g_consumer *cp;
2793
2794 bp = bp2->bio_caller2;
2795 cp = bp2->bio_from;
2796 bp->b_ioflags = bp2->bio_flags;
2797 if (bp2->bio_error)
2798 bp->b_ioflags |= BIO_ERROR;
2799 bp->b_resid = bp->b_bcount - bp2->bio_completed;
2800 bp->b_error = bp2->bio_error;
2801 bp->b_caller1 = NULL;
2802 bufdone(bp);
2803 sp = bp2->bio_caller1;
2804 mtx_lock(&sw_dev_mtx);
2805 swapgeom_release(cp, sp);
2806 mtx_unlock(&sw_dev_mtx);
2807 g_destroy_bio(bp2);
2808}
2809
2810static void
2811swapgeom_strategy(struct buf *bp, struct swdevt *sp)

Callers

nothing calls this directly

Calls 4

bufdoneFunction · 0.85
swapgeom_releaseFunction · 0.85
mtx_lockFunction · 0.50
mtx_unlockFunction · 0.50

Tested by

no test coverage detected