Changeset View
Changeset View
Standalone View
Standalone View
head/sys/ufs/ffs/ffs_softdep.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 14,283 Lines • ▼ Show 20 Lines | softdep_get_depcounts(struct mount *mp, | ||||
ACQUIRE_LOCK(ump); | ACQUIRE_LOCK(ump); | ||||
*softdep_depsp = ump->softdep_deps; | *softdep_depsp = ump->softdep_deps; | ||||
*softdep_accdepsp = ump->softdep_accdeps; | *softdep_accdepsp = ump->softdep_accdeps; | ||||
FREE_LOCK(ump); | FREE_LOCK(ump); | ||||
} | } | ||||
/* | /* | ||||
* Wait for pending output on a vnode to complete. | * Wait for pending output on a vnode to complete. | ||||
* Must be called with vnode lock and interlock locked. | |||||
* | |||||
* XXX: Should just be a call to bufobj_wwait(). | |||||
*/ | */ | ||||
static void | static void | ||||
drain_output(vp) | drain_output(vp) | ||||
struct vnode *vp; | struct vnode *vp; | ||||
{ | { | ||||
struct bufobj *bo; | |||||
bo = &vp->v_bufobj; | |||||
ASSERT_VOP_LOCKED(vp, "drain_output"); | ASSERT_VOP_LOCKED(vp, "drain_output"); | ||||
ASSERT_BO_WLOCKED(bo); | (void)bufobj_wwait(&vp->v_bufobj, 0, 0); | ||||
while (bo->bo_numoutput) { | |||||
bo->bo_flag |= BO_WWAIT; | |||||
msleep((caddr_t)&bo->bo_numoutput, | |||||
BO_LOCKPTR(bo), PRIBIO + 1, "drainvp", 0); | |||||
} | |||||
} | } | ||||
/* | /* | ||||
* Called whenever a buffer that is being invalidated or reallocated | * Called whenever a buffer that is being invalidated or reallocated | ||||
* contains dependencies. This should only happen if an I/O error has | * contains dependencies. This should only happen if an I/O error has | ||||
* occurred. The routine is called with the buffer locked. | * occurred. The routine is called with the buffer locked. | ||||
*/ | */ | ||||
static void | static void | ||||
▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines |