Lines Matching defs:zc
136 devzvol_handle_ioctl(int cmd, zfs_cmd_t *zc, size_t *alloc_size)
154 cookie = zc->zc_cookie;
156 zc->zc_nvlist_dst = (uint64_t)(intptr_t)kmem_alloc(size,
158 zc->zc_nvlist_dst_size = size;
159 rc = ldi_ioctl(devzvol_lh, cmd, (intptr_t)zc, FKIOCTL, kcred,
163 newsize = zc->zc_nvlist_dst_size;
165 kmem_free((void *)(uintptr_t)zc->zc_nvlist_dst, size);
167 zc->zc_cookie = cookie;
171 kmem_free((void *)(uintptr_t)zc->zc_nvlist_dst, size);
184 zfs_cmd_t *zc;
195 zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP);
196 (void) strlcpy(zc->zc_name, dsname, MAXPATHLEN);
200 zc->zc_nvlist_src = (uintptr_t)fnvlist_pack(nvl, &nvsz);
201 zc->zc_nvlist_src_size = nvsz;
205 ZFS_IOC_OBJSET_STATS, zc, NULL);
208 zc->zc_objset_stats.dds_type;
209 fnvlist_pack_free((char *)(uintptr_t)zc->zc_nvlist_src, nvsz);
210 kmem_free(zc, sizeof (zfs_cmd_t));
379 zfs_cmd_t *zc;
383 zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP);
385 zc->zc_cookie = devzvol_gen;
387 rc = devzvol_handle_ioctl(ZFS_IOC_POOL_CONFIGS, zc, &size);
391 ASSERT(devzvol_gen != zc->zc_cookie);
392 devzvol_gen = zc->zc_cookie;
396 devzvol_zclist = zc->zc_nvlist_dst;
408 kmem_free((void *)(uintptr_t)zc->zc_nvlist_dst,
417 kmem_free(zc, sizeof (zfs_cmd_t));
850 zfs_cmd_t *zc;
854 zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP);
855 (void) strcpy(zc->zc_name, name);
857 while ((rc = devzvol_handle_ioctl(arg, zc, B_FALSE)) == 0) {
861 sdcmn_err13((" name %s", zc->zc_name));
862 if (strchr(zc->zc_name, '$') || strchr(zc->zc_name, '%'))
864 ptr = strrchr(zc->zc_name, '/') + 1;
879 zc->zc_objset_stats.dds_type == DMU_OST_ZVOL &&
881 sdev_iter_snapshots(dvp, zc->zc_name);
883 (void) strcpy(zc->zc_name, name);
885 kmem_free(zc, sizeof (zfs_cmd_t));