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
This commit is contained in:
наб
2022-02-28 14:50:28 +01:00
committed by Brian Behlendorf
parent 4ccbb23971
commit 63ce6dd988
8 changed files with 119 additions and 413 deletions
-2
View File
@@ -43,5 +43,3 @@ typedef struct smb_share_s {
struct smb_share_s *next;
} smb_share_t;
void libshare_smb_init(void);