| /freebsd-14-stable/sys/contrib/openzfs/include/os/linux/spl/sys/ |
| HD | mutex.h | 49 #define MUTEX(mp) (&((mp)->m_mutex)) argument 52 spl_mutex_set_owner(kmutex_t *mp) in spl_mutex_set_owner() argument 54 mp->m_owner = current; in spl_mutex_set_owner() 58 spl_mutex_clear_owner(kmutex_t *mp) in spl_mutex_clear_owner() argument 60 mp->m_owner = NULL; in spl_mutex_clear_owner() 63 #define mutex_owner(mp) (READ_ONCE((mp)->m_owner)) argument 64 #define mutex_owned(mp) (mutex_owner(mp) == current) argument 65 #define MUTEX_HELD(mp) mutex_owned(mp) argument 66 #define MUTEX_NOT_HELD(mp) (!MUTEX_HELD(mp)) argument 70 spl_mutex_set_type(kmutex_t *mp, kmutex_type_t type) in spl_mutex_set_type() argument [all …]
|
| /freebsd-14-stable/lib/libc/db/mpool/ |
| HD | mpool.c | 65 MPOOL *mp; in mpool_open() local 82 if ((mp = (MPOOL *)calloc(1, sizeof(MPOOL))) == NULL) in mpool_open() 84 TAILQ_INIT(&mp->lqh); in mpool_open() 86 TAILQ_INIT(&mp->hqh[entry]); in mpool_open() 87 mp->maxcache = maxcache; in mpool_open() 88 mp->npages = sb.st_size / pagesize; in mpool_open() 89 mp->pagesize = pagesize; in mpool_open() 90 mp->fd = fd; in mpool_open() 91 return (mp); in mpool_open() 99 mpool_filter(MPOOL *mp, void (*pgin) (void *, pgno_t, void *), in mpool_filter() argument [all …]
|
| /freebsd-14-stable/usr.sbin/ppp/ |
| HD | mp.c | 136 mp_ReadHeader(struct mp *mp, struct mbuf *m, struct mp_header *header) in mp_ReadHeader() argument 138 if (mp->local_is12bit) { in mp_ReadHeader() 194 struct mp *mp = (struct mp *)v; in mp_UpDown() local 197 percent = MAX(mp->link.stats.total.in.OctetsPerSecond, in mp_UpDown() 198 mp->link.stats.total.out.OctetsPerSecond) * 800 / in mp_UpDown() 199 mp->bundle->bandwidth; in mp_UpDown() 200 if (percent >= mp->cfg.autoload.max) { in mp_UpDown() 202 bundle_AutoAdjust(mp->bundle, percent, AUTO_UP); in mp_UpDown() 203 } else if (percent <= mp->cfg.autoload.min) { in mp_UpDown() 205 bundle_AutoAdjust(mp->bundle, percent, AUTO_DOWN); in mp_UpDown() [all …]
|
| /freebsd-14-stable/sys/kern/ |
| HD | vfs_mount.c | 136 static void mount_devctl_event(const char *type, struct mount *mp, bool donew); 155 struct mount *mp; in mount_init() local 157 mp = (struct mount *)mem; in mount_init() 158 mtx_init(&mp->mnt_mtx, "struct mount mtx", NULL, MTX_DEF); in mount_init() 159 mtx_init(&mp->mnt_listmtx, "struct mount vlist mtx", NULL, MTX_DEF); in mount_init() 160 lockinit(&mp->mnt_explock, PVFS, "explock", 0, 0); in mount_init() 161 mp->mnt_pcpu = uma_zalloc_pcpu(pcpu_zone_16, M_WAITOK | M_ZERO); in mount_init() 162 mp->mnt_ref = 0; in mount_init() 163 mp->mnt_vfs_ops = 1; in mount_init() 164 mp->mnt_rootvnode = NULL; in mount_init() [all …]
|
| HD | vfs_export.c | 75 static int vfs_hang_addrlist(struct mount *mp, struct netexport *nep, 104 vfs_hang_addrlist(struct mount *mp, struct netexport *nep, in vfs_hang_addrlist() argument 130 if (mp->mnt_flag & MNT_DEFEXPORTED) { in vfs_hang_addrlist() 131 vfs_mount_error(mp, in vfs_hang_addrlist() 132 "MNT_DEFEXPORTED already set for mount %p", mp); in vfs_hang_addrlist() 146 MNT_ILOCK(mp); in vfs_hang_addrlist() 147 mp->mnt_flag |= MNT_DEFEXPORTED; in vfs_hang_addrlist() 148 MNT_IUNLOCK(mp); in vfs_hang_addrlist() 154 vfs_mount_error(mp, "ex_addrlen %d is greater than %d", in vfs_hang_addrlist() 167 vfs_mount_error(mp, "Invalid saddr->sa_family: %d"); in vfs_hang_addrlist() [all …]
|
| HD | vfs_init.c | 169 vfs_mount_sigdefer(struct mount *mp) in vfs_mount_sigdefer() argument 173 TSRAW(curthread, TS_ENTER, "VFS_MOUNT", mp->mnt_vfc->vfc_name); in vfs_mount_sigdefer() 175 rc = (*mp->mnt_vfc->vfc_vfsops_sd->vfs_mount)(mp); in vfs_mount_sigdefer() 177 TSRAW(curthread, TS_EXIT, "VFS_MOUNT", mp->mnt_vfc->vfc_name); in vfs_mount_sigdefer() 182 vfs_unmount_sigdefer(struct mount *mp, int mntflags) in vfs_unmount_sigdefer() argument 187 rc = (*mp->mnt_vfc->vfc_vfsops_sd->vfs_unmount)(mp, mntflags); in vfs_unmount_sigdefer() 193 vfs_root_sigdefer(struct mount *mp, int flags, struct vnode **vpp) in vfs_root_sigdefer() argument 198 rc = (*mp->mnt_vfc->vfc_vfsops_sd->vfs_root)(mp, flags, vpp); in vfs_root_sigdefer() 204 vfs_cachedroot_sigdefer(struct mount *mp, int flags, struct vnode **vpp) in vfs_cachedroot_sigdefer() argument 209 rc = (*mp->mnt_vfc->vfc_vfsops_sd->vfs_cachedroot)(mp, flags, vpp); in vfs_cachedroot_sigdefer() [all …]
|
| /freebsd-14-stable/sys/fs/tmpfs/ |
| HD | tmpfs_vfsops.c | 117 tmpfs_update_mtime_lazy(struct mount *mp) in tmpfs_update_mtime_lazy() argument 121 MNT_VNODE_FOREACH_LAZY(vp, mp, mvp, tmpfs_update_mtime_lazy_filter, NULL) { in tmpfs_update_mtime_lazy() 130 tmpfs_update_mtime_all(struct mount *mp) in tmpfs_update_mtime_all() argument 134 if (VFS_TO_TMPFS(mp)->tm_nomtime) in tmpfs_update_mtime_all() 136 MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { in tmpfs_update_mtime_all() 154 tmpfs_check_rw_maps_cb(struct mount *mp __unused, vm_map_t map __unused, in tmpfs_check_rw_maps_cb() 169 tmpfs_revoke_rw_maps_cb(struct mount *mp __unused, vm_map_t map, in tmpfs_revoke_rw_maps_cb() 188 tmpfs_all_rw_maps(struct mount *mp, bool (*cb)(struct mount *mp, vm_map_t, in tmpfs_all_rw_maps() argument 248 if (vp->v_mount != mp) { in tmpfs_all_rw_maps() 253 terminate = cb(mp, map, entry, cb_arg); in tmpfs_all_rw_maps() [all …]
|
| /freebsd-14-stable/sys/fs/nullfs/ |
| HD | null_vfsops.c | 82 nullfs_mount(struct mount *mp) in nullfs_mount() argument 93 NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); in nullfs_mount() 95 if (mp->mnt_flag & MNT_ROOTFS) in nullfs_mount() 101 if (mp->mnt_flag & MNT_UPDATE) { in nullfs_mount() 105 if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) in nullfs_mount() 114 error = vfs_getopt(mp->mnt_optnew, "from", (void **)&target, &len); in nullfs_mount() 116 error = vfs_getopt(mp->mnt_optnew, "target", (void **)&target, &len); in nullfs_mount() 123 if (mp->mnt_vnodecovered->v_op == &null_vnodeops && in nullfs_mount() 124 VOP_ISLOCKED(mp->mnt_vnodecovered) == LK_EXCLUSIVE) { in nullfs_mount() 125 VOP_UNLOCK(mp->mnt_vnodecovered); in nullfs_mount() [all …]
|
| /freebsd-14-stable/contrib/ntp/libntp/lib/isc/pthreads/include/isc/ |
| HD | mutex.h | 70 #define isc_mutex_init(mp) \ argument 71 isc_mutex_init_profile((mp), __FILE__, __LINE__) 74 #define isc_mutex_init(mp) \ argument 75 isc_mutex_init_errcheck((mp)) 77 #define isc_mutex_init(mp) \ argument 78 isc__mutex_init((mp), __FILE__, __LINE__) 79 isc_result_t isc__mutex_init(isc_mutex_t *mp, const char *file, unsigned int line); 84 #define isc_mutex_lock(mp) \ argument 85 isc_mutex_lock_profile((mp), __FILE__, __LINE__) 87 #define isc_mutex_lock(mp) \ argument [all …]
|
| /freebsd-14-stable/sys/fs/unionfs/ |
| HD | union_vfsops.c | 74 unionfs_domount(struct mount *mp) in unionfs_domount() argument 94 UNIONFSDEBUG("unionfs_mount(mp = %p)\n", mp); in unionfs_domount() 106 if (mp->mnt_flag & MNT_ROOTFS) { in unionfs_domount() 107 vfs_mount_error(mp, "Cannot union mount root filesystem"); in unionfs_domount() 114 if (mp->mnt_flag & MNT_UPDATE) { in unionfs_domount() 115 vfs_mount_error(mp, "unionfs does not support mount update"); in unionfs_domount() 122 error = vfs_getopt(mp->mnt_optnew, "target", (void **)&target, &len); in unionfs_domount() 124 error = vfs_getopt(mp->mnt_optnew, "from", (void **)&target, in unionfs_domount() 127 vfs_mount_error(mp, "Invalid target"); in unionfs_domount() 130 if (vfs_getopt(mp->mnt_optnew, "below", NULL, NULL) == 0) in unionfs_domount() [all …]
|
| /freebsd-14-stable/sys/ufs/ffs/ |
| HD | ffs_vfsops.c | 89 static int ffs_sync_lazy(struct mount *mp); 241 ffs_check_blkno(struct mount *mp, ino_t inum, ufs2_daddr_t daddr, int blksize) in ffs_check_blkno() argument 248 KASSERT((mp->mnt_flag & MNT_UNTRUSTED) != 0, in ffs_check_blkno() 250 ump = VFSTOUFS(mp); in ffs_check_blkno() 277 "number %jd\n", mp->mnt_stat.f_mntonname, inum, daddr); in ffs_check_blkno() 349 ffs_mount(struct mount *mp) in ffs_mount() argument 364 if (vfs_filteropt(mp->mnt_optnew, ffs_opts)) in ffs_mount() 379 vfs_deleteopt(mp->mnt_optnew, "groupquota"); in ffs_mount() 380 vfs_deleteopt(mp->mnt_optnew, "userquota"); in ffs_mount() 382 fspec = vfs_getopts(mp->mnt_optnew, "from", &error); in ffs_mount() [all …]
|
| HD | ffs_suspend.c | 69 ffs_susp_suspended(struct mount *mp) in ffs_susp_suspended() argument 75 ump = VFSTOUFS(mp); in ffs_susp_suspended() 94 struct mount *mp; in ffs_susp_rdwr() local 104 error = devfs_get_cdevpriv((void **)&mp); in ffs_susp_rdwr() 110 ump = VFSTOUFS(mp); in ffs_susp_rdwr() 114 if (ffs_susp_suspended(mp) == 0) { in ffs_susp_rdwr() 178 ffs_susp_suspend(struct mount *mp) in ffs_susp_suspend() argument 185 if (!ffs_own_mount(mp)) in ffs_susp_suspend() 187 if (ffs_susp_suspended(mp)) in ffs_susp_suspend() 190 ump = VFSTOUFS(mp); in ffs_susp_suspend() [all …]
|
| /freebsd-14-stable/libexec/talkd/ |
| HD | process.c | 63 process_request(CTL_MSG *mp, CTL_RESPONSE *rp) in process_request() argument 69 rp->type = mp->type; in process_request() 71 if (mp->vers != TALK_VERSION) { in process_request() 72 syslog(LOG_WARNING, "bad protocol version %d", mp->vers); in process_request() 76 mp->id_num = ntohl(mp->id_num); in process_request() 77 mp->addr.sa_family = ntohs(mp->addr.sa_family); in process_request() 78 if (mp->addr.sa_family != AF_INET) { in process_request() 80 mp->addr.sa_family); in process_request() 84 mp->ctl_addr.sa_family = ntohs(mp->ctl_addr.sa_family); in process_request() 85 if (mp->ctl_addr.sa_family != AF_INET) { in process_request() [all …]
|
| /freebsd-14-stable/stand/libsa/ |
| HD | zalloc.c | 88 znalloc(MemPool *mp, uintptr_t bytes, size_t align) in znalloc() argument 108 if (bytes > mp->mp_Size - mp->mp_Used) in znalloc() 111 for (pmn = &mp->mp_First; (mn = *pmn) != NULL; pmn = &mn->mr_Next) { in znalloc() 156 mp->mp_Used += bytes; in znalloc() 172 zfree(MemPool *mp, void *ptr, uintptr_t bytes) in zfree() argument 190 if ((char *)ptr < (char *)mp->mp_Base || in zfree() 191 (char *)ptr + bytes > (char *)mp->mp_End || in zfree() 198 mp->mp_Used -= bytes; in zfree() 200 for (pmn = &mp->mp_First; (mn = *pmn) != NULL; pmn = &mn->mr_Next) { in zfree() 235 if (pmn != &mp->mp_First) { in zfree() [all …]
|
| /freebsd-14-stable/sys/fs/devfs/ |
| HD | devfs_vfsops.c | 68 devfs_mount(struct mount *mp) in devfs_mount() argument 81 if (mp->mnt_flag & MNT_ROOTFS) in devfs_mount() 87 if (mp->mnt_optnew != NULL) { in devfs_mount() 88 if (vfs_filteropt(mp->mnt_optnew, devfs_opts)) in devfs_mount() 91 if (vfs_flagopt(mp->mnt_optnew, "export", NULL, 0)) in devfs_mount() 94 if (vfs_getopt(mp->mnt_optnew, "ruleset", NULL, NULL) == 0 && in devfs_mount() 95 (vfs_scanopt(mp->mnt_optnew, "ruleset", "%d", in devfs_mount() 97 vfs_mount_error(mp, "%s", in devfs_mount() 111 if (mp->mnt_flag & MNT_UPDATE) { in devfs_mount() 113 fmp = mp->mnt_data; in devfs_mount() [all …]
|
| /freebsd-14-stable/usr.bin/mail/ |
| HD | quit.c | 73 struct message *mp; in quit() local 144 for (mp = &message[0]; mp < &message[msgCount]; mp++) { in quit() 145 if (mp->m_flag & MNEW) { in quit() 146 mp->m_flag &= ~MNEW; in quit() 147 mp->m_flag |= MSTATUS; in quit() 149 if (mp->m_flag & MSTATUS) in quit() 151 if ((mp->m_flag & MTOUCH) == 0) in quit() 152 mp->m_flag |= MPRESERVE; in quit() 153 if ((mp->m_flag & nohold) == 0) in quit() 154 mp->m_flag |= holdbit; in quit() [all …]
|
| HD | cmd1.c | 59 struct message *mp; in headers() local 67 mp = &message[screen * size]; in headers() 68 if (mp >= &message[msgCount]) in headers() 69 mp = &message[msgCount - size]; in headers() 70 if (mp < &message[0]) in headers() 71 mp = &message[0]; in headers() 73 mesg = mp - &message[0]; in headers() 75 dot = mp; in headers() 76 for (; mp < &message[msgCount]; mp++) { in headers() 78 if (mp->m_flag & MDELETED) in headers() [all …]
|
| /freebsd-14-stable/sys/contrib/openzfs/module/os/linux/spl/ |
| HD | spl-condvar.c | 114 cv_wait_common(kcondvar_t *cvp, kmutex_t *mp, int state, int io) in cv_wait_common() argument 120 ASSERT(mp); in cv_wait_common() 122 ASSERT(mutex_owned(mp)); in cv_wait_common() 127 m = xchg(&cvp->cv_mutex, mp); in cv_wait_common() 129 ASSERT(m == NULL || m == mp); in cv_wait_common() 139 mutex_exit(mp); in cv_wait_common() 162 mutex_enter(mp); in cv_wait_common() 166 __cv_wait(kcondvar_t *cvp, kmutex_t *mp) in __cv_wait() argument 168 cv_wait_common(cvp, mp, TASK_UNINTERRUPTIBLE, 0); in __cv_wait() 173 __cv_wait_io(kcondvar_t *cvp, kmutex_t *mp) in __cv_wait_io() argument [all …]
|
| /freebsd-14-stable/sys/fs/nfsclient/ |
| HD | nfs_clcomsubs.c | 58 struct mbuf *mp, *mp2; in nfsm_uiombuf() local 70 mp = mp2 = nd->nd_mb; in nfsm_uiombuf() 74 mtod(mp, char *) + mp->m_len, ("nfsm_uiombuf: mcp wrong")); in nfsm_uiombuf() 84 mlen = M_TRAILINGSPACE(mp); in nfsm_uiombuf() 87 mp = nfsm_add_ext_pgs(mp, in nfsm_uiombuf() 90 mp->m_epg_pa[nd->nd_bextpg]); in nfsm_uiombuf() 94 NFSMCLGET(mp, M_WAITOK); in nfsm_uiombuf() 96 NFSMGET(mp); in nfsm_uiombuf() 97 mp->m_len = 0; in nfsm_uiombuf() 98 mlen = M_TRAILINGSPACE(mp); in nfsm_uiombuf() [all …]
|
| /freebsd-14-stable/contrib/ntp/libntp/lib/isc/pthreads/ |
| HD | mutex.c | 99 isc_mutex_init_profile(isc_mutex_t *mp, const char *file, int line) { in isc_mutex_init_profile() argument 102 err = pthread_mutex_init(&mp->mutex, NULL); in isc_mutex_init_profile() 122 mp->stats = &stats[stats_next++]; in isc_mutex_init_profile() 126 mp->stats->file = file; in isc_mutex_init_profile() 127 mp->stats->line = line; in isc_mutex_init_profile() 128 mp->stats->count = 0; in isc_mutex_init_profile() 129 timevalclear(&mp->stats->locked_total); in isc_mutex_init_profile() 130 timevalclear(&mp->stats->wait_total); in isc_mutex_init_profile() 132 mp->stats->lockers[i].file = NULL; in isc_mutex_init_profile() 133 mp->stats->lockers[i].line = 0; in isc_mutex_init_profile() [all …]
|
| /freebsd-14-stable/sys/contrib/openzfs/module/os/freebsd/spl/ |
| HD | spl_vfs.c | 123 struct mount *mp; in mount_snapshot() local 168 mp = vfs_mount_alloc(vp, vfsp, fspath, vp->v_mount->mnt_cred); in mount_snapshot() 170 mp->mnt_optnew = NULL; in mount_snapshot() 171 vfs_setmntopt(mp, "from", fspec, 0); in mount_snapshot() 172 mp->mnt_optnew = mp->mnt_opt; in mount_snapshot() 173 mp->mnt_opt = NULL; in mount_snapshot() 178 mp->mnt_flag = fsflags & MNT_UPDATEMASK; in mount_snapshot() 182 mp->mnt_flag |= MNT_RDONLY; in mount_snapshot() 187 mp->mnt_flag |= MNT_NOSUID; in mount_snapshot() 192 mp->mnt_flag |= MNT_IGNORE; in mount_snapshot() [all …]
|
| /freebsd-14-stable/usr.sbin/lpr/lpd/ |
| HD | modes.c | 204 struct modes *mp; in msearch() local 206 for (mp = cmodes; mp->name; ++mp) in msearch() 207 if (CHK(str, mp->name)) { in msearch() 208 ip->c_cflag &= ~mp->unset; in msearch() 209 ip->c_cflag |= mp->set; in msearch() 212 for (mp = imodes; mp->name; ++mp) in msearch() 213 if (CHK(str, mp->name)) { in msearch() 214 ip->c_iflag &= ~mp->unset; in msearch() 215 ip->c_iflag |= mp->set; in msearch() 218 for (mp = lmodes; mp->name; ++mp) in msearch() [all …]
|
| /freebsd-14-stable/sys/fs/fuse/ |
| HD | fuse_vfsops.c | 216 fuse_vfs_remount(struct mount *mp, struct thread *td, uint64_t mntopts, in fuse_vfs_remount() argument 220 struct fuse_data *data = fuse_get_mpdata(mp); in fuse_vfs_remount() 227 if ((mp->mnt_flag ^ data->mnt_flag) & cant_update_opts) { in fuse_vfs_remount() 231 data, mp, err); in fuse_vfs_remount() 241 data, mp, err); in fuse_vfs_remount() 248 "device is dead during mount", data, mp, err); in fuse_vfs_remount() 267 fuse_vfsop_fhtovp(struct mount *mp, struct fid *fhp, int flags, in fuse_vfsop_fhtovp() argument 275 if (!(fuse_get_mpdata(mp)->dataflags & FSESS_EXPORT_SUPPORT)) in fuse_vfsop_fhtovp() 278 error = VFS_VGET(mp, ffhp->nid, LK_EXCLUSIVE, &nvp); in fuse_vfsop_fhtovp() 295 fuse_vfsop_mount(struct mount *mp) in fuse_vfsop_mount() argument [all …]
|
| /freebsd-14-stable/contrib/netbsd-tests/fs/vfs/ |
| HD | t_rwtoro.c | 58 remount_ro(const atf_tc_t *tc, const char *mp, int expected_errno) in remount_ro() argument 72 RL(rump_sys_statvfs1(mp, &sbuf, ST_WAIT)); in remount_ro() 77 mount_args_length = rump_sys_mount(sbuf.f_fstypename, mp, MNT_GETARGS, in remount_ro() 82 error = rump_sys_mount(sbuf.f_fstypename, mp, MNT_UPDATE | MNT_RDONLY, in remount_ro() 129 basic_test(const atf_tc_t *tc, const char *mp, int expected_errno, in basic_test() argument 138 nargs.nulla_target = __UNCONST(mp);; in basic_test() 143 (*pre)(use_layer ? null_mount : mp); in basic_test() 144 remount_ro(tc, mp, expected_errno); in basic_test() 146 (*post)(use_layer ? null_mount : mp); in basic_test() 152 noneopen(const atf_tc_t *tc, const char *mp) in noneopen() argument [all …]
|
| /freebsd-14-stable/tools/test/stress2/misc/ |
| HD | nullfs18.sh | 62 eval mp$i=${mntpoint}$i 66 eval mp=\$mp$i 67 [ -d $mp ] || mkdir -p $mp 68 mount | grep $mp | grep -q nullfs && umount -f $mp 72 mount -t nullfs $msrc $mp 73 chmod 777 $mp 74 export RUNDIR=$mp/stressX 75 export CTRLDIR=$mp/stressX.control 80 mps="$mps $mp" 106 eval mp=\$mp$i [all …]
|