dweeezil commented on this pull request.

Note regarding WIP port to ZoL.

-       range_tree_remove(svr->svr_allocd_segs, offset, length);
+       /*
+        * Determine how big of a chunk to copy.  We can allocate up
+        * to max_alloc bytes, and we can span up to vdev_removal_max_span
+        * bytes of unallocated space at a time.  "segs" will track the
+        * allocated segments that we are copying.  We may also be copying
+        * free segments (of up to vdev_removal_max_span bytes).
+        */
+       range_tree_t *segs = range_tree_create(NULL, NULL);
+       for (;;) {
+               range_seg_t *rs = avl_first(&svr->svr_allocd_segs->rt_root);

Testing my WIP port to ZoL, I'm seeing "rs == NULL".  I've put in an ASSERT 
below the `range_tree_is_empty()` above to make sure `avl_first()` is not null 
when empty but somehow, as part of the loop, `avl_first()` is able to return 
NULL.  I'm trying to audit all the uses of `svr_allocd_segs` to make sure 
they're all being done under the `svr_lock`.

Mentioning @behlendorf so he knows I'm working on porting this.

-- 
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-119628895
------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/discussions/Tcb3e8755498aa70a-M16532fedf11fded2a4aacc7c
Delivery options: https://openzfs.topicbox.com/groups

Reply via email to