Lines Matching defs:zd
126 zone_dataset_t *zd;
128 list_for_each_entry(zd, &zds->zds_datasets, zd_list) {
129 if (zd->zd_dsnamelen != dsnamelen)
131 if (strncmp(zd->zd_dsname, dataset, dsnamelen) == 0)
132 return (zd);
170 zone_dataset_t *zd;
195 zd = zone_dataset_lookup(zds, dataset, dsnamelen);
196 if (zd != NULL) {
202 zd = kmem_alloc(sizeof (zone_dataset_t) + dsnamelen + 1, KM_SLEEP);
203 zd->zd_dsnamelen = dsnamelen;
204 strlcpy(zd->zd_dsname, dataset, dsnamelen + 1);
205 INIT_LIST_HEAD(&zd->zd_list);
206 list_add_tail(&zd->zd_list, &zds->zds_datasets);
222 zone_dataset_t *zd;
236 zd = zone_dataset_lookup(zds, dataset, dsnamelen);
237 if (zds == NULL || zd == NULL) {
242 list_del(&zd->zd_list);
243 kmem_free(zd, sizeof (*zd) + zd->zd_dsnamelen + 1);
282 zone_dataset_t *zd;
305 list_for_each_entry(zd, &zds->zds_datasets, zd_list) {
306 zd_len = strlen(zd->zd_dsname);
313 visible = memcmp(zd->zd_dsname, dataset,
315 zd->zd_dsname[dsnamelen] == '/';
324 visible = memcmp(zd->zd_dsname, dataset, zd_len) == 0;
336 visible = memcmp(zd->zd_dsname, dataset,
400 zone_dataset_t *zd;
411 zd = list_entry(zds->zds_datasets.next,
413 list_del(&zd->zd_list);
414 kmem_free(zd, sizeof (*zd) + zd->zd_dsnamelen + 1);