libbtrfs: reduce rbtree includes and ship only rbtree_types.h

None of the public API uses the rb-tree code besides definitions, so
change the includes in ctree.h and drop rbtree.h, this is used only by
internal implementation in send-utils.c. We could remove it in the
future but last time it was not possible due to 3rd party code depending
on it.

Removed in 83ab92512e ("libbtrfs: remove the support for fs without
uuid tree") and reverted again in f9b0da8e78 ("Revert "libbtrfs:
remove the support for fs without uuid tree"")

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2024-08-06 15:02:18 +02:00
parent 674b50c719
commit 03735ff372
3 changed files with 5 additions and 5 deletions

View File

@ -269,7 +269,7 @@ libbtrfs_objects = \
libbtrfs/send-utils.o \
libbtrfs/crc32c.o
libbtrfs_headers = libbtrfs/send-stream.h libbtrfs/send-utils.h libbtrfs/send.h kernel-lib/rbtree.h \
libbtrfs_headers = libbtrfs/send-stream.h libbtrfs/send-utils.h libbtrfs/send.h \
kernel-lib/rbtree_types.h libbtrfs/kerncompat.h \
libbtrfs/ioctl.h libbtrfs/ctree.h libbtrfs/version.h
libbtrfs_version = $(LIBBTRFS_MAJOR).$(LIBBTRFS_MINOR).$(LIBBTRFS_PATCHLEVEL)

View File

@ -23,11 +23,11 @@
#if BTRFS_FLAT_INCLUDES
#include "libbtrfs/kerncompat.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "libbtrfs/ioctl.h"
#else
#include <btrfs/kerncompat.h>
#include <btrfs/rbtree.h>
#include <btrfs/rbtree_types.h>
#include <btrfs/ioctl.h>
#endif /* BTRFS_FLAT_INCLUDES */

View File

@ -20,7 +20,7 @@
#include "libbtrfs/kerncompat.h"
#include "libbtrfs/version.h"
#include "libbtrfs/ioctl.h"
#include "kernel-lib/rbtree.h"
#include "kernel-lib/rbtree_types.h"
#include "kernel-shared/ctree.h"
#include "kernel-shared/send.h"
#include "common/send-stream.h"
@ -32,7 +32,7 @@
*/
#include "btrfs/kerncompat.h"
#include "btrfs/version.h"
#include "btrfs/rbtree.h"
#include "btrfs/rbtree_types.h"
#include "btrfs/ctree.h"
#include "btrfs/ioctl.h"
#include "btrfs/send.h"