HomeFreeBSD

libshare: use AVL tree with static data, pass all data in arguments

Description

libshare: use AVL tree with static data, pass all data in arguments

This makes it so we don't leak a consistent 64 bytes anymore,
makes the searches simpler and faster, removes /all allocations/
from the driver (quite trivially, since they were absolutely needless),
and makes libshare thread-safe (except, maybe, linux/smb, but that only
does pointer-width loads/stores so it's also mostly fine, except for
leaking smb_shares)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13165

Details

Provenance
наб <nabijaczleweli@nabijaczleweli.xyz>Authored on Feb 28 2022, 1:50 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 12 2022, 4:26 PM
Parents
rG4ccbb23971f6: libshare: interface: {=> const} char *
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG63ce6dd9886a: libshare: use AVL tree with static data, pass all data in arguments (authored by наб <nabijaczleweli@nabijaczleweli.xyz>).May 12 2022, 4:26 PM