}
atomic_add_int(&numcache, 1);
ncp->nc_error = 0;
+ /* XXX: this is a hack to work-around the lack of a real pfs vfs
+ * implementation*/
+ if (mp != NULL)
+ vp->v_pfsmp = mp;
} else {
/*
* When creating a negative cache hit we set the
int error, do_accounting = 0;
struct vattr va;
uint64_t size_before=0, size_after=0;
- struct mount *mountp = vp->v_mount;
+ struct mount *mp;
ap.a_head.a_desc = &vop_write_desc;
ap.a_head.a_ops = ops;
DO_OPS(ops, error, &ap, vop_write);
if ((error == 0) && do_accounting) {
size_after = vp->v_filesize;
- VFS_ACCOUNT(mountp, va.va_uid, va.va_gid, size_after - size_before);
+ if (vp->v_pfsmp != NULL) {
+ mp = vp->v_pfsmp;
+ } else {
+ mp = vp->v_mount;
+ }
+ VFS_ACCOUNT(mp, va.va_uid, va.va_gid, size_after - size_before);
}
VFS_MPUNLOCK(vp->v_mount);
return(error);
} v_pollinfo;
struct vmresident *v_resident; /* optional vmresident */
struct ccms_dataspace v_ccms; /* cache coherency */
+ struct mount *v_pfsmp; /* XXX: hack for PFS accounting */
#ifdef DEBUG_LOCKS
const char *filename; /* Source file doing locking */
int line; /* Line number doing locking */