diff options
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 80599b4e42bd..8184f2feb2f3 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -675,18 +675,19 @@ struct btrfs_space_info { | |||
675 | current allocations */ | 675 | current allocations */ |
676 | u64 bytes_readonly; /* total bytes that are read only */ | 676 | u64 bytes_readonly; /* total bytes that are read only */ |
677 | u64 bytes_super; /* total bytes reserved for the super blocks */ | 677 | u64 bytes_super; /* total bytes reserved for the super blocks */ |
678 | 678 | u64 bytes_root; /* the number of bytes needed to commit a | |
679 | /* delalloc accounting */ | 679 | transaction */ |
680 | u64 bytes_delalloc; /* number of bytes reserved for allocation, | ||
681 | this space is not necessarily reserved yet | ||
682 | by the allocator */ | ||
683 | u64 bytes_may_use; /* number of bytes that may be used for | 680 | u64 bytes_may_use; /* number of bytes that may be used for |
684 | delalloc */ | 681 | delalloc/allocations */ |
682 | u64 bytes_delalloc; /* number of bytes currently reserved for | ||
683 | delayed allocation */ | ||
685 | 684 | ||
686 | int full; /* indicates that we cannot allocate any more | 685 | int full; /* indicates that we cannot allocate any more |
687 | chunks for this space */ | 686 | chunks for this space */ |
688 | int force_alloc; /* set if we need to force a chunk alloc for | 687 | int force_alloc; /* set if we need to force a chunk alloc for |
689 | this space */ | 688 | this space */ |
689 | int force_delalloc; /* make people start doing filemap_flush until | ||
690 | we're under a threshold */ | ||
690 | 691 | ||
691 | struct list_head list; | 692 | struct list_head list; |
692 | 693 | ||
@@ -695,6 +696,9 @@ struct btrfs_space_info { | |||
695 | spinlock_t lock; | 696 | spinlock_t lock; |
696 | struct rw_semaphore groups_sem; | 697 | struct rw_semaphore groups_sem; |
697 | atomic_t caching_threads; | 698 | atomic_t caching_threads; |
699 | |||
700 | int allocating_chunk; | ||
701 | wait_queue_head_t wait; | ||
698 | }; | 702 | }; |
699 | 703 | ||
700 | /* | 704 | /* |
@@ -2022,7 +2026,12 @@ u64 btrfs_reduce_alloc_profile(struct btrfs_root *root, u64 flags); | |||
2022 | void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde); | 2026 | void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde); |
2023 | void btrfs_clear_space_info_full(struct btrfs_fs_info *info); | 2027 | void btrfs_clear_space_info_full(struct btrfs_fs_info *info); |
2024 | 2028 | ||
2025 | int btrfs_check_metadata_free_space(struct btrfs_root *root); | 2029 | int btrfs_reserve_metadata_space(struct btrfs_root *root, int num_items); |
2030 | int btrfs_unreserve_metadata_space(struct btrfs_root *root, int num_items); | ||
2031 | int btrfs_unreserve_metadata_for_delalloc(struct btrfs_root *root, | ||
2032 | struct inode *inode, int num_items); | ||
2033 | int btrfs_reserve_metadata_for_delalloc(struct btrfs_root *root, | ||
2034 | struct inode *inode, int num_items); | ||
2026 | int btrfs_check_data_free_space(struct btrfs_root *root, struct inode *inode, | 2035 | int btrfs_check_data_free_space(struct btrfs_root *root, struct inode *inode, |
2027 | u64 bytes); | 2036 | u64 bytes); |
2028 | void btrfs_free_reserved_data_space(struct btrfs_root *root, | 2037 | void btrfs_free_reserved_data_space(struct btrfs_root *root, |
@@ -2357,7 +2366,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options); | |||
2357 | int btrfs_sync_fs(struct super_block *sb, int wait); | 2366 | int btrfs_sync_fs(struct super_block *sb, int wait); |
2358 | 2367 | ||
2359 | /* acl.c */ | 2368 | /* acl.c */ |
2360 | #ifdef CONFIG_FS_POSIX_ACL | 2369 | #ifdef CONFIG_BTRFS_POSIX_ACL |
2361 | int btrfs_check_acl(struct inode *inode, int mask); | 2370 | int btrfs_check_acl(struct inode *inode, int mask); |
2362 | #else | 2371 | #else |
2363 | #define btrfs_check_acl NULL | 2372 | #define btrfs_check_acl NULL |