47#include <sys/kernel.h>
48#include <sys/limits.h>
51#include <sys/malloc.h>
54#include <sys/rwlock.h>
56#include <sys/unistd.h>
58#include <sys/dirent.h>
61#include <security/audit/audit.h>
64#include <security/mac/mac_framework.h>
67#include <vm/vm_object.h>
68#include <vm/vm_extern.h>
71#include <vm/vm_page.h>
72#include <vm/vm_pager.h>
73#include <vm/vnode_pager.h>
79 char *dirbuf,
int dirbuflen, off_t *off,
80 char **cpos,
int *len,
int *eofflag,
82static int dirent_exists(
struct vnode *vp,
const char *dirname,
85#define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4)
111 .vop_bypass = VOP_EOPNOTSUPP,
122 .vop_close = VOP_NULL,
123 .vop_fsync = VOP_NULL,
129 .vop_inactive = VOP_NULL,
136 .vop_open = VOP_NULL,
137 .vop_pathconf = VOP_EINVAL,
140 .vop_readlink = VOP_EINVAL,
143 .vop_revoke = VOP_PANIC,
224 panic(
"filesystem goof: vop_panic[%s]", ap->a_desc->vdesc_name);
241 struct vop_lookup_args
281 printf(
"No strategy for buffer at %p\n", ap->a_bp);
283 ap->a_bp->b_ioflags |= BIO_ERROR;
284 ap->a_bp->b_error = EOPNOTSUPP;
291 int dirbuflen, off_t *off,
char **cpos,
int *len,
292 int *eofflag,
struct thread *td)
299 KASSERT(VOP_ISLOCKED(vp), (
"vp %p is not locked", vp));
300 KASSERT(vp->v_type == VDIR, (
"vp %p is not a directory", vp));
303 iov.iov_base = dirbuf;
304 iov.iov_len = dirbuflen;
308 uio.uio_offset = *off;
309 uio.uio_resid = dirbuflen;
310 uio.uio_segflg = UIO_SYSSPACE;
311 uio.uio_rw = UIO_READ;
317 error = mac_vnode_check_readdir(td->td_ucred, vp);
320 error = VOP_READDIR(vp, &uio, td->td_ucred, eofflag,
325 *off = uio.uio_offset;
328 *len = (dirbuflen - uio.uio_resid);
334 dp = (
struct dirent *)(*cpos);
335 reclen = dp->d_reclen;
355 int error, eofflag, dirbuflen, len, found;
360 KASSERT(VOP_ISLOCKED(vp), (
"vp %p is not locked", vp));
361 KASSERT(vp->v_type == VDIR, (
"vp %p is not a directory", vp));
365 error = VOP_GETATTR(vp, &va, td->td_ucred);
369 dirbuflen = DEV_BSIZE;
370 if (dirbuflen < va.va_blocksize)
371 dirbuflen = va.va_blocksize;
372 dirbuf = (
char *)
malloc(dirbuflen, M_TEMP, M_WAITOK);
378 &cpos, &len, &eofflag, td);
382 if (dp->d_type != DT_WHT && dp->d_fileno != 0 &&
383 strcmp(dp->d_name, dirname) == 0) {
387 }
while (len > 0 || !eofflag);
390 free(dirbuf, M_TEMP);
398 KASSERT((ap->a_accmode & ~(VEXEC | VWRITE | VREAD | VADMIN |
399 VAPPEND)) == 0, (
"invalid bit in accmode"));
401 return (VOP_ACCESSX(ap->a_vp, ap->a_accmode, ap->a_cred, ap->a_td));
408 accmode_t
accmode = ap->a_accmode;
417 return (VOP_ACCESS(ap->a_vp,
accmode, ap->a_cred, ap->a_td));
438 if (mp != NULL && (mp->mnt_flag & MNT_LOCAL) != 0 &&
439 ap->a_op == F_SETLK && (ap->a_flags & F_FIRSTOPEN) == 0) {
441 while ((vp->v_iflag & VI_FOPENING) != 0)
442 msleep(vp, VI_MTX(vp), PLOCK,
"lockfo", 0);
446 if (ap->a_fl->l_whence == SEEK_END) {
453 vn_lock(vp, LK_SHARED | LK_RETRY);
454 error = VOP_GETATTR(vp, &vattr, curthread->td_ucred);
461 return (
lf_advlock(ap, &(vp->v_lockf), vattr.va_size));
472 if (ap->a_fl->l_whence == SEEK_END) {
474 vn_lock(vp, LK_SHARED | LK_RETRY);
475 error = VOP_GETATTR(vp, &vattr, curthread->td_ucred);
505 struct vop_pathconf_args
512 switch (ap->a_name) {
514 *ap->a_retval = _POSIX_ASYNCHRONOUS_IO;
517 *ap->a_retval = PATH_MAX;
519 case _PC_ACL_EXTENDED:
521 case _PC_CAP_PRESENT:
522 case _PC_DEALLOC_PRESENT:
523 case _PC_INF_PRESENT:
524 case _PC_MAC_PRESENT:
538 struct vop_lock1_args
545 struct vnode *vp = ap->a_vp;
550 &ilk->lock_object, ap->a_file, ap->a_line));
556 struct vop_unlock_args
560 struct vnode *vp = ap->a_vp;
568 struct vop_islocked_args
585 struct vop_lock1_args
592 struct vnode *vp = ap->a_vp;
593 int flags = ap->a_flags;
596 MPASS(vp->v_vnlock == &vp->v_lock);
598 if (__predict_false((
flags & ~(LK_TYPE_MASK | LK_NODDLKTREAT | LK_RETRY)) != 0))
601 switch (
flags & LK_TYPE_MASK) {
610 &ilk->lock_object, ap->a_file, ap->a_line));
615 struct vop_unlock_args
619 struct vnode *vp = ap->a_vp;
621 MPASS(vp->v_vnlock == &vp->v_lock);
628 struct vop_islocked_args
632 struct vnode *vp = ap->a_vp;
634 MPASS(vp->v_vnlock == &vp->v_lock);
652 if (ap->a_events & ~POLLSTANDARD)
654 return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
669 if (ap->a_events & ~POLLSTANDARD)
671 return (ap->a_events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM));
679 struct vop_getwritemount_args
721 if (ap->a_bop != NULL)
722 *ap->a_bop = &ap->a_vp->v_bufobj;
723 if (ap->a_bnp != NULL)
724 *ap->a_bnp = ap->a_bn * btodb(ap->a_vp->v_mount->mnt_stat.f_iosize);
725 if (ap->a_runp != NULL)
727 if (ap->a_runb != NULL)
734 struct vop_fsync_args
748 return (VOP_FSYNC(ap->a_vp, MNT_WAIT, ap->a_td));
761 struct vop_getpages_args
770 return vnode_pager_generic_getpages(ap->a_vp, ap->a_m,
771 ap->a_count, ap->a_rbehind, ap->a_rahead, NULL, NULL);
779 error = VOP_GETPAGES(ap->a_vp, ap->a_m, ap->a_count, ap->a_rbehind,
781 if (ap->a_iodone != NULL)
782 ap->a_iodone(ap->a_arg, ap->a_m, ap->a_count, error);
795 struct vop_putpages_args
804 return vnode_pager_generic_putpages(ap->a_vp, ap->a_m, ap->a_count,
805 ap->a_sync, ap->a_rtvals);
817 struct vnode *vp = ap->a_vp;
818 struct vnode **dvp = ap->a_vpp;
820 char *
buf = ap->a_buf;
821 size_t *buflen = ap->a_buflen;
823 int i, error, eofflag, dirbuflen,
flags, locked, len, covered;
838 if (vp->v_type != VDIR)
841 error = VOP_GETATTR(vp, &va, cred);
846 locked = VOP_ISLOCKED(vp);
848 NDINIT_ATVP(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF, UIO_SYSSPACE,
853 vn_lock(vp, locked | LK_RETRY);
856 NDFREE(&nd, NDF_ONLY_PNBUF);
858 mvp = *dvp = nd.ni_vp;
860 if (vp->v_mount != (*dvp)->v_mount &&
861 ((*dvp)->v_vflag & VV_ROOT) &&
862 ((*dvp)->v_mount->mnt_flag & MNT_UNION)) {
863 *dvp = (*dvp)->v_mount->mnt_vnodecovered;
868 vn_lock(*dvp, LK_SHARED | LK_RETRY);
872 fileno = va.va_fileid;
874 dirbuflen = DEV_BSIZE;
875 if (dirbuflen < va.va_blocksize)
876 dirbuflen = va.va_blocksize;
877 dirbuf = (
char *)
malloc(dirbuflen, M_TEMP, M_WAITOK);
879 if ((*dvp)->v_type != VDIR) {
889 &cpos, &len, &eofflag, td);
893 if ((dp->d_type != DT_WHT) &&
894 (dp->d_fileno == fileno)) {
897 vn_lock(mvp, LK_SHARED | LK_RETRY);
901 vn_lock(*dvp, LK_SHARED | LK_RETRY);
905 vn_lock(*dvp, LK_SHARED | LK_RETRY);
913 if (dp->d_namlen == 1 && dp->d_name[0] ==
'.') {
916 bcopy(dp->d_name,
buf + i, dp->d_namlen);
921 }
while (len > 0 || !eofflag);
925 free(dirbuf, M_TEMP);
937 vn_lock(vp, locked | LK_RETRY);
946 off_t maxfilesize = 0;
949 struct vattr vattr, *vap;
951 off_t fsize, len, cur, offset;
964 offset = *ap->a_offset;
966 error = VOP_GETATTR(vp, vap, ap->a_cred);
969 fsize = vap->va_size;
970 iosize = vap->va_blocksize;
972 iosize = BLKDEV_IOSIZE;
982 sfs =
malloc(
sizeof(
struct statfs), M_STATFS, M_WAITOK);
983 error = VFS_STATFS(vp->v_mount, sfs, td);
985 maxfilesize = sfs->f_maxfilesize;
990 if (offset > maxfilesize || len > maxfilesize ||
991 offset + len > maxfilesize) {
997 if (offset + len > vap->va_size) {
1002 vap->va_size = offset + len;
1003 error = VOP_SETATTR(vp, vap, ap->a_cred);
1007 vap->va_size = fsize;
1008 error = VOP_SETATTR(vp, vap, ap->a_cred);
1020 if ((offset % iosize) != 0)
1021 cur -= (offset % iosize);
1024 if (offset < fsize) {
1025 aiov.iov_base =
buf;
1027 auio.uio_iov = &aiov;
1028 auio.uio_iovcnt = 1;
1029 auio.uio_offset = offset;
1030 auio.uio_resid = cur;
1031 auio.uio_segflg = UIO_SYSSPACE;
1032 auio.uio_rw = UIO_READ;
1034 error = VOP_READ(vp, &auio, ap->a_ioflag, ap->a_cred);
1037 if (auio.uio_resid > 0) {
1038 bzero(
buf + cur - auio.uio_resid,
1045 aiov.iov_base =
buf;
1047 auio.uio_iov = &aiov;
1048 auio.uio_iovcnt = 1;
1049 auio.uio_offset = offset;
1050 auio.uio_resid = cur;
1051 auio.uio_segflg = UIO_SYSSPACE;
1052 auio.uio_rw = UIO_WRITE;
1055 error = VOP_WRITE(vp, &auio, ap->a_ioflag, ap->a_cred);
1069 *ap->a_offset = offset;
1075vp_zerofill(
struct vnode *vp,
struct vattr *vap, off_t *offsetp, off_t *lenp,
1076 int ioflag,
struct ucred *cred)
1085 iosize = vap->va_blocksize;
1091 iosize = BLKDEV_IOSIZE;
1093 iosize = min(iosize * 8, ZERO_REGION_SIZE);
1096 int xfersize = iosize;
1097 if (offset % iosize != 0)
1098 xfersize -= offset % iosize;
1102 aiov.iov_base = __DECONST(
void *, zero_region);
1103 aiov.iov_len = xfersize;
1104 auio.uio_iov = &aiov;
1105 auio.uio_iovcnt = 1;
1106 auio.uio_offset = offset;
1107 auio.uio_resid = xfersize;
1108 auio.uio_segflg = UIO_SYSSPACE;
1109 auio.uio_rw = UIO_WRITE;
1112 error = VOP_WRITE(vp, &auio, ioflag, cred);
1114 len -= xfersize - auio.uio_resid;
1115 offset += xfersize - auio.uio_resid;
1136 off_t noff, xfersize, rem;
1139 offset = *ap->a_offset;
1142 error = VOP_GETATTR(vp, &va, cred);
1146 len = omin((off_t)va.va_size - offset, *ap->a_len);
1163 KASSERT(noff >= offset, (
"FIOSEEKDATA going backward"));
1164 if (noff != offset) {
1165 xfersize = omin(noff - offset, len);
1176 xfersize = rem = omin(noff - offset, len);
1177 error =
vp_zerofill(vp, &va, &offset, &rem, ap->a_ioflag, cred);
1179 len -= xfersize - rem;
1191 *ap->a_offset = offset;
1201 daddr_t startn, endn;
1202 off_t bstart, bend,
start, end;
1206 switch (ap->a_advice) {
1207 case POSIX_FADV_WILLNEED:
1215 case POSIX_FADV_DONTNEED:
1217 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
1218 if (VN_IS_DOOMED(vp)) {
1232 bsize = vp->v_bufobj.bo_bsize;
1233 bstart = rounddown(ap->a_start, bsize);
1234 bend = roundup(ap->a_end, bsize);
1242 if (vp->v_object != NULL) {
1243 start = trunc_page(bstart);
1244 end = round_page(bend);
1245 VM_OBJECT_RLOCK(vp->v_object);
1246 vm_object_page_noreuse(vp->v_object, OFF_TO_IDX(
start),
1248 VM_OBJECT_RUNLOCK(vp->v_object);
1253 startn = bstart / bsize;
1254 endn = bend / bsize;
1272 ap->a_vp->v_unpcb = ap->a_unpcb;
1280 *ap->a_unpcb = ap->a_vp->v_unpcb;
1288 ap->a_vp->v_unpcb = NULL;
1296 return (atomic_load_int(&ap->a_vp->v_writecount) < 0);
1308 n = atomic_load_int(&vp->v_writecount);
1310 if (__predict_false(n > 0)) {
1322 if ((vn_irflag_read(vp) & VIRF_TEXT_REF) != 0) {
1326 if (atomic_fcmpset_int(&vp->v_writecount, &n, -1)) {
1336 if (atomic_fcmpset_int(&vp->v_writecount, &n, n - 1)) {
1340 __assert_unreachable();
1351 n = atomic_load_int(&vp->v_writecount);
1353 if (__predict_false(n >= 0)) {
1361 if (atomic_fcmpset_int(&vp->v_writecount, &n, 0)) {
1362 if ((vn_irflag_read(vp) & VIRF_TEXT_REF) != 0) {
1371 if (atomic_fcmpset_int(&vp->v_writecount, &n, n + 1)) {
1375 __assert_unreachable();
1378static int __always_inline
1382 struct mount *mp __diagused;
1391 VNPASS((mp->mnt_kern_flag & MNTK_NOMSYNC) == 0, vp);
1393 VNPASS((mp->mnt_kern_flag & MNTK_NOMSYNC) != 0, vp);
1398 n = atomic_load_int(&vp->v_writecount);
1400 if (__predict_false(n < 0)) {
1404 VNASSERT(n + ap->a_inc >= 0, vp,
1405 (
"neg writecount increment %d + %d = %d", n, ap->a_inc,
1413 if (atomic_fcmpset_int(&vp->v_writecount, &n, n + ap->a_inc)) {
1417 __assert_unreachable();
1449 switch (ap->a_command) {
1453 error = vn_lock(vp, LK_SHARED);
1456 if (vp->v_type == VREG)
1457 error = VOP_GETATTR(vp, &va, ap->a_cred);
1462 if (*offp < 0 || *offp >= va.va_size)
1464 else if (ap->a_command == FIOSEEKHOLE)
1487 return (EOPNOTSUPP);
1496 return (EOPNOTSUPP);
1507 return (EOPNOTSUPP);
1515 struct vnode *vp, *mvp;
1517 int error, lockreq, allerror = 0;
1520 lockreq = LK_EXCLUSIVE | LK_INTERLOCK;
1521 if (waitfor != MNT_WAIT)
1522 lockreq |= LK_NOWAIT;
1527 MNT_VNODE_FOREACH_ALL(vp, mp, mvp) {
1528 if (vp->v_bufobj.bo_dirty.bv_cnt == 0) {
1532 if ((error =
vget(vp, lockreq)) != 0) {
1533 if (error == ENOENT) {
1534 MNT_VNODE_FOREACH_ALL_ABORT(mp, mvp);
1539 error = VOP_FSYNC(vp, waitfor, td);
1562 ap->a_outvp, ap->a_outoffp, ap->a_lenp, ap->a_flags, ap->a_incred,
1563 ap->a_outcred, ap->a_fsizetd);
1575 return (EOPNOTSUPP);
1586 return (EOPNOTSUPP);
1609 struct vnode *filename_vp;
1611 const char *attrname;
1614 if (filename_vp != NULL)
1615 VOP_UNLOCK(filename_vp);
1616 return (EOPNOTSUPP);
1623 struct sysctl_req *req;
1626 return (EOPNOTSUPP);
1629static vop_bypass_t *
1630bp_by_off(
struct vop_vector *vop,
struct vop_generic_args *a)
1633 return (*(vop_bypass_t **)((
char *)vop + a->a_desc->vdesc_vop_offset));
1645 prev_stops = sigdeferstop(SIGDEFERSTOP_SILENT);
1647 sigallowstop(prev_stops);
1664 error = vop_stat_helper_pre(a);
1675 vap->va_birthtime.tv_sec = -1;
1676 vap->va_birthtime.tv_nsec = 0;
1677 vap->va_fsid = VNOVAL;
1679 vap->va_rdev = NODEV;
1681 error = VOP_GETATTR(vp, vap, a->a_active_cred);
1688 bzero(sb,
sizeof *sb);
1693 if (vap->va_fsid != VNOVAL)
1694 sb->st_dev = vap->va_fsid;
1696 sb->st_dev = vp->v_mount->mnt_stat.f_fsid.val[0];
1697 sb->st_ino = vap->va_fileid;
1698 mode = vap->va_mode;
1699 switch (vap->va_type) {
1726 sb->st_nlink = vap->va_nlink;
1727 sb->st_uid = vap->va_uid;
1728 sb->st_gid = vap->va_gid;
1729 sb->st_rdev = vap->va_rdev;
1730 if (vap->va_size > OFF_MAX) {
1734 sb->st_size = vap->va_size;
1735 sb->st_atim.tv_sec = vap->va_atime.tv_sec;
1736 sb->st_atim.tv_nsec = vap->va_atime.tv_nsec;
1737 sb->st_mtim.tv_sec = vap->va_mtime.tv_sec;
1738 sb->st_mtim.tv_nsec = vap->va_mtime.tv_nsec;
1739 sb->st_ctim.tv_sec = vap->va_ctime.tv_sec;
1740 sb->st_ctim.tv_nsec = vap->va_ctime.tv_nsec;
1741 sb->st_birthtim.tv_sec = vap->va_birthtime.tv_sec;
1742 sb->st_birthtim.tv_nsec = vap->va_birthtime.tv_nsec;
1752 sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize);
1753 sb->st_flags = vap->va_flags;
1754 sb->st_blocks = vap->va_bytes / S_BLKSIZE;
1755 sb->st_gen = vap->va_gen;
1757 return (vop_stat_helper_post(a, error));
1763 return (EJUSTRETURN);
1769 struct vnode *dvp, *vp, **vpp;
1774 if (vpp != NULL && ap->a_unlock_vp && (vp = *vpp) != NULL)
int lockstatus(const struct lock *lk)
int lockmgr_xlock(struct lock *lk, u_int flags, const char *file, int line)
int lockmgr_lock_flags(struct lock *lk, u_int flags, struct lock_object *ilk, const char *file, int line)
int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line)
int lockmgr_unlock(struct lock *lk)
int lf_advlock(struct vop_advlock_args *ap, struct lockf **statep, u_quad_t size)
int lf_advlockasync(struct vop_advlockasync_args *ap, struct lockf **statep, u_quad_t size)
void lf_purgelocks(struct vnode *vp, struct lockf **statep)
void *() malloc(size_t size, struct malloc_type *mtp, int flags)
void free(void *addr, struct malloc_type *mtp)
void panic(const char *fmt,...)
int printf(const char *fmt,...)
void bufdone(struct buf *bp)
int vop_stdgetpages(struct vop_getpages_args *ap)
int vop_stdallocate(struct vop_allocate_args *ap)
int vop_stdvptocnp(struct vop_vptocnp_args *ap)
int vop_stdfsync(struct vop_fsync_args *ap)
struct vop_vector default_vnodeops
int vop_stdioctl(struct vop_ioctl_args *ap)
int vop_ebadf(struct vop_generic_args *ap)
int vop_lock(struct vop_lock1_args *ap)
int vfs_stdsysctl(struct mount *mp, fsctlop_t op, struct sysctl_req *req)
static int vop_stdstat(struct vop_stat_args *ap)
static int vop_stdgetpages_async(struct vop_getpages_async_args *ap)
int vop_stdbmap(struct vop_bmap_args *ap)
static int vop_stdunset_text(struct vop_unset_text_args *ap)
int vop_stdset_text(struct vop_set_text_args *ap)
int vop_stdadvise(struct vop_advise_args *ap)
int vfs_stdextattrctl(struct mount *mp, int cmd, struct vnode *filename_vp, int attrnamespace, const char *attrname)
int vop_stdunp_bind(struct vop_unp_bind_args *ap)
int vop_stdislocked(struct vop_islocked_args *ap)
int vop_stdkqfilter(struct vop_kqfilter_args *ap)
static int vop_norename(struct vop_rename_args *)
static int vop_nostrategy(struct vop_strategy_args *)
static int vop_stdvput_pair(struct vop_vput_pair_args *ap)
int vop_null(struct vop_generic_args *ap)
int vop_stdadd_writecount_nomsync(struct vop_add_writecount_args *ap)
int vop_eopnotsupp(struct vop_generic_args *ap)
int vfs_stdvget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp)
int vop_stdadvlockpurge(struct vop_advlockpurge_args *ap)
static int vop_stdadd_writecount(struct vop_add_writecount_args *ap)
static int vop_stdread_pgcache(struct vop_read_pgcache_args *ap)
int vop_stdunlock(struct vop_unlock_args *ap)
static vop_bypass_t * bp_by_off(struct vop_vector *vop, struct vop_generic_args *a)
VFS_VOP_VECTOR_REGISTER(default_vnodeops)
int vfs_stdroot(struct mount *mp, int flags, struct vnode **vpp)
int vop_stdfdatasync_buf(struct vop_fdatasync_args *ap)
int vfs_stdstatfs(struct mount *mp, struct statfs *sbp)
int vfs_stdinit(struct vfsconf *vfsp)
int vop_stdgetwritemount(struct vop_getwritemount_args *ap)
int vfs_stdquotactl(struct mount *mp, int cmds, uid_t uid, void *arg, bool *mp_busy)
int vop_stdaccessx(struct vop_accessx_args *ap)
int vop_unlock(struct vop_unlock_args *ap)
static int vop_stdcopy_file_range(struct vop_copy_file_range_args *ap)
static int __always_inline vop_stdadd_writecount_impl(struct vop_add_writecount_args *ap, bool handle_msync)
static int vp_zerofill(struct vnode *vp, struct vattr *vap, off_t *offsetp, off_t *lenp, int ioflag, struct ucred *cred)
static int get_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, int dirbuflen, off_t *off, char **cpos, int *len, int *eofflag, struct thread *td)
int vop_stdputpages(struct vop_putpages_args *ap)
int vfs_stdfhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp)
int vop_stdpathconf(struct vop_pathconf_args *ap)
int vop_sigdefer(struct vop_vector *vop, struct vop_generic_args *a)
int vop_stdvptofh(struct vop_vptofh_args *ap)
int vfs_stduninit(struct vfsconf *vfsp)
int vop_enotty(struct vop_generic_args *ap)
int vop_stdpoll(struct vop_poll_args *ap)
int vfs_stdsync(struct mount *mp, int waitfor)
int vop_einval(struct vop_generic_args *ap)
int vop_stdunp_connect(struct vop_unp_connect_args *ap)
int vop_stdunp_detach(struct vop_unp_detach_args *ap)
static int vop_nolookup(struct vop_lookup_args *)
int vop_stdlock(struct vop_lock1_args *ap)
int vop_eagain(struct vop_generic_args *ap)
int vop_panic(struct vop_generic_args *ap)
int vop_stdadvlock(struct vop_advlock_args *ap)
int vop_stdadvlockasync(struct vop_advlockasync_args *ap)
int vop_stdneed_inactive(struct vop_need_inactive_args *ap)
int vop_stddeallocate(struct vop_deallocate_args *ap)
int vop_stdaccess(struct vop_access_args *ap)
static int dirent_exists(struct vnode *vp, const char *dirname, struct thread *td)
int vop_islocked(struct vop_islocked_args *ap)
int vop_nopoll(struct vop_poll_args *ap)
int vfs_stdnosync(struct mount *mp, int waitfor)
int vop_enoent(struct vop_generic_args *ap)
static int vop_stdis_text(struct vop_is_text_args *ap)
static int vop_stdfdatasync(struct vop_fdatasync_args *ap)
struct vfsconfhead vfsconf
void() NDFREE(struct nameidata *ndp, const u_int flags)
struct mount * vfs_ref_from_vp(struct vnode *vp)
int vfs_kqfilter(struct vop_kqfilter_args *ap)
void vop_rename_fail(struct vop_rename_args *ap)
void vref(struct vnode *vp)
int bnoreuselist(struct bufv *bufv, struct bufobj *bo, daddr_t startn, daddr_t endn)
void vn_printf(struct vnode *vp, const char *fmt,...)
int vn_pollrecord(struct vnode *vp, struct thread *td, int events)
void vrele(struct vnode *vp)
void vput(struct vnode *vp)
void vunref(struct vnode *vp)
void vlazy(struct vnode *vp)
int vfs_unixify_accmode(accmode_t *accmode)
int vget(struct vnode *vp, int flags)
int vn_bmap_seekhole_locked(struct vnode *vp, u_long cmd, off_t *off, struct ucred *cred)
int vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, struct vnode *outvp, off_t *outoffp, size_t *lenp, unsigned int flags, struct ucred *incred, struct ucred *outcred, struct thread *fsize_td)
int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, u_int vn_open_flags, struct ucred *cred, struct file *fp)
int vn_fsync_buf(struct vnode *vp, int waitfor)
int vn_close(struct vnode *vp, int flags, struct ucred *file_cred, struct thread *td)