Lines Matching defs:group
404 * group. If the group doesn't exist, create it first, making sure it
405 * is marked as a ZFS group.
407 * Note that all ZFS shares are in a subgroup of the top level group
414 sa_group_t group;
419 * we check to see if the "zfs" group exists. Since this
420 * should be the top level group, we don't want the
421 * parent. This is to make sure the zfs group has been created
424 group = sa_get_group(handle, groupname);
425 if (group == NULL) {
426 group = sa_create_group(handle, groupname, &ret);
428 /* make sure this is flagged as a ZFS group */
429 if (group != NULL)
430 ret = sa_set_group_attr(group, "zfs", "true");
432 if (group != NULL) {
434 optionset = sa_get_optionset(group, proto);
436 optionset = sa_create_optionset(group, proto);
441 return (group);
447 * ZFS shares will be in a subgroup of the "zfs" master group. This
450 * that. The "zfs" group will exist before we get here, but we make
460 sa_group_t group = NULL;
465 /* start with the top-level "zfs" group */
469 for (group = sa_get_sub_group(zfs); group != NULL;
470 group = sa_get_next_group(group)) {
471 name = sa_get_group_attr(group, "name");
473 /* have the group so break out of here */
481 if (group == NULL) {
483 * Need to create the sub-group since it doesn't exist
485 group = _sa_create_zfs_group(zfs, groupname);
486 if (group == NULL) {
490 set_node_attr(group, "zfs", "true");
496 *err = sa_parse_legacy_options(group, options,
499 if (sa_get_optionset(group, proto) == NULL)
500 (void) sa_create_optionset(group, proto);
504 * the parent group so that it contains
515 return (group);
548 sa_group_t group;
553 * Need to find the "real" parent sub-group. It may not be
558 group = find_or_create_zfs_subgroup(handle, sourcestr, proto,
560 if (group != NULL) {
567 share = _sa_add_share(group, mountpoint,
585 if (sa_get_optionset(group, proto) == NULL)
586 (void) sa_create_optionset(group, proto);
608 * zfs_notinherited(group, share, mountpoint, shareopts, proto, dataset,
611 * handle case where this is the top of a sub-group in ZFS. Pulled out
617 zfs_notinherited(sa_group_t group, sa_share_t share, char *mountpoint,
624 set_node_attr(group, "zfs", "true");
626 share = _sa_add_share(group, mountpoint, SA_SHARE_TRANSIENT,
672 * Print group create error, but only once. If err is 0 do the
695 sa_zfs_process_share(sa_handle_t handle, sa_group_t group, sa_share_t share,
705 group = find_or_create_zfs_subgroup(handle, dataset, proto,
707 if (group == NULL) {
717 set_node_attr(group, "zfs", "true");
721 err = zfs_notinherited(group, share, mountpoint, shareopts,
731 * shared. Find or create the appropriate group/sub-group to contain
734 * All shares are in a sub-group that will hold the properties. This
739 * a sub-group must be formed at the lower level for both
833 * parent group and reshare it under ZFS.
846 * If smb or nfs is set, we have a new sub-group.
848 * place on an existing sub-group. If both are set,
849 * the existing sub-group is the closest up the tree.
878 * levels. The closest sub-group is the one we
917 * sa_zfs_set_sharenfs(group, path, on)
920 * to the properties on the group or "on" if no properties are
925 sa_zfs_set_sharenfs(sa_group_t group, char *path, int on)
938 opts = sa_proto_legacy_format("nfs", group, 1);
945 impl_handle = (sa_handle_impl_t)sa_find_group_handle(group);
1023 * sa_zfs_set_sharesmb(group, path, on)
1026 * to the properties on the group or "on" if no properties are
1031 sa_zfs_set_sharesmb(sa_group_t group, char *path, int on)
1038 if (sa_get_optionset(group, "smb") == NULL)
1051 share = sa_get_share(group, NULL);
1062 impl_handle = (sa_handle_impl_t)sa_find_group_handle(group);
1090 * sa_zfs_update(group)
1096 sa_zfs_update(sa_group_t group)
1106 if (sa_is_share(group))
1107 parent = sa_get_parent_group(group);
1109 parent = group;
1125 if (sa_is_share(group)) {
1126 path = sa_get_share_attr((sa_share_t)group,
1132 group);
1142 dataset = sa_get_group_attr(group, "name");
1148 group, 1);
1202 * sa_group_is_zfs(group)
1204 * Given the group, determine if the zfs attribute is set.
1208 sa_group_is_zfs(sa_group_t group)
1213 zfs = sa_get_group_attr(group, "zfs");
1268 sa_group_t group;
1279 if ((group = sa_get_parent_group(share)) == NULL) {
1282 if ((sahandle = sa_find_group_handle(group)) == NULL) {