Print this page
filesystem hook framework (August 19th)
*** 63,72 ****
--- 63,73 ----
#include <sys/nbmlock.h>
#include <sys/fcntl.h>
#include <fs/fs_subr.h>
#include <sys/taskq.h>
#include <fs/fs_reparse.h>
+ #include <sys/fsh_impl.h>
/* Determine if this vnode is a file that is read-only */
#define ISROFILE(vp) \
((vp)->v_type != VCHR && (vp)->v_type != VBLK && \
(vp)->v_type != VFIFO && vn_is_readonly(vp))
*** 3223,3233 ****
int err;
ssize_t resid_start = uiop->uio_resid;
VOPXID_MAP_CR(vp, cr);
! err = (*(vp)->v_op->vop_read)(vp, uiop, ioflag, cr, ct);
VOPSTATS_UPDATE_IO(vp, read,
read_bytes, (resid_start - uiop->uio_resid));
return (err);
}
--- 3224,3234 ----
int err;
ssize_t resid_start = uiop->uio_resid;
VOPXID_MAP_CR(vp, cr);
! err = fsh_read(vp, uiop, ioflag, cr, ct);
VOPSTATS_UPDATE_IO(vp, read,
read_bytes, (resid_start - uiop->uio_resid));
return (err);
}
*** 3242,3252 ****
int err;
ssize_t resid_start = uiop->uio_resid;
VOPXID_MAP_CR(vp, cr);
! err = (*(vp)->v_op->vop_write)(vp, uiop, ioflag, cr, ct);
VOPSTATS_UPDATE_IO(vp, write,
write_bytes, (resid_start - uiop->uio_resid));
return (err);
}
--- 3243,3253 ----
int err;
ssize_t resid_start = uiop->uio_resid;
VOPXID_MAP_CR(vp, cr);
! err = fsh_write(vp, uiop, ioflag, cr, ct);
VOPSTATS_UPDATE_IO(vp, write,
write_bytes, (resid_start - uiop->uio_resid));
return (err);
}