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