Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
@behlendorf made this cool list of stuff we should do, and I started looking into one of them, and now libuutil is gone. Hurrah!
Description
Mostly a mechanical conversion. The
uu_APIs are rather more complex, but we don't seem to use any of the extra features to any great extent. Pools are trivially removed and "walk" iterators are trivially replaced with loops.There's two changes of note for AVL comparison functions:
uu_avlcomparison functions are more lenient on their returns than standard AVLs, which will only accept -1, 0 or 1. AddingTREE_ISIGNaround a fewstrcmp()calls takes care of it.uu_avlcomparison functions can take an argument, passed in throughuu_avl_find(). This is used to set the sort order forzfs_iter(). Since we can't pass in an argument any more, I've worked around it by adding the argument to the node. It's a little more memory but the AVL is created, used and destroyed within the same function, so it should be pretty low overhead.We only used
uu_listin one place, inzfs_do_userspace(). I've swapped in the regular lists, however I'm not even sure if what's there is even doing anything. It does a thing to drain the AVL onto a list, then refill it in "sorted" order, but since the AVL wasn't recreated and the list didn't have a comparator, I'm not sure that it even did anything. I might be missing something subtle, so I've left it there.Removing packaging is just searching out
libuutiland removing it everywhere it's mentioned, but I do not know how packages are constructed very well, so this may need more work.How Has This Been Tested?
Compiles on Linux and FreeBSD. ZTS passed. Package targets appear to produce files, but not tested.
Types of changes
Checklist:
Signed-off-by.