dweeezil requested changes on this pull request. WIP port to ZoL.
> + } else if (rs->rs_end - range_tree_min(segs) > + *max_alloc) { + /* + * This additional segment would extend past + * max_alloc. Rather than splitting this + * segment, leave it for the next mapping. + */ + break; + } else { + seg_length = rs->rs_end - rs->rs_start; + } + } + + range_tree_add(segs, rs->rs_start, seg_length); + range_tree_remove(svr->svr_allocd_segs, + rs->rs_start, seg_length); This can empty `svr_allocd_segs` so we also need to break out of the loop above when `rs == NULL`. -- 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/627#pullrequestreview-119629279 ------------------------------------------ openzfs: openzfs-developer Permalink: https://openzfs.topicbox.com/groups/developer/discussions/Tcb3e8755498aa70a-Mef8131fa4422175399dbbf34 Delivery options: https://openzfs.topicbox.com/groups