Lines Matching refs:ldc

462 be_get_path(struct libbe_deep_clone *ldc, const char *dspath, char *result, int result_size)  in be_get_path()  argument
468 pos = strstr(dspath, ldc->lbh->root); in be_get_path()
475 snprintf(result, result_size, "%s/%s", ldc->lbh->root, ldc->bename); in be_get_path()
478 pos += strlen(ldc->lbh->root) + 1; in be_get_path()
496 struct libbe_deep_clone *ldc; in be_clone_cb() local
499 ldc = (struct libbe_deep_clone *)data; in be_clone_cb()
502 snprintf(snap_path, sizeof(snap_path), "%s@%s", dspath, ldc->snapname); in be_clone_cb()
505 if (be_get_path(ldc, dspath, be_path, sizeof(be_path)) != BE_ERR_SUCCESS) in be_clone_cb()
506 return (set_error(ldc->lbh, BE_ERR_UNKNOWN)); in be_clone_cb()
509 if (zfs_dataset_exists(ldc->lbh->lzh, be_path, ZFS_TYPE_DATASET)) in be_clone_cb()
510 return (set_error(ldc->lbh, BE_ERR_EXISTS)); in be_clone_cb()
513 if (!zfs_dataset_exists(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) in be_clone_cb()
517 zfs_open(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) == NULL) in be_clone_cb()
518 return (set_error(ldc->lbh, BE_ERR_ZFSOPEN)); in be_clone_cb()
523 dccb.lbh = ldc->lbh; in be_clone_cb()
531 return (set_error(ldc->lbh, BE_ERR_ZFSCLONE)); in be_clone_cb()
536 if (ldc->depth_limit == -1 || ldc->depth < ldc->depth_limit) { in be_clone_cb()
537 ldc->depth++; in be_clone_cb()
538 err = zfs_iter_filesystems(ds, be_clone_cb, ldc); in be_clone_cb()
539 ldc->depth--; in be_clone_cb()
542 return (set_error(ldc->lbh, err)); in be_clone_cb()
558 struct libbe_deep_clone ldc; in be_clone() local
589 ldc.lbh = lbh; in be_clone()
590 ldc.bename = bename; in be_clone()
591 ldc.snapname = snapname; in be_clone()
592 ldc.depth = 0; in be_clone()
593 ldc.depth_limit = depth; in be_clone()
599 err = be_clone_cb(parent_hdl, &ldc); in be_clone()