diff options
author | Matthew Macy <[email protected]> | 2019-10-13 19:25:19 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-10-13 19:25:19 -0700 |
commit | 177c79dfbee633b70e7d373ff83c6a2d47625a17 (patch) | |
tree | 55f32b04f3e0f393607df1bf4ea0f4749af0b130 /module | |
parent | 511fce6b1f939bd78687924aaa35dc83f8056ced (diff) |
Remove dead code and cleanup scoping in dmu_send.c
This addresses a number of problems with dmu_send.c:
* bp_span is unused which makes clang complain
* dump_write conflicts with FreeBSD's existing core dump code
* range_alloc is private to the file and not declared in any headers
causing clang to complain
Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9432
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/dmu_send.c | 21 |
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) { |