Commit Graph

8 Commits (72e2a08a5c6d5f12be273e286e3355496e4a2f08)

Author SHA1 Message Date
Mark Fasheh 282dd33a43 btrfs-progs: Import interval tree implemenation from Linux v4.0-rc7.
While I had the chance, I compared the rbtre code in btrfs-progs to that of
the latest kernel.  No new bug fixes need importing, however rbtree.h and
rbtree_augmented.h get documentation updates

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-02-26 17:27:58 +01:00
David Sterba cafacda441 btrfs-progs: libbtrfs, make exported headers compatible with C++
Add externs and don't use a reserved keyword.

Signed-off-by: David Sterba <dsterba@suse.cz>
2014-11-03 23:50:50 +01:00
Josef Bacik 2ba12173d5 Btrfs-progs: update rbtree libs
While debugging a broken fs we were seeing hangs in the rb_erase loops.  The
rbtree was simple and wasn't corrupted so it appeared to be a bug in our rbtree
library.  Updating to the kernels latest rbtree code made the infinite loop go
away, so pull it back.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-10-14 10:39:40 +02:00
Josef Bacik cdb9e22e29 Btrfs-progs: break out rbtree util functions
These were added to deal with duplicated functionality within btrfs-progs, but
we specifically copied rbtree.c from the kernel, so move these functions out
into their own file.  This will make it easier to keep rbtree.c in sync.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2014-10-14 10:39:39 +02:00
Miao Xie d353002697 Btrfs-progs: introduce common insert/search/delete functions for rb-tree
In fact, the code of many rb-tree insert/search/delete functions is similar,
so we can abstract them, and implement common functions for rb-tree, and then
simplify them.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-07-03 14:06:54 -04:00
Mark Fasheh e5cb128a95 btrfs-progs: libify some parts of btrfs-progs
External software wanting to use the functionality provided by the btrfs
send ioctl has a hard time doing so without replicating tons of work. Of
particular interest are functions like btrfs_read_and_process_send_stream()
and subvol_uuid_search(). As that functionality requires a bit more than
just send-stream.c and send-utils.c we have to pull in some other parts of
the progs package.

This patch adds code to the Makefile and headers to create a library,
libbtrfs which the btrfs command now links to.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: David Sterba <dsterba@suse.cz>
2013-02-27 15:24:25 +01:00
Arvin Schnell 0c38ff3ca4 btrfs-progs: make libbtrfs usable from C++
Please find attached a patch to make the new libbtrfs usable from
C++ (at least for the parts snapper will likely need).

Signed-off-by: Arvin Schnell <aschnell@suse.de>
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
2013-02-19 11:15:30 +01:00
Chris Mason 08c66b7738 Stop using radix trees to record pending allocations 2007-10-15 16:25:04 -04:00