summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/zfs/dmu_send.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c
index 13e77af6d..ea28dbc28 100644
--- a/module/zfs/dmu_send.c
+++ b/module/zfs/dmu_send.c
@@ -112,17 +112,6 @@ overflow_multiply(uint64_t a, uint64_t b, uint64_t *c)
return (B_TRUE);
}
-/*
- * Return B_TRUE and modifies *out to the span if the span is less than 2^64,
- * returns B_FALSE otherwise.
- */
-static inline boolean_t
-bp_span(uint32_t datablksz, uint8_t indblkshift, uint64_t level, uint64_t *out)
-{
- uint64_t spanb = bp_span_in_blocks(indblkshift, level);
- return (overflow_multiply(spanb, datablksz, out));
-}
-
struct send_thread_arg {
bqueue_t q;
dsl_dataset_t *ds; /* Dataset to traverse */
@@ -468,7 +457,7 @@ dump_redact(dmu_send_cookie_t *dscp, uint64_t object, uint64_t offset,
}
static int
-dump_write(dmu_send_cookie_t *dscp, dmu_object_type_t type, uint64_t object,
+dmu_dump_write(dmu_send_cookie_t *dscp, dmu_object_type_t type, uint64_t object,
uint64_t offset, int lsize, int psize, const blkptr_t *bp, void *data)
{
uint64_t payload_size;
@@ -1057,7 +1046,7 @@ do_dump(dmu_send_cookie_t *dscp, struct send_range *range)
while (srdp->datablksz > 0 && err == 0) {
int n = MIN(srdp->datablksz,
SPA_OLD_MAXBLOCKSIZE);
- err = dump_write(dscp, srdp->obj_type,
+ err = dmu_dump_write(dscp, srdp->obj_type,
range->object, offset, n, n, NULL, buf);
offset += n;
buf += n;
@@ -1076,8 +1065,8 @@ do_dump(dmu_send_cookie_t *dscp, struct send_range *range)
} else {
psize = BP_GET_PSIZE(bp);
}
- err = dump_write(dscp, srdp->obj_type, range->object,
- offset, srdp->datablksz, psize, bp,
+ err = dmu_dump_write(dscp, srdp->obj_type,
+ range->object, offset, srdp->datablksz, psize, bp,
(abuf == NULL ? NULL : abuf->b_data));
}
if (abuf != NULL)
@@ -1116,7 +1105,7 @@ do_dump(dmu_send_cookie_t *dscp, struct send_range *range)
return (err);
}
-struct send_range *
+static struct send_range *
range_alloc(enum type type, uint64_t object, uint64_t start_blkid,
uint64_t end_blkid, boolean_t eos)
{