code from btrfs-tools/sys-linux (which happens to be same/very similar to each other) 1) btrfs_sb_offset() - same as btrfs-tools::btrfs_sb_offset() 2) bin_search() - same as generic_bin_search() in btrfs-tools (or bin_search() in btrfs patch for grub-legacy) 3) btrfs_chunk_item_size() - same as btrfs-tools::btrfs_chunk_item_size() 4) btrfs_read_sys_chunk_array() - based on btrfs-tools::btrfs_read_sys_array() - (single device support), except that insert_map() is used to keep the mappings in an array instead of inserting in tree. 5) btrfs_read_chunk_tree() - based on btrfs-tools::btrfs_read_chunk_tree() (single device support), except that insert_map() is used to keep the mappings in an array instead of inserting in tree. code from syslinux: 1) logical_physical() 2) btrfs_comp_keys_type() 4) search_tree() 5) next_leaf() 6) insert_map() from the linux kernel: 1) btrfs_name_hash() - same as linux-2.6::btrfs_name_hash() 2) btrfs_comp_keys() - same as linux-2.6::btrfs_comp_cpu_keys() what is different: 1) btrfs_get_fs_tree() - name is same as in syslinux, but the implementation is different 2) cache implementation() 3) btrfs_init_fs() 4) get_component() 5) btrfs_match_dir_item_name() 6) read_extent() 7) read_file_inr() 8) change_fs_root() 9) get_ino_cache() 10) get_parent() 11) insert_new_cache_item() 12) stripped_len() 13) search_path() 14) follow_link() 15) get_resolved_inum() 16) search_comp() 17) init_file() 18) grub_btrfs_open() 19) get_item_key() 20) grub_btrfs_read() 21) get_dirent_info() 22) btrfs_print_dir_item_names() 23) read_dir() 24) grub_btrfs_dir() 25) grub_btrfs_close() 26) grub_btrfs_label() 27) grub_btrfs_uuid() 28) grub_btrfs_mtime() * Every function that starts with grub is grub dependent. Every other function could be used by other boot loaders as well.