summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ulist.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2012-05-31 22:50:28 +0200
committerChris Mason <chris.mason@oracle.com>2012-05-31 22:49:53 +0200
commit1e20932a23578bb1ec59107843574e259b96193f (patch)
tree844ae54293c4414fc4c232a36d0e4d4939dc35aa /fs/btrfs/ulist.h
parentMerge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/jos... (diff)
parentBtrfs: fix tree mod log rewinded level and rewinding of moved keys (diff)
downloadlinux-1e20932a23578bb1ec59107843574e259b96193f.tar.xz
linux-1e20932a23578bb1ec59107843574e259b96193f.zip
Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into for-linus
Conflicts: fs/btrfs/ulist.h Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ulist.h')
-rw-r--r--fs/btrfs/ulist.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/btrfs/ulist.h b/fs/btrfs/ulist.h
index 6568c3527732..21bdc8ec8130 100644
--- a/fs/btrfs/ulist.h
+++ b/fs/btrfs/ulist.h
@@ -24,6 +24,10 @@
*/
#define ULIST_SIZE 16
+struct ulist_iterator {
+ int i;
+};
+
/*
* element of the list
*/
@@ -61,7 +65,13 @@ void ulist_fini(struct ulist *ulist);
void ulist_reinit(struct ulist *ulist);
struct ulist *ulist_alloc(gfp_t gfp_mask);
void ulist_free(struct ulist *ulist);
-int ulist_add(struct ulist *ulist, u64 val, unsigned long aux, gfp_t gfp_mask);
-struct ulist_node *ulist_next(struct ulist *ulist, struct ulist_node *prev);
+int ulist_add(struct ulist *ulist, u64 val, unsigned long aux,
+ gfp_t gfp_mask);
+int ulist_add_merge(struct ulist *ulist, u64 val, unsigned long aux,
+ unsigned long *old_aux, gfp_t gfp_mask);
+struct ulist_node *ulist_next(struct ulist *ulist,
+ struct ulist_iterator *uiter);
+
+#define ULIST_ITER_INIT(uiter) ((uiter)->i = 0)
#endif