1b66810b introduced serveral changes which improved the reliability
of zfs sends when large dnodes were involved. However, these fixes
required adding a few calls to txg_wait_synced() in the DRR_OBJECT
handling code. Although most of them are currently necessary, this
patch allows the code to continue without waiting in some cases
where it doesn't have to.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7197
* these objects before we attempt to allocate the new dnode.
*/
if (drro->drr_dn_slots > 1) {
+ boolean_t need_sync = B_FALSE;
+
for (uint64_t slot = drro->drr_object + 1;
slot < drro->drr_object + drro->drr_dn_slots;
slot++) {
if (err != 0)
return (err);
+
+ need_sync = B_TRUE;
}
- txg_wait_synced(dmu_objset_pool(rwa->os), 0);
+ if (need_sync)
+ txg_wait_synced(dmu_objset_pool(rwa->os), 0);
}
tx = dmu_tx_create(rwa->os);