Lines Matching full:ldc
723 be_get_path(struct libbe_deep_clone *ldc, const char *dspath, char *result, int result_size) in be_get_path() argument
729 pos = strstr(dspath, ldc->lbh->root); in be_get_path()
736 snprintf(result, result_size, "%s/%s", ldc->lbh->root, ldc->bename); in be_get_path()
739 pos += strlen(ldc->lbh->root) + 1; in be_get_path()
757 struct libbe_deep_clone *ldc; in be_clone_cb() local
760 ldc = (struct libbe_deep_clone *)data; in be_clone_cb()
763 snprintf(snap_path, sizeof(snap_path), "%s@%s", dspath, ldc->snapname); in be_clone_cb()
766 if (be_get_path(ldc, dspath, be_path, sizeof(be_path)) != BE_ERR_SUCCESS) in be_clone_cb()
770 if (zfs_dataset_exists(ldc->lbh->lzh, be_path, ZFS_TYPE_DATASET)) in be_clone_cb()
774 if (!zfs_dataset_exists(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) in be_clone_cb()
778 zfs_open(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) == NULL) in be_clone_cb()
784 dccb.lbh = ldc->lbh; in be_clone_cb()
797 if (ldc->depth_limit == -1 || ldc->depth < ldc->depth_limit) { in be_clone_cb()
798 ldc->depth++; in be_clone_cb()
799 err = zfs_iter_filesystems(ds, be_clone_cb, ldc); in be_clone_cb()
800 ldc->depth--; in be_clone_cb()
819 struct libbe_deep_clone ldc; in be_clone() local
850 ldc.lbh = lbh; in be_clone()
851 ldc.bename = bename; in be_clone()
852 ldc.snapname = snapname; in be_clone()
853 ldc.depth = 0; in be_clone()
854 ldc.depth_limit = depth; in be_clone()
860 err = be_clone_cb(parent_hdl, &ldc); in be_clone()