New scrub

One of the annoying things at zfs was the restart of the scrub when you take an snapshot while the scrub runs. This issue was fixed some builds ago, but Matthew Ahrens published an interesting article about the fixed code yesterday: New Scrub Code

We have solved a nasty bug by rewriting the scrub code to do its work in syncing context, visiting datasets in order from oldest to newest. I had to introduce a few new on-disk data structures so we can quickly determine this order. And there are a few operations that the scrub code needs to know about and account for. This work lays a bunch of infrastructure that will be used by the upcoming device removal feature. Stay tuned!