path: root/extent-cache.h
Commit message (Collapse)AuthorAge
* btrfs-progs: typo review of strings and commentsNicholas D Steeves2016-06-01
| | | | | Signed-off-by: Nicholas D Steeves <> Signed-off-by: David Sterba <>
* btrfs-progs: extent-tree: Add add_merge_cache_extent functionQu Wenruo2016-01-12
| | | | | | | | | | This add_merge_cache_extent() function will try to merge adjusted cache_extent. This is used for later btrfs-convert ext2 free space cache. Signed-off-by: Qu Wenruo <> Signed-off-by: David Sterba <>
* btrfs-progs: extent-cache: Add comments for search/lookup functionsQu Wenruo2016-01-12
| | | | | | | | | There are quite a lot search/lookup functions with different behavior, add comments for them, as it will take extra time to view source to understand the behavior difference. Signed-off-by: Qu Wenruo <> Signed-off-by: David Sterba <>
* btrfs-progs: unify header file inclusion protectionsDavid Sterba2015-01-21
| | | | | | There are missing ifdefs or defines with very generic names. Signed-off-by: David Sterba <>
* btrfs-progs: Add last_cache_extent() for extent-cache.Qu Wenruo2014-12-10
| | | | | | | | Allow direct search for the last cache extent. Provide the basis for finding the last ino in inode_cache. Signed-off-by: Qu Wenruo <> Signed-off-by: David Sterba <>
* Btrfs-progs: extend the extent cache for the device extentMiao Xie2013-07-03
| | | | | | | | | | | | As we know, btrfs can manage several devices in the same fs, so [offset, size] is not sufficient for unique identification of an device extent, we need the device id to identify the device extents which have the same offset and size, but are not in the same device. So, we added a member variant named objectid into the extent cache, and introduced some functions to make the extent cache be suitable to manage the device extent. Signed-off-by: Miao Xie <> Signed-off-by: Chris Mason <>
* Btrfs-progs: introduce common insert/search/delete functions for rb-treeMiao Xie2013-07-03
| | | | | | | | | 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 <> Signed-off-by: Chris Mason <>
* btrfs-progs: libify some parts of btrfs-progsMark Fasheh2013-02-27
| | | | | | | | | | | | | | | 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 <> Signed-off-by: David Sterba <>
* Add semantic checks to btrfsck for files and directoriesYan Zheng2009-01-07
| | | | | | | | | | | | | | | | This patch makes btrfsck check more things, including directory items, file extents, checksumming, inode link counts etc. The code for these checks is similar to the code verifies extent back references. The main difference is that shared tree blocks are treated specially. The partial checking results(unresolved references and/or errors) of shared sub-trees are cached. This avoids scanning the shared blocks several times. Thank you, Signed-off-by: Yan Zheng <>
* Port extent buffer to btrfs-progsYan Zheng2008-01-04
| | | | | | | This patch ports extent buffer to btrfs-progs. extent_map.c contains a simplified extent map tree and functions that manipulate/manage extent buffer. extent state related codes are based on corresponding codes in kernel module, codes that manage extent buffer are from disk-io.c.
* Create a slightly more generic extent-caching structureChris Mason2007-10-15