Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_init.c
Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
int prev_stops; | int prev_stops; | ||||
prev_stops = sigdeferstop(SIGDEFERSTOP_SILENT); | prev_stops = sigdeferstop(SIGDEFERSTOP_SILENT); | ||||
(*mp->mnt_vfc->vfc_vfsops_sd->vfs_purge)(mp); | (*mp->mnt_vfc->vfc_vfsops_sd->vfs_purge)(mp); | ||||
sigallowstop(prev_stops); | sigallowstop(prev_stops); | ||||
} | } | ||||
static int | |||||
vfs_report_lockf_sigdefer(struct mount *mp, struct sbuf *sb) | |||||
{ | |||||
int prev_stops, rc; | |||||
prev_stops = sigdeferstop(SIGDEFERSTOP_SILENT); | |||||
rc = (*mp->mnt_vfc->vfc_vfsops_sd->vfs_report_lockf)(mp, sb); | |||||
sigallowstop(prev_stops); | |||||
return (rc); | |||||
} | |||||
static struct vfsops vfsops_sigdefer = { | static struct vfsops vfsops_sigdefer = { | ||||
.vfs_mount = vfs_mount_sigdefer, | .vfs_mount = vfs_mount_sigdefer, | ||||
.vfs_unmount = vfs_unmount_sigdefer, | .vfs_unmount = vfs_unmount_sigdefer, | ||||
.vfs_root = vfs_root_sigdefer, | .vfs_root = vfs_root_sigdefer, | ||||
.vfs_cachedroot = vfs_cachedroot_sigdefer, | .vfs_cachedroot = vfs_cachedroot_sigdefer, | ||||
.vfs_quotactl = vfs_quotactl_sigdefer, | .vfs_quotactl = vfs_quotactl_sigdefer, | ||||
.vfs_statfs = vfs_statfs_sigdefer, | .vfs_statfs = vfs_statfs_sigdefer, | ||||
.vfs_sync = vfs_sync_sigdefer, | .vfs_sync = vfs_sync_sigdefer, | ||||
.vfs_vget = vfs_vget_sigdefer, | .vfs_vget = vfs_vget_sigdefer, | ||||
.vfs_fhtovp = vfs_fhtovp_sigdefer, | .vfs_fhtovp = vfs_fhtovp_sigdefer, | ||||
.vfs_checkexp = vfs_checkexp_sigdefer, | .vfs_checkexp = vfs_checkexp_sigdefer, | ||||
.vfs_extattrctl = vfs_extattrctl_sigdefer, | .vfs_extattrctl = vfs_extattrctl_sigdefer, | ||||
.vfs_sysctl = vfs_sysctl_sigdefer, | .vfs_sysctl = vfs_sysctl_sigdefer, | ||||
.vfs_susp_clean = vfs_susp_clean_sigdefer, | .vfs_susp_clean = vfs_susp_clean_sigdefer, | ||||
.vfs_reclaim_lowervp = vfs_reclaim_lowervp_sigdefer, | .vfs_reclaim_lowervp = vfs_reclaim_lowervp_sigdefer, | ||||
.vfs_unlink_lowervp = vfs_unlink_lowervp_sigdefer, | .vfs_unlink_lowervp = vfs_unlink_lowervp_sigdefer, | ||||
.vfs_purge = vfs_purge_sigdefer, | .vfs_purge = vfs_purge_sigdefer, | ||||
.vfs_report_lockf = vfs_report_lockf_sigdefer, | |||||
}; | }; | ||||
/* Register a new filesystem type in the global table */ | /* Register a new filesystem type in the global table */ | ||||
static int | static int | ||||
vfs_register(struct vfsconf *vfc) | vfs_register(struct vfsconf *vfc) | ||||
{ | { | ||||
struct sysctl_oid *oidp; | struct sysctl_oid *oidp; | ||||
struct vfsops *vfsops; | struct vfsops *vfsops; | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | vfs_register(struct vfsconf *vfc) | ||||
if (vfsops->vfs_uninit == NULL) | if (vfsops->vfs_uninit == NULL) | ||||
/* file system specific uninitialisation */ | /* file system specific uninitialisation */ | ||||
vfsops->vfs_uninit = vfs_stduninit; | vfsops->vfs_uninit = vfs_stduninit; | ||||
if (vfsops->vfs_extattrctl == NULL) | if (vfsops->vfs_extattrctl == NULL) | ||||
/* extended attribute control */ | /* extended attribute control */ | ||||
vfsops->vfs_extattrctl = vfs_stdextattrctl; | vfsops->vfs_extattrctl = vfs_stdextattrctl; | ||||
if (vfsops->vfs_sysctl == NULL) | if (vfsops->vfs_sysctl == NULL) | ||||
vfsops->vfs_sysctl = vfs_stdsysctl; | vfsops->vfs_sysctl = vfs_stdsysctl; | ||||
if (vfsops->vfs_report_lockf == NULL) | |||||
vfsops->vfs_report_lockf = vfs_report_lockf; | |||||
if ((vfc->vfc_flags & VFCF_SBDRY) != 0) { | if ((vfc->vfc_flags & VFCF_SBDRY) != 0) { | ||||
vfc->vfc_vfsops_sd = vfc->vfc_vfsops; | vfc->vfc_vfsops_sd = vfc->vfc_vfsops; | ||||
vfc->vfc_vfsops = &vfsops_sigdefer; | vfc->vfc_vfsops = &vfsops_sigdefer; | ||||
} | } | ||||
if (vfc->vfc_flags & VFCF_JAIL) | if (vfc->vfc_flags & VFCF_JAIL) | ||||
prison_add_vfs(vfc); | prison_add_vfs(vfc); | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |