Thread (21 messages) 21 messages, 3 authors, 3d ago

Re: [PATCH 3/9] lib: Add a "tagset" data structure

From: Hannes Reinecke <hare@suse.de>
Date: 2026-06-09 06:45:47
Also in: linux-nfs, linux-nvme

On 6/5/26 19:34, Chuck Lever wrote:
From: Chuck Lever <chuck.lever@oracle.com>

Access control mechanisms sometimes need to match metadata tags
between a session and a resource. A tagset provides efficient
membership testing and set intersection operations for this purpose.

The implementation uses a sorted array of string pointers. Unlike
hash tables, sorted arrays support efficient intersection without
needing to iterate one set and probe the other. Unlike rbtrees,
they require no per-element node allocation, minimizing memory
overhead for small sets typical of resource tagging.
[ .. ]


Isn't this overcomplicating matters?
In the end, this a list of strings.
Wouldn't a simple rbtree holding the strings be sufficient?
(And quicker to lookup :-)

Also see my comment in the previous patch. I really would make
'tags' a nested attribute, and then parsing the 'tags' attribute
would be simple iteration over the tags.

(And don't name it tagset. That will be confusing the hell of out
of any storage folks, where a tagset is something completely
different.)

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help