Lines Matching +full:1 +full:ma

17  * 1. Redistributions of source code must retain the above copyright
80 static void free_mntarg(struct mntarg *ma);
106 "Delay in units of [1/kern.hz]s when retrying a failed deferred unmount");
162 mp->mnt_vfs_ops = 1; in mount_init()
240 return (1); in vfs_isopt_ro()
249 return (1); in vfs_isopt_rw()
263 return (1); in vfs_equalopts()
266 return (1); in vfs_equalopts()
269 return (1); in vfs_equalopts()
276 return (1); in vfs_equalopts()
279 return (1); in vfs_equalopts()
284 return (1); in vfs_equalopts()
330 optlen = auio->uio_iov[i + 1].iov_len; in vfs_buildopts()
365 if (namelen == 0 || opt->name[namelen - 1] != '\0') { in vfs_buildopts()
373 bcopy(auio->uio_iov[i + 1].iov_base, opt->value, in vfs_buildopts()
376 error = copyin(auio->uio_iov[i + 1].iov_base, in vfs_buildopts()
462 if ((iovcnt & 1) || (iovcnt < 4)) { in sys_nmount()
504 vfs_mp_count_add_pcpu(mpcpu, ref, 1); in vfs_ref_from_vp()
530 vfs_mp_count_add_pcpu(mpcpu, ref, 1); in vfs_ref()
648 vfs_mp_count_sub_pcpu(mpcpu, ref, 1); in vfs_rel()
682 MPASSERT(mp->mnt_vfs_ops == 1, mp, in vfs_mount_alloc()
683 ("vfs_ops should be 1 but %d found", mp->mnt_vfs_ops)); in vfs_mount_alloc()
685 atomic_add_acq_int(&vfsp->vfc_refcount, 1); in vfs_mount_alloc()
733 atomic_subtract_rel_int(&mp->mnt_vfc->vfc_refcount, 1); in vfs_mount_destroy()
749 MPASSERT(mp->mnt_vfs_ops == 1, mp, in vfs_mount_destroy()
750 ("vfs_ops should be 1 but %d found", mp->mnt_vfs_ops)); in vfs_mount_destroy()
764 1); in vfs_mount_destroy()
811 errmsg_pos = -1; in vfs_donmount()
828 if (error || fstypelen <= 0 || fstype[fstypelen - 1] != '\0') { in vfs_donmount()
836 if (error || fspathlen <= 0 || fspath[fspathlen - 1] != '\0') { in vfs_donmount()
876 do_freeopt = 1; in vfs_donmount()
882 do_freeopt = 1; in vfs_donmount()
886 do_freeopt = 1; in vfs_donmount()
947 do_freeopt = 1; in vfs_donmount()
961 do_freeopt = 1; in vfs_donmount()
964 do_freeopt = 1; in vfs_donmount()
967 do_freeopt = 1; in vfs_donmount()
970 do_freeopt = 1; in vfs_donmount()
973 do_freeopt = 1; in vfs_donmount()
1020 if (errmsg_pos != -1 && ((2 * errmsg_pos + 1) < fsoptions->uio_iovcnt) in vfs_donmount()
1024 fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, in vfs_donmount()
1025 fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); in vfs_donmount()
1028 fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, in vfs_donmount()
1029 fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); in vfs_donmount()
1055 struct mntarg *ma = NULL; in sys_mount() local
1095 ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN); in sys_mount()
1096 ma = mount_argsu(ma, "fspath", uap->path, MNAMELEN); in sys_mount()
1097 ma = mount_argb(ma, flags & MNT_RDONLY, "noro"); in sys_mount()
1098 ma = mount_argb(ma, !(flags & MNT_NOSUID), "nosuid"); in sys_mount()
1099 ma = mount_argb(ma, !(flags & MNT_NOEXEC), "noexec"); in sys_mount()
1102 return (vfsp->vfc_vfsops_sd->vfs_cmount(ma, uap->data, flags)); in sys_mount()
1103 return (vfsp->vfc_vfsops->vfs_cmount(ma, uap->data, flags)); in sys_mount()
1153 if (error == 0 && vp->v_type == VREG && va.va_nlink != 1) in vfs_domount_first()
1456 /* Assume that there is only 1 ABI for each length. */ in vfs_domount_update()
1500 if (export.ex_ngroups <= ngroups_max + 1) { in vfs_domount_update()
1748 if (sscanf(fsidbuf, "FSID:%d:%d", &fsid.val[0], &fsid.val[1]) != 2) { in kern_unmount()
1869 if (mp->mnt_vfs_ops > 1) { in vfs_op_enter()
1902 MPASSERT(mp->mnt_vfs_ops > 1 || in vfs_op_exit_locked()
2472 if (p[0] == 'n' && p[1] == 'o') in vfs_filteropt()
2528 opt->seen = 1; in vfs_getopt()
2545 return (-1); in vfs_getopt_pos()
2549 opt->seen = 1; in vfs_getopt_pos()
2553 return (-1); in vfs_getopt_pos()
2568 if (opt_value[0] == '\0' || opt_value[opt_len - 1] != '\0') in vfs_getopt_size()
2571 if (vtp == opt_value || (vtp[0] != '\0' && vtp[1] != '\0')) in vfs_getopt_size()
2606 opt->seen = 1; in vfs_getopts()
2608 ((char *)opt->value)[opt->len - 1] != '\0') { in vfs_getopts()
2626 opt->seen = 1; in vfs_flagopt()
2629 return (1); in vfs_flagopt()
2649 opt->seen = 1; in vfs_scanopt()
2652 if (((char *)opt->value)[opt->len - 1] != '\0') in vfs_scanopt()
2670 opt->seen = 1; in vfs_setopt()
2691 opt->seen = 1; in vfs_setopt_part()
2713 opt->seen = 1; in vfs_setopts()
2715 opt->len = strlen(value) + 1; in vfs_setopts()
2740 opt->seen = 1; in vfs_copyopt()
2811 mount_argb(struct mntarg *ma, int flag, const char *name) in mount_argb() argument
2814 KASSERT(name[0] == 'n' && name[1] == 'o', in mount_argb()
2817 return (mount_arg(ma, name + (flag ? 2 : 0), NULL, 0)); in mount_argb()
2824 mount_argf(struct mntarg *ma, const char *name, const char *fmt, ...) in mount_argf() argument
2831 if (ma == NULL) { in mount_argf()
2832 ma = malloc(sizeof *ma, M_MOUNT, M_WAITOK | M_ZERO); in mount_argf()
2833 SLIST_INIT(&ma->list); in mount_argf()
2835 if (ma->error) in mount_argf()
2836 return (ma); in mount_argf()
2838 ma->v = realloc(ma->v, sizeof *ma->v * (ma->len + 2), in mount_argf()
2840 ma->v[ma->len].iov_base = (void *)(uintptr_t)name; in mount_argf()
2841 ma->v[ma->len].iov_len = strlen(name) + 1; in mount_argf()
2842 ma->len++; in mount_argf()
2849 len = sbuf_len(sb) + 1; in mount_argf()
2851 SLIST_INSERT_HEAD(&ma->list, maa, next); in mount_argf()
2852 bcopy(sbuf_data(sb), maa + 1, len); in mount_argf()
2855 ma->v[ma->len].iov_base = maa + 1; in mount_argf()
2856 ma->v[ma->len].iov_len = len; in mount_argf()
2857 ma->len++; in mount_argf()
2859 return (ma); in mount_argf()
2866 mount_argsu(struct mntarg *ma, const char *name, const void *val, int len) in mount_argsu() argument
2872 return (ma); in mount_argsu()
2873 if (ma == NULL) { in mount_argsu()
2874 ma = malloc(sizeof *ma, M_MOUNT, M_WAITOK | M_ZERO); in mount_argsu()
2875 SLIST_INIT(&ma->list); in mount_argsu()
2877 if (ma->error) in mount_argsu()
2878 return (ma); in mount_argsu()
2880 SLIST_INSERT_HEAD(&ma->list, maa, next); in mount_argsu()
2881 tbuf = (void *)(maa + 1); in mount_argsu()
2882 ma->error = copyinstr(val, tbuf, len, NULL); in mount_argsu()
2883 return (mount_arg(ma, name, tbuf, -1)); in mount_argsu()
2889 * If length is -1, treat value as a C string.
2892 mount_arg(struct mntarg *ma, const char *name, const void *val, int len) in mount_arg() argument
2895 if (ma == NULL) { in mount_arg()
2896 ma = malloc(sizeof *ma, M_MOUNT, M_WAITOK | M_ZERO); in mount_arg()
2897 SLIST_INIT(&ma->list); in mount_arg()
2899 if (ma->error) in mount_arg()
2900 return (ma); in mount_arg()
2902 ma->v = realloc(ma->v, sizeof *ma->v * (ma->len + 2), in mount_arg()
2904 ma->v[ma->len].iov_base = (void *)(uintptr_t)name; in mount_arg()
2905 ma->v[ma->len].iov_len = strlen(name) + 1; in mount_arg()
2906 ma->len++; in mount_arg()
2908 ma->v[ma->len].iov_base = (void *)(uintptr_t)val; in mount_arg()
2910 ma->v[ma->len].iov_len = strlen(val) + 1; in mount_arg()
2912 ma->v[ma->len].iov_len = len; in mount_arg()
2913 ma->len++; in mount_arg()
2914 return (ma); in mount_arg()
2921 free_mntarg(struct mntarg *ma) in free_mntarg() argument
2925 while (!SLIST_EMPTY(&ma->list)) { in free_mntarg()
2926 maa = SLIST_FIRST(&ma->list); in free_mntarg()
2927 SLIST_REMOVE_HEAD(&ma->list, next); in free_mntarg()
2930 free(ma->v, M_MOUNT); in free_mntarg()
2931 free(ma, M_MOUNT); in free_mntarg()
2938 kernel_mount(struct mntarg *ma, uint64_t flags) in kernel_mount() argument
2943 KASSERT(ma != NULL, ("kernel_mount NULL ma")); in kernel_mount()
2944 KASSERT(ma->error != 0 || ma->v != NULL, ("kernel_mount NULL ma->v")); in kernel_mount()
2945 KASSERT(!(ma->len & 1), ("kernel_mount odd ma->len (%d)", ma->len)); in kernel_mount()
2947 error = ma->error; in kernel_mount()
2949 auio.uio_iov = ma->v; in kernel_mount()
2950 auio.uio_iovcnt = ma->len; in kernel_mount()
2954 free_mntarg(ma); in kernel_mount()
3169 atomic_add_int(&pr->pr_exportcnt, 1); in vfs_exjail_clone()