Lines Matching refs:sdd
1098 hold_for_send(zfs_handle_t *zhp, send_dump_data_t *sdd)
1110 if (sdd->cleanup_fd == -1)
1123 error = zfs_hold(pzhp, thissnap, sdd->holdtag,
1124 B_FALSE, B_TRUE, B_TRUE, sdd->cleanup_fd,
1136 send_dump_data_t *sdd = arg;
1144 isfromsnap = (sdd->fromsnap != NULL &&
1145 strcmp(sdd->fromsnap, thissnap) == 0);
1147 if (!sdd->seenfrom && isfromsnap) {
1148 err = hold_for_send(zhp, sdd);
1150 sdd->seenfrom = B_TRUE;
1151 VERIFY(sizeof (sdd->prevsnap) > strlcpy(sdd->prevsnap,
1152 thissnap, sizeof (sdd->prevsnap)));
1153 sdd->prevsnap_obj = zfs_prop_get_int(zhp,
1162 if (sdd->seento || !sdd->seenfrom) {
1167 istosnap = (strcmp(sdd->tosnap, thissnap) == 0);
1169 sdd->seento = B_TRUE;
1171 if (!sdd->doall && !isfromsnap && !istosnap) {
1172 if (sdd->replicate) {
1179 nvlist_t *nvfs = fsavl_find(sdd->fsavl,
1197 if (exclude || (sdd->filter_cb != NULL &&
1198 sdd->filter_cb(zhp, sdd->filter_cb_arg) == B_FALSE)) {
1219 if (sdd->prevsnap_obj == 0 && sdd->replicate) {
1220 nvlist_t *nvfs = fsavl_find(sdd->fsavl,
1224 if (sdd->selfcont) {
1240 err = hold_for_send(zhp, sdd);
1249 if (sdd->verbose) {
1251 sdd->prevsnap, zhp->zfs_name);
1255 (sdd->prevsnap[0] == '\0' && (sdd->fromorigin || sdd->replicate));
1257 err = dump_ioctl(zhp, sdd->prevsnap, sdd->prevsnap_obj, fromorigin,
1258 sdd->outfd, sdd->debugnv);
1260 VERIFY(sizeof (sdd->prevsnap) > strlcpy(sdd->prevsnap, thissnap,
1261 sizeof (sdd->prevsnap)));
1262 sdd->prevsnap_obj = zfs_prop_get_int(zhp, ZFS_PROP_OBJSETID);
1271 send_dump_data_t *sdd = arg;
1276 zhp->zfs_name, sdd->tosnap);
1280 zhp->zfs_name, sdd->tosnap);
1281 sdd->err = B_TRUE;
1285 if (sdd->replicate && sdd->fromsnap) {
1294 zhp->zfs_name, sdd->fromsnap);
1301 sdd->seenfrom = sdd->seento = sdd->prevsnap[0] = 0;
1302 sdd->prevsnap_obj = 0;
1303 if (sdd->fromsnap == NULL || missingfrom)
1304 sdd->seenfrom = B_TRUE;
1307 if (!sdd->seenfrom) {
1311 zhp->zfs_name, sdd->tosnap,
1312 zhp->zfs_name, sdd->fromsnap);
1313 sdd->err = B_TRUE;
1314 } else if (!sdd->seento) {
1315 if (sdd->fromsnap) {
1320 zhp->zfs_name, sdd->tosnap,
1321 zhp->zfs_name, sdd->fromsnap);
1325 zhp->zfs_name, sdd->tosnap);
1327 sdd->err = B_TRUE;
1336 send_dump_data_t *sdd = arg;
1340 if (!sdd->replicate)
1341 return (dump_filesystem(rzhp, sdd));
1344 for (fspair = nvlist_next_nvpair(sdd->fss, NULL); fspair;
1345 fspair = nvlist_next_nvpair(sdd->fss, fspair)) {
1356 origin_nv = fsavl_find(sdd->fsavl, ZFS_TYPE_SNAPSHOT,
1372 if (nvlist_lookup_uint64(snaps, sdd->tosnap, &origin_guid) !=
1387 for (fspair = nvlist_next_nvpair(sdd->fss, NULL); fspair;
1388 fspair = nvlist_next_nvpair(sdd->fss, fspair)) {
1403 nvlist_t *origin_nv = fsavl_find(sdd->fsavl,
1420 err = dump_filesystem(zhp, sdd);
1456 send_dump_data_t sdd = { 0 };
1610 sdd.fromsnap = fromsnap;
1611 sdd.tosnap = tosnap;
1613 sdd.outfd = pipefd[0];
1615 sdd.outfd = outfd;
1616 sdd.replicate = flags.replicate;
1617 sdd.doall = flags.doall;
1618 sdd.fromorigin = flags.fromorigin;
1619 sdd.fss = fss;
1620 sdd.fsavl = fsavl;
1621 sdd.verbose = flags.verbose;
1622 sdd.filter_cb = filter_func;
1623 sdd.filter_cb_arg = cb_arg;
1624 sdd.selfcont = flags.selfcont;
1626 sdd.debugnv = *debugnvp;
1629 (void) snprintf(sdd.holdtag, sizeof (sdd.holdtag),
1631 sdd.cleanup_fd = open(ZFS_DEV, O_RDWR|O_EXCL);
1632 if (sdd.cleanup_fd < 0) {
1637 sdd.cleanup_fd = -1;
1639 err = dump_filesystems(zhp, &sdd);
1648 if (sdd.cleanup_fd != -1) {
1649 VERIFY(0 == close(sdd.cleanup_fd));
1650 sdd.cleanup_fd = -1;
1667 return (err || sdd.err);
1673 if (sdd.cleanup_fd != -1)
1674 VERIFY(0 == close(sdd.cleanup_fd));