Lines Matching full:ldc
735 be_get_path(struct libbe_deep_clone *ldc, const char *dspath, char *result, int result_size) in be_get_path() argument
741 pos = strstr(dspath, ldc->lbh->root); in be_get_path()
748 snprintf(result, result_size, "%s/%s", ldc->lbh->root, ldc->bename); in be_get_path()
751 pos += strlen(ldc->lbh->root) + 1; in be_get_path()
769 struct libbe_deep_clone *ldc; in be_clone_cb() local
772 ldc = (struct libbe_deep_clone *)data; in be_clone_cb()
775 snprintf(snap_path, sizeof(snap_path), "%s@%s", dspath, ldc->snapname); in be_clone_cb()
778 if (be_get_path(ldc, dspath, be_path, sizeof(be_path)) != BE_ERR_SUCCESS) in be_clone_cb()
782 if (zfs_dataset_exists(ldc->lbh->lzh, be_path, ZFS_TYPE_DATASET)) in be_clone_cb()
786 if (!zfs_dataset_exists(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) in be_clone_cb()
790 zfs_open(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) == NULL) in be_clone_cb()
796 dccb.lbh = ldc->lbh; in be_clone_cb()
809 if (ldc->depth_limit == -1 || ldc->depth < ldc->depth_limit) { in be_clone_cb()
810 ldc->depth++; in be_clone_cb()
811 err = zfs_iter_filesystems(ds, be_clone_cb, ldc); in be_clone_cb()
812 ldc->depth--; in be_clone_cb()
831 struct libbe_deep_clone ldc; in be_clone() local
862 ldc.lbh = lbh; in be_clone()
863 ldc.bename = bename; in be_clone()
864 ldc.snapname = snapname; in be_clone()
865 ldc.depth = 0; in be_clone()
866 ldc.depth_limit = depth; in be_clone()
872 err = be_clone_cb(parent_hdl, &ldc); in be_clone()