X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=free-space-cache.h;h=707fb6d39886026017a1a6d2402e4a5f70842a15;hb=6cedd688115d85e6f14a43f7653378749ef31624;hp=d28625867f7631b07f29160bb97859c165f24b72;hpb=d93cad2677613b0a31315e428ead5339612a4b1c;p=platform%2Fupstream%2Fbtrfs-progs.git diff --git a/free-space-cache.h b/free-space-cache.h index d286258..707fb6d 100644 --- a/free-space-cache.h +++ b/free-space-cache.h @@ -16,8 +16,12 @@ * Boston, MA 021110-1307, USA. */ -#ifndef __BTRFS_FREE_SPACE_CACHE -#define __BTRFS_FREE_SPACE_CACHE +#ifndef __BTRFS_FREE_SPACE_CACHE_H__ +#define __BTRFS_FREE_SPACE_CACHE_H__ + +#include "kerncompat.h" +#include "ctree.h" +#include "rbtree.h" struct btrfs_free_space { struct rb_node offset_index; @@ -36,6 +40,7 @@ struct btrfs_free_space_ctl { int unit; u64 start; void *private; + u32 sectorsize; }; int load_free_space_cache(struct btrfs_fs_info *fs_info, @@ -52,4 +57,8 @@ int btrfs_init_free_space_ctl(struct btrfs_block_group_cache *block_group, int sectorsize); void unlink_free_space(struct btrfs_free_space_ctl *ctl, struct btrfs_free_space *info); +int btrfs_add_free_space(struct btrfs_free_space_ctl *ctl, u64 offset, + u64 bytes); +int btrfs_clear_free_space_cache(struct btrfs_fs_info *fs_info, + struct btrfs_block_group_cache *bg); #endif