aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h114
1 files changed, 86 insertions, 28 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 837435ce84ca..444b3e9b92a4 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -114,6 +114,10 @@ struct btrfs_ordered_sum;
114 */ 114 */
115#define BTRFS_DEV_ITEMS_OBJECTID 1ULL 115#define BTRFS_DEV_ITEMS_OBJECTID 1ULL
116 116
117#define BTRFS_BTREE_INODE_OBJECTID 1
118
119#define BTRFS_EMPTY_SUBVOL_DIR_OBJECTID 2
120
117/* 121/*
118 * we can actually store much bigger names, but lets not confuse the rest 122 * we can actually store much bigger names, but lets not confuse the rest
119 * of linux 123 * of linux
@@ -670,21 +674,29 @@ struct btrfs_space_info {
670 u64 bytes_reserved; /* total bytes the allocator has reserved for 674 u64 bytes_reserved; /* total bytes the allocator has reserved for
671 current allocations */ 675 current allocations */
672 u64 bytes_readonly; /* total bytes that are read only */ 676 u64 bytes_readonly; /* total bytes that are read only */
673 677 u64 bytes_super; /* total bytes reserved for the super blocks */
674 /* delalloc accounting */ 678 u64 bytes_root; /* the number of bytes needed to commit a
675 u64 bytes_delalloc; /* number of bytes reserved for allocation, 679 transaction */
676 this space is not necessarily reserved yet
677 by the allocator */
678 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
679 delalloc */ 681 delalloc/allocations */
682 u64 bytes_delalloc; /* number of bytes currently reserved for
683 delayed allocation */
680 684
681 int full; /* indicates that we cannot allocate any more 685 int full; /* indicates that we cannot allocate any more
682 chunks for this space */ 686 chunks for this space */
683 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
684 this space */ 688 this space */
689 int force_delalloc; /* make people start doing filemap_flush until
690 we're under a threshold */
685 691
686 struct list_head list; 692 struct list_head list;
687 693
694 /* for controlling how we free up space for allocations */
695 wait_queue_head_t allocate_wait;
696 wait_queue_head_t flush_wait;
697 int allocating_chunk;
698 int flushing;
699
688 /* for block groups in our same type */ 700 /* for block groups in our same type */
689 struct list_head block_groups; 701 struct list_head block_groups;
690 spinlock_t lock; 702 spinlock_t lock;
@@ -726,6 +738,15 @@ enum btrfs_caching_type {
726 BTRFS_CACHE_FINISHED = 2, 738 BTRFS_CACHE_FINISHED = 2,
727}; 739};
728 740
741struct btrfs_caching_control {
742 struct list_head list;
743 struct mutex mutex;
744 wait_queue_head_t wait;
745 struct btrfs_block_group_cache *block_group;
746 u64 progress;
747 atomic_t count;
748};
749
729struct btrfs_block_group_cache { 750struct btrfs_block_group_cache {
730 struct btrfs_key key; 751 struct btrfs_key key;
731 struct btrfs_block_group_item item; 752 struct btrfs_block_group_item item;
@@ -733,6 +754,7 @@ struct btrfs_block_group_cache {
733 spinlock_t lock; 754 spinlock_t lock;
734 u64 pinned; 755 u64 pinned;
735 u64 reserved; 756 u64 reserved;
757 u64 bytes_super;
736 u64 flags; 758 u64 flags;
737 u64 sectorsize; 759 u64 sectorsize;
738 int extents_thresh; 760 int extents_thresh;
@@ -742,8 +764,9 @@ struct btrfs_block_group_cache {
742 int dirty; 764 int dirty;
743 765
744 /* cache tracking stuff */ 766 /* cache tracking stuff */
745 wait_queue_head_t caching_q;
746 int cached; 767 int cached;
768 struct btrfs_caching_control *caching_ctl;
769 u64 last_byte_to_unpin;
747 770
748 struct btrfs_space_info *space_info; 771 struct btrfs_space_info *space_info;
749 772
@@ -782,13 +805,16 @@ struct btrfs_fs_info {
782 805
783 /* the log root tree is a directory of all the other log roots */ 806 /* the log root tree is a directory of all the other log roots */
784 struct btrfs_root *log_root_tree; 807 struct btrfs_root *log_root_tree;
808
809 spinlock_t fs_roots_radix_lock;
785 struct radix_tree_root fs_roots_radix; 810 struct radix_tree_root fs_roots_radix;
786 811
787 /* block group cache stuff */ 812 /* block group cache stuff */
788 spinlock_t block_group_cache_lock; 813 spinlock_t block_group_cache_lock;
789 struct rb_root block_group_cache_tree; 814 struct rb_root block_group_cache_tree;
790 815
791 struct extent_io_tree pinned_extents; 816 struct extent_io_tree freed_extents[2];
817 struct extent_io_tree *pinned_extents;
792 818
793 /* logical->physical extent mapping */ 819 /* logical->physical extent mapping */
794 struct btrfs_mapping_tree mapping_tree; 820 struct btrfs_mapping_tree mapping_tree;
@@ -822,11 +848,7 @@ struct btrfs_fs_info {
822 struct mutex transaction_kthread_mutex; 848 struct mutex transaction_kthread_mutex;
823 struct mutex cleaner_mutex; 849 struct mutex cleaner_mutex;
824 struct mutex chunk_mutex; 850 struct mutex chunk_mutex;
825 struct mutex drop_mutex;
826 struct mutex volume_mutex; 851 struct mutex volume_mutex;
827 struct mutex tree_reloc_mutex;
828 struct rw_semaphore extent_commit_sem;
829
830 /* 852 /*
831 * this protects the ordered operations list only while we are 853 * this protects the ordered operations list only while we are
832 * processing all of the entries on it. This way we make 854 * processing all of the entries on it. This way we make
@@ -835,10 +857,16 @@ struct btrfs_fs_info {
835 * before jumping into the main commit. 857 * before jumping into the main commit.
836 */ 858 */
837 struct mutex ordered_operations_mutex; 859 struct mutex ordered_operations_mutex;
860 struct rw_semaphore extent_commit_sem;
861
862 struct rw_semaphore subvol_sem;
863
864 struct srcu_struct subvol_srcu;
838 865
839 struct list_head trans_list; 866 struct list_head trans_list;
840 struct list_head hashers; 867 struct list_head hashers;
841 struct list_head dead_roots; 868 struct list_head dead_roots;
869 struct list_head caching_block_groups;
842 870
843 atomic_t nr_async_submits; 871 atomic_t nr_async_submits;
844 atomic_t async_submit_draining; 872 atomic_t async_submit_draining;
@@ -882,6 +910,7 @@ struct btrfs_fs_info {
882 * A third pool does submit_bio to avoid deadlocking with the other 910 * A third pool does submit_bio to avoid deadlocking with the other
883 * two 911 * two
884 */ 912 */
913 struct btrfs_workers generic_worker;
885 struct btrfs_workers workers; 914 struct btrfs_workers workers;
886 struct btrfs_workers delalloc_workers; 915 struct btrfs_workers delalloc_workers;
887 struct btrfs_workers endio_workers; 916 struct btrfs_workers endio_workers;
@@ -889,6 +918,7 @@ struct btrfs_fs_info {
889 struct btrfs_workers endio_meta_write_workers; 918 struct btrfs_workers endio_meta_write_workers;
890 struct btrfs_workers endio_write_workers; 919 struct btrfs_workers endio_write_workers;
891 struct btrfs_workers submit_workers; 920 struct btrfs_workers submit_workers;
921 struct btrfs_workers enospc_workers;
892 /* 922 /*
893 * fixup workers take dirty pages that didn't properly go through 923 * fixup workers take dirty pages that didn't properly go through
894 * the cow mechanism and make them safe to write. It happens 924 * the cow mechanism and make them safe to write. It happens
@@ -979,7 +1009,10 @@ struct btrfs_root {
979 atomic_t log_writers; 1009 atomic_t log_writers;
980 atomic_t log_commit[2]; 1010 atomic_t log_commit[2];
981 unsigned long log_transid; 1011 unsigned long log_transid;
1012 unsigned long last_log_commit;
982 unsigned long log_batch; 1013 unsigned long log_batch;
1014 pid_t log_start_pid;
1015 bool log_multiple_pids;
983 1016
984 u64 objectid; 1017 u64 objectid;
985 u64 last_trans; 1018 u64 last_trans;
@@ -996,10 +1029,12 @@ struct btrfs_root {
996 u32 stripesize; 1029 u32 stripesize;
997 1030
998 u32 type; 1031 u32 type;
999 u64 highest_inode; 1032
1000 u64 last_inode_alloc; 1033 u64 highest_objectid;
1001 int ref_cows; 1034 int ref_cows;
1002 int track_dirty; 1035 int track_dirty;
1036 int in_radix;
1037
1003 u64 defrag_trans_start; 1038 u64 defrag_trans_start;
1004 struct btrfs_key defrag_progress; 1039 struct btrfs_key defrag_progress;
1005 struct btrfs_key defrag_max; 1040 struct btrfs_key defrag_max;
@@ -1118,6 +1153,7 @@ struct btrfs_root {
1118#define BTRFS_MOUNT_FLUSHONCOMMIT (1 << 7) 1153#define BTRFS_MOUNT_FLUSHONCOMMIT (1 << 7)
1119#define BTRFS_MOUNT_SSD_SPREAD (1 << 8) 1154#define BTRFS_MOUNT_SSD_SPREAD (1 << 8)
1120#define BTRFS_MOUNT_NOSSD (1 << 9) 1155#define BTRFS_MOUNT_NOSSD (1 << 9)
1156#define BTRFS_MOUNT_DISCARD (1 << 10)
1121 1157
1122#define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt) 1158#define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt)
1123#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt) 1159#define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt)
@@ -1920,8 +1956,8 @@ void btrfs_put_block_group(struct btrfs_block_group_cache *cache);
1920int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, 1956int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
1921 struct btrfs_root *root, unsigned long count); 1957 struct btrfs_root *root, unsigned long count);
1922int btrfs_lookup_extent(struct btrfs_root *root, u64 start, u64 len); 1958int btrfs_lookup_extent(struct btrfs_root *root, u64 start, u64 len);
1923int btrfs_update_pinned_extents(struct btrfs_root *root, 1959int btrfs_pin_extent(struct btrfs_root *root,
1924 u64 bytenr, u64 num, int pin); 1960 u64 bytenr, u64 num, int reserved);
1925int btrfs_drop_leaf_ref(struct btrfs_trans_handle *trans, 1961int btrfs_drop_leaf_ref(struct btrfs_trans_handle *trans,
1926 struct btrfs_root *root, struct extent_buffer *leaf); 1962 struct btrfs_root *root, struct extent_buffer *leaf);
1927int btrfs_cross_ref_exist(struct btrfs_trans_handle *trans, 1963int btrfs_cross_ref_exist(struct btrfs_trans_handle *trans,
@@ -1971,9 +2007,10 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans,
1971 u64 root_objectid, u64 owner, u64 offset); 2007 u64 root_objectid, u64 owner, u64 offset);
1972 2008
1973int btrfs_free_reserved_extent(struct btrfs_root *root, u64 start, u64 len); 2009int btrfs_free_reserved_extent(struct btrfs_root *root, u64 start, u64 len);
2010int btrfs_prepare_extent_commit(struct btrfs_trans_handle *trans,
2011 struct btrfs_root *root);
1974int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, 2012int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans,
1975 struct btrfs_root *root, 2013 struct btrfs_root *root);
1976 struct extent_io_tree *unpin);
1977int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, 2014int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
1978 struct btrfs_root *root, 2015 struct btrfs_root *root,
1979 u64 bytenr, u64 num_bytes, u64 parent, 2016 u64 bytenr, u64 num_bytes, u64 parent,
@@ -1984,6 +2021,7 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
1984int btrfs_extent_readonly(struct btrfs_root *root, u64 bytenr); 2021int btrfs_extent_readonly(struct btrfs_root *root, u64 bytenr);
1985int btrfs_free_block_groups(struct btrfs_fs_info *info); 2022int btrfs_free_block_groups(struct btrfs_fs_info *info);
1986int btrfs_read_block_groups(struct btrfs_root *root); 2023int btrfs_read_block_groups(struct btrfs_root *root);
2024int btrfs_can_relocate(struct btrfs_root *root, u64 bytenr);
1987int btrfs_make_block_group(struct btrfs_trans_handle *trans, 2025int btrfs_make_block_group(struct btrfs_trans_handle *trans,
1988 struct btrfs_root *root, u64 bytes_used, 2026 struct btrfs_root *root, u64 bytes_used,
1989 u64 type, u64 chunk_objectid, u64 chunk_offset, 2027 u64 type, u64 chunk_objectid, u64 chunk_offset,
@@ -1997,7 +2035,12 @@ u64 btrfs_reduce_alloc_profile(struct btrfs_root *root, u64 flags);
1997void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde); 2035void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde);
1998void btrfs_clear_space_info_full(struct btrfs_fs_info *info); 2036void btrfs_clear_space_info_full(struct btrfs_fs_info *info);
1999 2037
2000int btrfs_check_metadata_free_space(struct btrfs_root *root); 2038int btrfs_reserve_metadata_space(struct btrfs_root *root, int num_items);
2039int btrfs_unreserve_metadata_space(struct btrfs_root *root, int num_items);
2040int btrfs_unreserve_metadata_for_delalloc(struct btrfs_root *root,
2041 struct inode *inode, int num_items);
2042int btrfs_reserve_metadata_for_delalloc(struct btrfs_root *root,
2043 struct inode *inode, int num_items);
2001int btrfs_check_data_free_space(struct btrfs_root *root, struct inode *inode, 2044int btrfs_check_data_free_space(struct btrfs_root *root, struct inode *inode,
2002 u64 bytes); 2045 u64 bytes);
2003void btrfs_free_reserved_data_space(struct btrfs_root *root, 2046void btrfs_free_reserved_data_space(struct btrfs_root *root,
@@ -2006,7 +2049,6 @@ void btrfs_delalloc_reserve_space(struct btrfs_root *root, struct inode *inode,
2006 u64 bytes); 2049 u64 bytes);
2007void btrfs_delalloc_free_space(struct btrfs_root *root, struct inode *inode, 2050void btrfs_delalloc_free_space(struct btrfs_root *root, struct inode *inode,
2008 u64 bytes); 2051 u64 bytes);
2009void btrfs_free_pinned_extents(struct btrfs_fs_info *info);
2010/* ctree.c */ 2052/* ctree.c */
2011int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key, 2053int btrfs_bin_search(struct extent_buffer *eb, struct btrfs_key *key,
2012 int level, int *slot); 2054 int level, int *slot);
@@ -2100,12 +2142,15 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
2100 struct extent_buffer *parent); 2142 struct extent_buffer *parent);
2101/* root-item.c */ 2143/* root-item.c */
2102int btrfs_find_root_ref(struct btrfs_root *tree_root, 2144int btrfs_find_root_ref(struct btrfs_root *tree_root,
2103 struct btrfs_path *path, 2145 struct btrfs_path *path,
2104 u64 root_id, u64 ref_id); 2146 u64 root_id, u64 ref_id);
2105int btrfs_add_root_ref(struct btrfs_trans_handle *trans, 2147int btrfs_add_root_ref(struct btrfs_trans_handle *trans,
2106 struct btrfs_root *tree_root, 2148 struct btrfs_root *tree_root,
2107 u64 root_id, u8 type, u64 ref_id, 2149 u64 root_id, u64 ref_id, u64 dirid, u64 sequence,
2108 u64 dirid, u64 sequence, 2150 const char *name, int name_len);
2151int btrfs_del_root_ref(struct btrfs_trans_handle *trans,
2152 struct btrfs_root *tree_root,
2153 u64 root_id, u64 ref_id, u64 dirid, u64 *sequence,
2109 const char *name, int name_len); 2154 const char *name, int name_len);
2110int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, 2155int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
2111 struct btrfs_key *key); 2156 struct btrfs_key *key);
@@ -2120,6 +2165,7 @@ int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct
2120int btrfs_search_root(struct btrfs_root *root, u64 search_start, 2165int btrfs_search_root(struct btrfs_root *root, u64 search_start,
2121 u64 *found_objectid); 2166 u64 *found_objectid);
2122int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid); 2167int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid);
2168int btrfs_find_orphan_roots(struct btrfs_root *tree_root);
2123int btrfs_set_root_node(struct btrfs_root_item *item, 2169int btrfs_set_root_node(struct btrfs_root_item *item,
2124 struct extent_buffer *node); 2170 struct extent_buffer *node);
2125/* dir-item.c */ 2171/* dir-item.c */
@@ -2138,6 +2184,10 @@ btrfs_lookup_dir_index_item(struct btrfs_trans_handle *trans,
2138 struct btrfs_path *path, u64 dir, 2184 struct btrfs_path *path, u64 dir,
2139 u64 objectid, const char *name, int name_len, 2185 u64 objectid, const char *name, int name_len,
2140 int mod); 2186 int mod);
2187struct btrfs_dir_item *
2188btrfs_search_dir_index_item(struct btrfs_root *root,
2189 struct btrfs_path *path, u64 dirid,
2190 const char *name, int name_len);
2141struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root, 2191struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root,
2142 struct btrfs_path *path, 2192 struct btrfs_path *path,
2143 const char *name, int name_len); 2193 const char *name, int name_len);
@@ -2160,6 +2210,7 @@ int btrfs_insert_orphan_item(struct btrfs_trans_handle *trans,
2160 struct btrfs_root *root, u64 offset); 2210 struct btrfs_root *root, u64 offset);
2161int btrfs_del_orphan_item(struct btrfs_trans_handle *trans, 2211int btrfs_del_orphan_item(struct btrfs_trans_handle *trans,
2162 struct btrfs_root *root, u64 offset); 2212 struct btrfs_root *root, u64 offset);
2213int btrfs_find_orphan_item(struct btrfs_root *root, u64 offset);
2163 2214
2164/* inode-map.c */ 2215/* inode-map.c */
2165int btrfs_find_free_objectid(struct btrfs_trans_handle *trans, 2216int btrfs_find_free_objectid(struct btrfs_trans_handle *trans,
@@ -2232,6 +2283,10 @@ int btrfs_unlink_inode(struct btrfs_trans_handle *trans,
2232int btrfs_add_link(struct btrfs_trans_handle *trans, 2283int btrfs_add_link(struct btrfs_trans_handle *trans,
2233 struct inode *parent_inode, struct inode *inode, 2284 struct inode *parent_inode, struct inode *inode,
2234 const char *name, int name_len, int add_backref, u64 index); 2285 const char *name, int name_len, int add_backref, u64 index);
2286int btrfs_unlink_subvol(struct btrfs_trans_handle *trans,
2287 struct btrfs_root *root,
2288 struct inode *dir, u64 objectid,
2289 const char *name, int name_len);
2235int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, 2290int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
2236 struct btrfs_root *root, 2291 struct btrfs_root *root,
2237 struct inode *inode, u64 new_size, 2292 struct inode *inode, u64 new_size,
@@ -2242,7 +2297,7 @@ int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end);
2242int btrfs_writepages(struct address_space *mapping, 2297int btrfs_writepages(struct address_space *mapping,
2243 struct writeback_control *wbc); 2298 struct writeback_control *wbc);
2244int btrfs_create_subvol_root(struct btrfs_trans_handle *trans, 2299int btrfs_create_subvol_root(struct btrfs_trans_handle *trans,
2245 struct btrfs_root *new_root, struct dentry *dentry, 2300 struct btrfs_root *new_root,
2246 u64 new_dirid, u64 alloc_hint); 2301 u64 new_dirid, u64 alloc_hint);
2247int btrfs_merge_bio_hook(struct page *page, unsigned long offset, 2302int btrfs_merge_bio_hook(struct page *page, unsigned long offset,
2248 size_t size, struct bio *bio, unsigned long bio_flags); 2303 size_t size, struct bio *bio, unsigned long bio_flags);
@@ -2258,6 +2313,7 @@ int btrfs_write_inode(struct inode *inode, int wait);
2258void btrfs_dirty_inode(struct inode *inode); 2313void btrfs_dirty_inode(struct inode *inode);
2259struct inode *btrfs_alloc_inode(struct super_block *sb); 2314struct inode *btrfs_alloc_inode(struct super_block *sb);
2260void btrfs_destroy_inode(struct inode *inode); 2315void btrfs_destroy_inode(struct inode *inode);
2316void btrfs_drop_inode(struct inode *inode);
2261int btrfs_init_cachep(void); 2317int btrfs_init_cachep(void);
2262void btrfs_destroy_cachep(void); 2318void btrfs_destroy_cachep(void);
2263long btrfs_ioctl_trans_end(struct file *file); 2319long btrfs_ioctl_trans_end(struct file *file);
@@ -2275,6 +2331,8 @@ int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode);
2275int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode); 2331int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode);
2276void btrfs_orphan_cleanup(struct btrfs_root *root); 2332void btrfs_orphan_cleanup(struct btrfs_root *root);
2277int btrfs_cont_expand(struct inode *inode, loff_t size); 2333int btrfs_cont_expand(struct inode *inode, loff_t size);
2334int btrfs_invalidate_inodes(struct btrfs_root *root);
2335extern const struct dentry_operations btrfs_dentry_operations;
2278 2336
2279/* ioctl.c */ 2337/* ioctl.c */
2280long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 2338long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
@@ -2286,11 +2344,11 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync);
2286int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end, 2344int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end,
2287 int skip_pinned); 2345 int skip_pinned);
2288int btrfs_check_file(struct btrfs_root *root, struct inode *inode); 2346int btrfs_check_file(struct btrfs_root *root, struct inode *inode);
2289extern struct file_operations btrfs_file_operations; 2347extern const struct file_operations btrfs_file_operations;
2290int btrfs_drop_extents(struct btrfs_trans_handle *trans, 2348int btrfs_drop_extents(struct btrfs_trans_handle *trans,
2291 struct btrfs_root *root, struct inode *inode, 2349 struct btrfs_root *root, struct inode *inode,
2292 u64 start, u64 end, u64 locked_end, 2350 u64 start, u64 end, u64 locked_end,
2293 u64 inline_limit, u64 *hint_block); 2351 u64 inline_limit, u64 *hint_block, int drop_cache);
2294int btrfs_mark_extent_written(struct btrfs_trans_handle *trans, 2352int btrfs_mark_extent_written(struct btrfs_trans_handle *trans,
2295 struct btrfs_root *root, 2353 struct btrfs_root *root,
2296 struct inode *inode, u64 start, u64 end); 2354 struct inode *inode, u64 start, u64 end);
@@ -2317,7 +2375,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options);
2317int btrfs_sync_fs(struct super_block *sb, int wait); 2375int btrfs_sync_fs(struct super_block *sb, int wait);
2318 2376
2319/* acl.c */ 2377/* acl.c */
2320#ifdef CONFIG_FS_POSIX_ACL 2378#ifdef CONFIG_BTRFS_FS_POSIX_ACL
2321int btrfs_check_acl(struct inode *inode, int mask); 2379int btrfs_check_acl(struct inode *inode, int mask);
2322#else 2380#else
2323#define btrfs_check_acl NULL 2381#define btrfs_check_acl NULL