Lines Matching refs:zc

330 get_stats_ioctl(zfs_handle_t *zhp, zfs_cmd_t *zc)
334 (void) strlcpy(zc->zc_name, zhp->zfs_name, sizeof (zc->zc_name));
336 while (zfs_ioctl(hdl, ZFS_IOC_OBJSET_STATS, zc) != 0) {
338 zcmd_expand_dst_nvlist(hdl, zc);
353 zfs_cmd_t zc = {"\0"};
356 zcmd_alloc_dst_nvlist(hdl, &zc, 0);
358 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
360 while (zfs_ioctl(hdl, ZFS_IOC_OBJSET_RECVD_PROPS, &zc) != 0) {
362 zcmd_expand_dst_nvlist(hdl, &zc);
364 zcmd_free_nvlists(&zc);
369 err = zcmd_read_dst_nvlist(zhp->zfs_hdl, &zc, &recvdprops);
370 zcmd_free_nvlists(&zc);
381 put_stats_zhdl(zfs_handle_t *zhp, zfs_cmd_t *zc)
385 zhp->zfs_dmustats = zc->zc_objset_stats; /* structure assignment */
387 if (zcmd_read_dst_nvlist(zhp->zfs_hdl, zc, &allprops) != 0) {
413 zfs_cmd_t zc = {"\0"};
415 zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0);
417 if (get_stats_ioctl(zhp, &zc) != 0)
419 else if (put_stats_zhdl(zhp, &zc) != 0)
421 zcmd_free_nvlists(&zc);
439 make_dataset_handle_common(zfs_handle_t *zhp, zfs_cmd_t *zc)
441 if (put_stats_zhdl(zhp, zc) != 0)
480 zfs_cmd_t zc = {"\0"};
489 zcmd_alloc_dst_nvlist(hdl, &zc, 0);
491 if (get_stats_ioctl(zhp, &zc) == -1) {
492 zcmd_free_nvlists(&zc);
496 if (make_dataset_handle_common(zhp, &zc) == -1) {
500 zcmd_free_nvlists(&zc);
505 make_dataset_handle_zc(libzfs_handle_t *hdl, zfs_cmd_t *zc)
513 (void) strlcpy(zhp->zfs_name, zc->zc_name, sizeof (zhp->zfs_name));
514 if (make_dataset_handle_common(zhp, zc) == -1) {
522 make_dataset_simple_handle_zc(zfs_handle_t *pzhp, zfs_cmd_t *zc)
530 (void) strlcpy(zhp->zfs_name, zc->zc_name, sizeof (zhp->zfs_name));
535 if (zc->zc_objset_stats.dds_creation_txg != 0) {
537 zhp->zfs_dmustats = zc->zc_objset_stats;
539 if (get_stats_ioctl(zhp, zc) == -1) {
540 zcmd_free_nvlists(zc);
544 if (make_dataset_handle_common(zhp, zc) == -1) {
545 zcmd_free_nvlists(zc);
552 strchr(zc->zc_name, '@') != NULL)
1797 zfs_cmd_t zc = {"\0"};
1892 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
1894 zcmd_write_src_nvlist(hdl, &zc, nvl);
1895 zcmd_alloc_dst_nvlist(hdl, &zc, 0);
1897 ret = zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc);
1900 if (zc.zc_nvlist_dst_filled == B_FALSE) {
1907 if (zcmd_read_dst_nvlist(hdl, &zc, &errorprops) != 0)
1923 zcmd_free_nvlists(&zc);
1931 zcmd_write_src_nvlist(hdl, &zc, nvl);
1932 (void) zfs_ioctl(hdl, ZFS_IOC_SET_PROP, &zc);
1962 zcmd_free_nvlists(&zc);
1980 zfs_cmd_t zc = {"\0"};
1990 zc.zc_cookie = received;
2002 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
2003 (void) strlcpy(zc.zc_value, propname, sizeof (zc.zc_value));
2005 if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_INHERIT_PROP, &zc) != 0)
2031 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
2032 (void) strlcpy(zc.zc_value, propname, sizeof (zc.zc_value));
2058 if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_INHERIT_PROP, &zc) != 0) {
2166 zfs_cmd_t zc = {"\0"};
2310 zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0);
2312 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
2313 if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_OBJSET_ZPLPROPS, &zc)) {
2314 zcmd_free_nvlists(&zc);
2320 if (zcmd_read_dst_nvlist(zhp->zfs_hdl, &zc, &zplprops) != 0 ||
2323 zcmd_free_nvlists(&zc);
2327 zcmd_free_nvlists(&zc);
3289 zfs_cmd_t zc = {"\0"};
3291 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
3295 typep, zc.zc_value, sizeof (zc.zc_value), &zc.zc_guid);
3296 zc.zc_objset_type = *typep;
3300 err = zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_USERSPACE_ONE, &zc);
3304 *propvalue = zc.zc_cookie;
3359 zfs_cmd_t zc = {"\0"};
3362 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
3368 (void) strlcpy(zc.zc_value, snapname, sizeof (zc.zc_value));
3373 (void) strlcpy(zc.zc_value, zhp->zfs_name,
3374 sizeof (zc.zc_value));
3375 cp = strchr(zc.zc_value, '@');
3378 (void) strlcat(zc.zc_value, snapname - 1, sizeof (zc.zc_value));
3381 err = zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_SPACE_WRITTEN, &zc);
3385 *propvalue = zc.zc_cookie;
3506 zfs_cmd_t zc = {"\0"};
3526 (void) strlcpy(zc.zc_name, parent,
3527 MIN(sizeof (zc.zc_name), slash - parent + 1));
3528 if (zfs_ioctl(hdl, ZFS_IOC_OBJSET_STATS, &zc) != 0 &&
3531 "no such pool '%s'"), zc.zc_name);
3543 "no such pool '%s'"), zc.zc_name);
4491 zfs_cmd_t zc = {"\0"};
4633 zc.zc_objset_type = DMU_OST_ZVOL;
4635 zc.zc_objset_type = DMU_OST_ZFS;
4637 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
4638 (void) strlcpy(zc.zc_value, target, sizeof (zc.zc_value));
4640 zc.zc_cookie = !!flags.recursive;
4641 zc.zc_cookie |= (!!flags.nounmount) << 1;
4643 if ((ret = zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_RENAME, &zc)) != 0) {
4646 * be in zc.zc_name
4649 "cannot rename '%s'"), zc.zc_name);
4848 zfs_cmd_t zc = {"\0"};
4852 (void) strlcpy(zc.zc_name, dataset, sizeof (zc.zc_name));
4853 (void) strlcpy(zc.zc_value, path, sizeof (zc.zc_value));
4854 zc.zc_cookie = (uint64_t)cmd;
4866 (void) strlcpy(zc.zc_string, resource1, sizeof (zc.zc_string));
4879 zcmd_write_src_nvlist(hdl, &zc, nvlist);
4886 error = ioctl(hdl->libzfs_fd, ZFS_IOC_SMB_ACL, &zc);
4926 zfs_cmd_t zc = {"\0"};
4931 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
4933 zc.zc_objset_type = type;
4934 zc.zc_nvlist_dst = (uintptr_t)buf;
4939 zc.zc_nvlist_dst_size = sizeof (buf);
4940 if (zfs_ioctl(hdl, ZFS_IOC_USERSPACE_MANY, &zc) != 0) {
4954 "cannot get used/quota for %s"), zc.zc_name));
4956 if (zc.zc_nvlist_dst_size == 0)
4959 while (zc.zc_nvlist_dst_size > 0) {
4964 zc.zc_nvlist_dst_size -= sizeof (zfs_useracct_t);
5214 zfs_cmd_t zc = {"\0"};
5232 zc.zc_nvlist_dst_size = nvsz;
5233 zc.zc_nvlist_dst = (uintptr_t)nvbuf;
5235 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
5237 if (zfs_ioctl(hdl, ZFS_IOC_GET_FSACL, &zc) != 0) {
5240 zc.zc_name);
5244 nvsz = zc.zc_nvlist_dst_size;
5264 int rc = nvlist_unpack(nvbuf, zc.zc_nvlist_dst_size, nvl, 0);
5268 zc.zc_name);
5280 zfs_cmd_t zc = {"\0"};
5298 zc.zc_nvlist_src_size = nvsz;
5299 zc.zc_nvlist_src = (uintptr_t)nvbuf;
5300 zc.zc_perm_action = un;
5302 (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
5304 if (zfs_ioctl(hdl, ZFS_IOC_SET_FSACL, &zc) != 0) {
5307 zc.zc_name);