~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/btrfs/free-space-tree.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * Copyright (C) 2015 Facebook.  All rights reserved.
  4  */
  5 
  6 #ifndef BTRFS_FREE_SPACE_TREE_H
  7 #define BTRFS_FREE_SPACE_TREE_H
  8 
  9 #include <linux/bits.h>
 10 
 11 struct btrfs_caching_control;
 12 struct btrfs_fs_info;
 13 struct btrfs_path;
 14 struct btrfs_block_group;
 15 struct btrfs_trans_handle;
 16 
 17 /*
 18  * The default size for new free space bitmap items. The last bitmap in a block
 19  * group may be truncated, and none of the free space tree code assumes that
 20  * existing bitmaps are this size.
 21  */
 22 #define BTRFS_FREE_SPACE_BITMAP_SIZE 256
 23 #define BTRFS_FREE_SPACE_BITMAP_BITS (BTRFS_FREE_SPACE_BITMAP_SIZE * BITS_PER_BYTE)
 24 
 25 void set_free_space_tree_thresholds(struct btrfs_block_group *block_group);
 26 int btrfs_create_free_space_tree(struct btrfs_fs_info *fs_info);
 27 int btrfs_delete_free_space_tree(struct btrfs_fs_info *fs_info);
 28 int btrfs_rebuild_free_space_tree(struct btrfs_fs_info *fs_info);
 29 int load_free_space_tree(struct btrfs_caching_control *caching_ctl);
 30 int add_block_group_free_space(struct btrfs_trans_handle *trans,
 31                                struct btrfs_block_group *block_group);
 32 int remove_block_group_free_space(struct btrfs_trans_handle *trans,
 33                                   struct btrfs_block_group *block_group);
 34 int add_to_free_space_tree(struct btrfs_trans_handle *trans,
 35                            u64 start, u64 size);
 36 int remove_from_free_space_tree(struct btrfs_trans_handle *trans,
 37                                 u64 start, u64 size);
 38 
 39 #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
 40 struct btrfs_free_space_info *
 41 search_free_space_info(struct btrfs_trans_handle *trans,
 42                        struct btrfs_block_group *block_group,
 43                        struct btrfs_path *path, int cow);
 44 int __add_to_free_space_tree(struct btrfs_trans_handle *trans,
 45                              struct btrfs_block_group *block_group,
 46                              struct btrfs_path *path, u64 start, u64 size);
 47 int __remove_from_free_space_tree(struct btrfs_trans_handle *trans,
 48                                   struct btrfs_block_group *block_group,
 49                                   struct btrfs_path *path, u64 start, u64 size);
 50 int convert_free_space_to_bitmaps(struct btrfs_trans_handle *trans,
 51                                   struct btrfs_block_group *block_group,
 52                                   struct btrfs_path *path);
 53 int convert_free_space_to_extents(struct btrfs_trans_handle *trans,
 54                                   struct btrfs_block_group *block_group,
 55                                   struct btrfs_path *path);
 56 int free_space_test_bit(struct btrfs_block_group *block_group,
 57                         struct btrfs_path *path, u64 offset);
 58 #endif
 59 
 60 #endif
 61 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php