From 5dc8b7365ff1932bfd969bc71cd49db9b3a6dc87 Mon Sep 17 00:00:00 2001 From: Max Grossman Date: Wed, 8 Apr 2015 11:37:13 -0700 Subject: Illumos 5765 - add support for estimating send stream size with lzc_send_space when source is a bookmark 5765 add support for estimating send stream size with lzc_send_space when source is a bookmark Reviewed by: Matthew Ahrens Reviewed by: Christopher Siden Reviewed by: Steven Hartland Reviewed by: Bayard Bell Approved by: Albert Lee References: https://www.illumos.org/issues/5765 https://github.com/illumos/illumos-gate/commit/643da460 Porting notes: * Unused variable 'recordsize' in dmu_send_estimate() dropped Ported-by: DHE Signed-off-by: Brian Behlendorf Closes #3397 --- include/sys/dmu_send.h | 4 +++- include/sys/dsl_dataset.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'include/sys') diff --git a/include/sys/dmu_send.h b/include/sys/dmu_send.h index 3a8dc89ab..2442a1f8a 100644 --- a/include/sys/dmu_send.h +++ b/include/sys/dmu_send.h @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -42,6 +42,8 @@ int dmu_send(const char *tosnap, const char *fromsnap, int outfd, struct vnode *vp, offset_t *off); int dmu_send_estimate(struct dsl_dataset *ds, struct dsl_dataset *fromds, uint64_t *sizep); +int dmu_send_estimate_from_txg(struct dsl_dataset *ds, uint64_t fromtxg, + uint64_t *sizep); int dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap, boolean_t embedok, boolean_t large_block_ok, int outfd, struct vnode *vp, offset_t *off); diff --git a/include/sys/dsl_dataset.h b/include/sys/dsl_dataset.h index 1985ce824..d6da5dcfd 100644 --- a/include/sys/dsl_dataset.h +++ b/include/sys/dsl_dataset.h @@ -201,6 +201,9 @@ dsl_dataset_phys(dsl_dataset_t *ds) */ #define MAX_TAG_PREFIX_LEN 17 +#define dsl_dataset_is_snapshot(ds) \ + (dsl_dataset_phys(ds)->ds_num_children != 0) + #define DS_UNIQUE_IS_ACCURATE(ds) \ ((dsl_dataset_phys(ds)->ds_flags & DS_FLAG_UNIQUE_ACCURATE) != 0) -- cgit v1.2.3