Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/vfs_default.c
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
static int dirent_exists(struct vnode *vp, const char *dirname, | static int dirent_exists(struct vnode *vp, const char *dirname, | ||||
struct thread *td); | struct thread *td); | ||||
#define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) | #define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) | ||||
static int vop_stdis_text(struct vop_is_text_args *ap); | static int vop_stdis_text(struct vop_is_text_args *ap); | ||||
static int vop_stdunset_text(struct vop_unset_text_args *ap); | static int vop_stdunset_text(struct vop_unset_text_args *ap); | ||||
static int vop_stdadd_writecount(struct vop_add_writecount_args *ap); | static int vop_stdadd_writecount(struct vop_add_writecount_args *ap); | ||||
static int vop_stdcopy_file_range(struct vop_copy_file_range_args *ap); | |||||
static int vop_stdfdatasync(struct vop_fdatasync_args *ap); | static int vop_stdfdatasync(struct vop_fdatasync_args *ap); | ||||
static int vop_stdgetpages_async(struct vop_getpages_async_args *ap); | static int vop_stdgetpages_async(struct vop_getpages_async_args *ap); | ||||
/* | /* | ||||
* This vnode table stores what we want to do if the filesystem doesn't | * This vnode table stores what we want to do if the filesystem doesn't | ||||
* implement a particular VOP. | * implement a particular VOP. | ||||
* | * | ||||
* If there is no specific entry here, we will return EOPNOTSUPP. | * If there is no specific entry here, we will return EOPNOTSUPP. | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | struct vop_vector default_vnodeops = { | ||||
.vop_vptofh = vop_stdvptofh, | .vop_vptofh = vop_stdvptofh, | ||||
.vop_unp_bind = vop_stdunp_bind, | .vop_unp_bind = vop_stdunp_bind, | ||||
.vop_unp_connect = vop_stdunp_connect, | .vop_unp_connect = vop_stdunp_connect, | ||||
.vop_unp_detach = vop_stdunp_detach, | .vop_unp_detach = vop_stdunp_detach, | ||||
.vop_is_text = vop_stdis_text, | .vop_is_text = vop_stdis_text, | ||||
.vop_set_text = vop_stdset_text, | .vop_set_text = vop_stdset_text, | ||||
.vop_unset_text = vop_stdunset_text, | .vop_unset_text = vop_stdunset_text, | ||||
.vop_add_writecount = vop_stdadd_writecount, | .vop_add_writecount = vop_stdadd_writecount, | ||||
.vop_copy_file_range = vop_stdcopy_file_range, | |||||
}; | }; | ||||
/* | /* | ||||
* Series of placeholder functions for various error returns for | * Series of placeholder functions for various error returns for | ||||
* VOPs. | * VOPs. | ||||
*/ | */ | ||||
int | int | ||||
▲ Show 20 Lines • Show All 1,054 Lines • ▼ Show 20 Lines | |||||
int | int | ||||
vfs_stdnosync (mp, waitfor) | vfs_stdnosync (mp, waitfor) | ||||
struct mount *mp; | struct mount *mp; | ||||
int waitfor; | int waitfor; | ||||
{ | { | ||||
return (0); | return (0); | ||||
} | |||||
static int | |||||
vop_stdcopy_file_range(struct vop_copy_file_range_args *ap) | |||||
{ | |||||
int error; | |||||
error = vn_generic_copy_file_range(ap->a_invp, ap->a_inoffp, | |||||
ap->a_outvp, ap->a_outoffp, ap->a_lenp, ap->a_flags, ap->a_incred, | |||||
ap->a_outcred, ap->a_fsizetd); | |||||
return (error); | |||||
} | } | ||||
int | int | ||||
vfs_stdvget (mp, ino, flags, vpp) | vfs_stdvget (mp, ino, flags, vpp) | ||||
struct mount *mp; | struct mount *mp; | ||||
ino_t ino; | ino_t ino; | ||||
int flags; | int flags; | ||||
struct vnode **vpp; | struct vnode **vpp; | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |