From 56e99634749568627f202dff263b5ac9c1546a9f Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 8 Sep 2021 13:57:50 +0200 Subject: [PATCH] btrfs-progs: libbtrfs: hide unused symbols, same version Another step to decommission libbtrfs in favor of libbtrfsutil. Remove all symbols that are not used by snapper, as this is the only known widely distributed tool that uses some of the librarized functionality, apart from the ioctls. The symbol versioning does not allow to remove once exported symbol so this is a dirty trick that works only in this situation. The unused symbols are not exported anymore BUT the library has the same version. This would be normally an ABI violation, but there's no change for snapper (build and runtime verified on version 0.9.0). The known used symbols are preserved. * btrfs_subvolid_resolve * btrfs_read_and_process_send_stream * subvol_uuid_search_init * subvol_uuid_search Issue: #218 Signed-off-by: David Sterba --- libbtrfs.sym | 78 ++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/libbtrfs.sym b/libbtrfs.sym index f7b5d87b..047a6eb1 100644 --- a/libbtrfs.sym +++ b/libbtrfs.sym @@ -1,57 +1,57 @@ LIBBTRFS_0.1 { global: /* ctree.h */ - btrfs_lookup_uuid_received_subvol_item; - btrfs_lookup_uuid_subvol_item; + /* btrfs_lookup_uuid_received_subvol_item; */ + /* btrfs_lookup_uuid_subvol_item; */ /* btrfs-list.h -- not distributed anymore */ - btrfs_get_subvol; - btrfs_list_get_path_rootid; + /* btrfs_get_subvol; */ + /* btrfs_list_get_path_rootid; */ /* radix-tree.h */ - radix_tree_delete; - radix_tree_gang_lookup; - radix_tree_gang_lookup_tag; - radix_tree_init; - radix_tree_insert; - radix_tree_lookup; - radix_tree_lookup_slot; - radix_tree_preload; - radix_tree_tag_clear; - radix_tree_tagged; - radix_tree_tag_get; - radix_tree_tag_set; + /* radix_tree_delete; */ + /* radix_tree_gang_lookup; */ + /* radix_tree_gang_lookup_tag; */ + /* radix_tree_init; */ + /* radix_tree_insert; */ + /* radix_tree_lookup; */ + /* radix_tree_lookup_slot; */ + /* radix_tree_preload; */ + /* radix_tree_tag_clear; */ + /* radix_tree_tagged; */ + /* radix_tree_tag_get; */ + /* radix_tree_tag_set; */ /* raid56.h -- not distributed anymore */ - raid56_recov; - raid5_gen_result; - raid6_gen_syndrome; - raid6_recov_data2; - raid6_recov_datap; + /* raid56_recov; */ + /* raid5_gen_result; */ + /* raid6_gen_syndrome; */ + /* raid6_recov_data2; */ + /* raid6_recov_datap; */ /* rbtree.h */ - rb_erase; - rb_first; - rb_first_postorder; - rb_insert_color; - rb_last; - rb_next; - rb_next_postorder; - rb_prev; - rb_replace_node; + /* rb_erase; */ + /* rb_first; */ + /* rb_first_postorder; */ + /* rb_insert_color; */ + /* rb_last; */ + /* rb_next; */ + /* rb_next_postorder; */ + /* rb_prev; */ + /* rb_replace_node; */ /* common/send-stream.h */ - btrfs_read_and_process_send_stream; + btrfs_read_and_process_send_stream; /* used */ /* common/send-utils.h */ - subvol_uuid_search; - subvol_uuid_search2; - subvol_uuid_search_add; - subvol_uuid_search_finit; - subvol_uuid_search_init; - btrfs_subvolid_resolve; - path_cat_out; - path_cat3_out; + subvol_uuid_search; /* used */ + /* subvol_uuid_search2; */ + /* subvol_uuid_search_add; */ + /* subvol_uuid_search_finit; */ + subvol_uuid_search_init; /* used */ + btrfs_subvolid_resolve; /* used */ + /* path_cat_out; */ + /* path_cat3_out; */ local: *; };