This reverts commit 83ab92512e.
The commit removed some old code that seemed to be unused but this
actually broke snapper. Revert the changes completely to the v6.3 ABI
level.
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1212217
Issue: #672
Signed-off-by: David Sterba <dsterba@suse.com>
Since kernel 3.12, any btrfs mounted by a kernel would have an UUID
tree created, to record all the UUID of its subvolumes.
Without UUID tree, libbtrfs send functionality has to go through all the
subvolumes seen so far, and record those subvolumes' UUID internally so
that libbtrfs send can locate a desired subvolume.
Since commit 194b90aa2c ("btrfs-progs: libbtrfs: remove declarations
without exports in send-utils") we're deprecating this old interface
already, meaning deprecated users won't be able to build its own
subvolume list already.
And we received no error report on this so far. So let's finish the
cleanup by removing the support for fs without an UUID tree.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Add a copy from v6.0.2 of kerncompat.h for libbtrfs to avoid accidental
build breakage as it's a public header and until now also shared with
the rest of btrfs-progs code.
Signed-off-by: David Sterba <dsterba@suse.com>
Let libbtrfs use own copy of the exported header files to avoid
potential breakage when syncing with kernel headers and also to remove
declarations that are not used by userspace. The send.h is frozen to
support protocol v1.
Signed-off-by: David Sterba <dsterba@suse.com>
The two files send-stream and send-utils contain the implementations of
the exported API, which was just for send stream. This was the original
idea. That libbtrfs contains another 40 files was a result of
unclean/missing library design and had to be done that way to resolve
the symbols due to dependencies.
That the same files have been used for both internal and public library
has prevented refactoring and cleanups and was always a risk of breaking
something.
Make separate copy for libbtrfs utils and allow any cleanups and
reduction of number of build objects. The API hasn't changed since the
beginning so there's low risk of missing some fixes from the internal
code.
Signed-off-by: David Sterba <dsterba@suse.com>