| 2785 | } |
| 2786 | |
| 2787 | static void |
| 2788 | swapgeom_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 | |
| 2810 | static void |
| 2811 | swapgeom_strategy(struct buf *bp, struct swdevt *sp) |
nothing calls this directly
no test coverage detected