X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0b4e3aa066abc0728aacb4bbeb86f53f9737156e..9bccf70c0258c7cac2dcb80011b2a964d884c552:/bsd/miscfs/specfs/spec_vnops.c diff --git a/bsd/miscfs/specfs/spec_vnops.c b/bsd/miscfs/specfs/spec_vnops.c index 86dba1588..52eea7f81 100644 --- a/bsd/miscfs/specfs/spec_vnops.c +++ b/bsd/miscfs/specfs/spec_vnops.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2001 Apple Computer, Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * @@ -73,6 +73,7 @@ #include #include +#include struct vnode *speclisth[SPECHSZ]; @@ -589,8 +590,28 @@ spec_strategy(ap) struct buf *a_bp; } */ *ap; { - (*bdevsw[major(ap->a_bp->b_dev)].d_strategy)(ap->a_bp); - return (0); + struct buf *bp; + + bp = ap->a_bp; + + if (kdebug_enable) { + int code = 0; + + if (bp->b_flags & B_READ) + code |= DKIO_READ; + if (bp->b_flags & B_ASYNC) + code |= DKIO_ASYNC; + + if (bp->b_flags & B_META) + code |= DKIO_META; + else if (bp->b_flags & (B_PGIN | B_PAGEOUT)) + code |= DKIO_PAGING; + + KERNEL_DEBUG_CONSTANT(FSDBG_CODE(DBG_DKRW, code) | DBG_FUNC_NONE, + bp, bp->b_dev, bp->b_blkno, bp->b_bcount, 0); + } + (*bdevsw[major(bp->b_dev)].d_strategy)(bp); + return (0); } /* @@ -663,8 +684,8 @@ spec_close(ap) */ if (vcount(vp) == 2 && ap->a_p && vp == ap->a_p->p_session->s_ttyvp) { - vrele(vp); ap->a_p->p_session->s_ttyvp = NULL; + vrele(vp); } /* * If the vnode is locked, then we are in the midst