asomers commented on this pull request.


>               c = vd->vdev_children;
 
                mm = kmem_zalloc(offsetof(mirror_map_t, mm_child[c]), KM_SLEEP);
                mm->mm_children = c;
-               mm->mm_replacing = (vd->vdev_ops == &vdev_replacing_ops ||
+               /*
+                * If we are resilvering, then we should handle scrub reads
+                * differently; we shouldn't issue them to the resilvering
+                * device because it might not have those blocks.
+                *
+                * We are resilvering iff:
+                * 1) We are a replacing vdev (ie our name is "replacing-1" or
+                *    "spare-1" or something like that), and
+                * 2) The pool is currently being resilvered.
+                *
+                * We cannot simply check vd->vdev_resilvering, because that

I guess a lot changes in 3.5 years.  I just did a little experiment, and the 
replacement `vdev_resilver_txg` is also not set in this case.  I'll update the 
comment.

-- 
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/422#discussion_r135370900
------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/Te100c9e22da2b1d8-M4c8688f2c95371d92fa84a83
Powered by Topicbox: https://topicbox.com

Reply via email to