ahrens commented on this pull request.
> @@ -3022,6 +3046,32 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, vnode_t *vp,
> offset_t *voffp,
}
mutex_exit(&rwa.mutex);
+ /*
+ * If we are receiving a full stream as a clone, all object IDs which
+ * are greater than the maximum ID referenced in the stream are
+ * by definition unused and must be freed.
+ */
+ if (drc->drc_clone && drc->drc_drrb->drr_fromguid == 0) {
+ uint64_t obj = rwa.max_object + 1;
I wonder if it's possible to resume a receive after the last object, and we
only get the END record. In that case, max_object would be zero. If that's
true then we could fix it by only doing this `if max_object != 0`.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/631#pullrequestreview-114886463
------------------------------------------
openzfs: openzfs-developer
Permalink:
https://openzfs.topicbox.com/groups/developer/discussions/T77378623c4494e13-M5478af071b83409ee8ca0b9f
Delivery options: https://openzfs.topicbox.com/groups