Btrfs: generic data structure to build unique lists
authorArne Jansen <sensille@gmx.net>
Tue, 13 Sep 2011 10:29:12 +0000 (12:29 +0200)
committerJan Schmidt <list.btrfs@jan-o-sch.net>
Thu, 22 Dec 2011 15:22:24 +0000 (16:22 +0100)
commitda5c81356426c476112f2b59fe64bdb1b37f079d
tree1df740632805d7883490197aab904acaf0f7081e
parentf4a8e6563ea5366f563cb741a27fe90c5fa7f0fc
Btrfs: generic data structure to build unique lists

ulist is a generic data structures to hold a collection of unique u64
values. The only operations it supports is adding to the list and
enumerating it.

It is possible to store an auxiliary value along with the key. The
implementation is preliminary and can probably be sped up significantly.

It is used by btrfs_find_all_roots() quota to translate recursions into
iterative loops.

Signed-off-by: Arne Jansen <sensille@gmx.net>
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
fs/btrfs/Makefile
fs/btrfs/ulist.c [new file with mode: 0644]
fs/btrfs/ulist.h [new file with mode: 0644]