Lines Matching refs:da
54 write_record(dmu_diffarg_t *da) in write_record() argument
59 if (da->da_ddr.ddr_type == DDR_NONE) { in write_record()
60 da->da_err = 0; in write_record()
64 fp = da->da_fp; in write_record()
65 da->da_err = zfs_file_write(fp, (caddr_t)&da->da_ddr, in write_record()
66 sizeof (da->da_ddr), &resid); in write_record()
67 *da->da_offp += sizeof (da->da_ddr); in write_record()
68 return (da->da_err); in write_record()
72 report_free_dnode_range(dmu_diffarg_t *da, uint64_t first, uint64_t last) in report_free_dnode_range() argument
75 if (da->da_ddr.ddr_type != DDR_FREE || in report_free_dnode_range()
76 first != da->da_ddr.ddr_last + 1) { in report_free_dnode_range()
77 if (write_record(da) != 0) in report_free_dnode_range()
78 return (da->da_err); in report_free_dnode_range()
79 da->da_ddr.ddr_type = DDR_FREE; in report_free_dnode_range()
80 da->da_ddr.ddr_first = first; in report_free_dnode_range()
81 da->da_ddr.ddr_last = last; in report_free_dnode_range()
84 da->da_ddr.ddr_last = last; in report_free_dnode_range()
89 report_dnode(dmu_diffarg_t *da, uint64_t object, dnode_phys_t *dnp) in report_dnode() argument
93 return (report_free_dnode_range(da, object, object)); in report_dnode()
95 if (da->da_ddr.ddr_type != DDR_INUSE || in report_dnode()
96 object != da->da_ddr.ddr_last + 1) { in report_dnode()
97 if (write_record(da) != 0) in report_dnode()
98 return (da->da_err); in report_dnode()
99 da->da_ddr.ddr_type = DDR_INUSE; in report_dnode()
100 da->da_ddr.ddr_first = da->da_ddr.ddr_last = object; in report_dnode()
103 da->da_ddr.ddr_last = object; in report_dnode()
116 dmu_diffarg_t *da = arg; in diff_cb() local
130 err = report_free_dnode_range(da, dnobj, in diff_cb()
153 err = report_dnode(da, dnobj, blk+i); in diff_cb()
170 dmu_diffarg_t da; in dmu_diff() local
211 da.da_fp = fp; in dmu_diff()
212 da.da_offp = offp; in dmu_diff()
213 da.da_ddr.ddr_type = DDR_NONE; in dmu_diff()
214 da.da_ddr.ddr_first = da.da_ddr.ddr_last = 0; in dmu_diff()
215 da.da_err = 0; in dmu_diff()
227 diff_cb, &da); in dmu_diff()
230 da.da_err = error; in dmu_diff()
233 (void) write_record(&da); in dmu_diff()
239 return (da.da_err); in dmu_diff()