diff options
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 444b3e9b92a4..9f806dd04c27 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -310,6 +310,9 @@ struct btrfs_header { | |||
310 | #define BTRFS_MAX_INLINE_DATA_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \ | 310 | #define BTRFS_MAX_INLINE_DATA_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \ |
311 | sizeof(struct btrfs_item) - \ | 311 | sizeof(struct btrfs_item) - \ |
312 | sizeof(struct btrfs_file_extent_item)) | 312 | sizeof(struct btrfs_file_extent_item)) |
313 | #define BTRFS_MAX_XATTR_SIZE(r) (BTRFS_LEAF_DATA_SIZE(r) - \ | ||
314 | sizeof(struct btrfs_item) -\ | ||
315 | sizeof(struct btrfs_dir_item)) | ||
313 | 316 | ||
314 | 317 | ||
315 | /* | 318 | /* |
@@ -859,8 +862,9 @@ struct btrfs_fs_info { | |||
859 | struct mutex ordered_operations_mutex; | 862 | struct mutex ordered_operations_mutex; |
860 | struct rw_semaphore extent_commit_sem; | 863 | struct rw_semaphore extent_commit_sem; |
861 | 864 | ||
862 | struct rw_semaphore subvol_sem; | 865 | struct rw_semaphore cleanup_work_sem; |
863 | 866 | ||
867 | struct rw_semaphore subvol_sem; | ||
864 | struct srcu_struct subvol_srcu; | 868 | struct srcu_struct subvol_srcu; |
865 | 869 | ||
866 | struct list_head trans_list; | 870 | struct list_head trans_list; |
@@ -868,6 +872,9 @@ struct btrfs_fs_info { | |||
868 | struct list_head dead_roots; | 872 | struct list_head dead_roots; |
869 | struct list_head caching_block_groups; | 873 | struct list_head caching_block_groups; |
870 | 874 | ||
875 | spinlock_t delayed_iput_lock; | ||
876 | struct list_head delayed_iputs; | ||
877 | |||
871 | atomic_t nr_async_submits; | 878 | atomic_t nr_async_submits; |
872 | atomic_t async_submit_draining; | 879 | atomic_t async_submit_draining; |
873 | atomic_t nr_async_bios; | 880 | atomic_t nr_async_bios; |
@@ -1034,12 +1041,12 @@ struct btrfs_root { | |||
1034 | int ref_cows; | 1041 | int ref_cows; |
1035 | int track_dirty; | 1042 | int track_dirty; |
1036 | int in_radix; | 1043 | int in_radix; |
1044 | int clean_orphans; | ||
1037 | 1045 | ||
1038 | u64 defrag_trans_start; | 1046 | u64 defrag_trans_start; |
1039 | struct btrfs_key defrag_progress; | 1047 | struct btrfs_key defrag_progress; |
1040 | struct btrfs_key defrag_max; | 1048 | struct btrfs_key defrag_max; |
1041 | int defrag_running; | 1049 | int defrag_running; |
1042 | int defrag_level; | ||
1043 | char *name; | 1050 | char *name; |
1044 | int in_sysfs; | 1051 | int in_sysfs; |
1045 | 1052 | ||
@@ -1975,6 +1982,10 @@ struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, | |||
1975 | u64 parent, u64 root_objectid, | 1982 | u64 parent, u64 root_objectid, |
1976 | struct btrfs_disk_key *key, int level, | 1983 | struct btrfs_disk_key *key, int level, |
1977 | u64 hint, u64 empty_size); | 1984 | u64 hint, u64 empty_size); |
1985 | int btrfs_free_tree_block(struct btrfs_trans_handle *trans, | ||
1986 | struct btrfs_root *root, | ||
1987 | u64 bytenr, u32 blocksize, | ||
1988 | u64 parent, u64 root_objectid, int level); | ||
1978 | struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans, | 1989 | struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans, |
1979 | struct btrfs_root *root, | 1990 | struct btrfs_root *root, |
1980 | u64 bytenr, u32 blocksize, | 1991 | u64 bytenr, u32 blocksize, |
@@ -2089,6 +2100,10 @@ int btrfs_split_item(struct btrfs_trans_handle *trans, | |||
2089 | struct btrfs_path *path, | 2100 | struct btrfs_path *path, |
2090 | struct btrfs_key *new_key, | 2101 | struct btrfs_key *new_key, |
2091 | unsigned long split_offset); | 2102 | unsigned long split_offset); |
2103 | int btrfs_duplicate_item(struct btrfs_trans_handle *trans, | ||
2104 | struct btrfs_root *root, | ||
2105 | struct btrfs_path *path, | ||
2106 | struct btrfs_key *new_key); | ||
2092 | int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root | 2107 | int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root |
2093 | *root, struct btrfs_key *key, struct btrfs_path *p, int | 2108 | *root, struct btrfs_key *key, struct btrfs_path *p, int |
2094 | ins_len, int cow); | 2109 | ins_len, int cow); |
@@ -2196,9 +2211,10 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans, | |||
2196 | struct btrfs_path *path, | 2211 | struct btrfs_path *path, |
2197 | struct btrfs_dir_item *di); | 2212 | struct btrfs_dir_item *di); |
2198 | int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans, | 2213 | int btrfs_insert_xattr_item(struct btrfs_trans_handle *trans, |
2199 | struct btrfs_root *root, const char *name, | 2214 | struct btrfs_root *root, |
2200 | u16 name_len, const void *data, u16 data_len, | 2215 | struct btrfs_path *path, u64 objectid, |
2201 | u64 dir); | 2216 | const char *name, u16 name_len, |
2217 | const void *data, u16 data_len); | ||
2202 | struct btrfs_dir_item *btrfs_lookup_xattr(struct btrfs_trans_handle *trans, | 2218 | struct btrfs_dir_item *btrfs_lookup_xattr(struct btrfs_trans_handle *trans, |
2203 | struct btrfs_root *root, | 2219 | struct btrfs_root *root, |
2204 | struct btrfs_path *path, u64 dir, | 2220 | struct btrfs_path *path, u64 dir, |
@@ -2292,7 +2308,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, | |||
2292 | struct inode *inode, u64 new_size, | 2308 | struct inode *inode, u64 new_size, |
2293 | u32 min_type); | 2309 | u32 min_type); |
2294 | 2310 | ||
2295 | int btrfs_start_delalloc_inodes(struct btrfs_root *root); | 2311 | int btrfs_start_delalloc_inodes(struct btrfs_root *root, int delay_iput); |
2296 | int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end); | 2312 | int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end); |
2297 | int btrfs_writepages(struct address_space *mapping, | 2313 | int btrfs_writepages(struct address_space *mapping, |
2298 | struct writeback_control *wbc); | 2314 | struct writeback_control *wbc); |
@@ -2332,6 +2348,8 @@ int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode); | |||
2332 | void btrfs_orphan_cleanup(struct btrfs_root *root); | 2348 | void btrfs_orphan_cleanup(struct btrfs_root *root); |
2333 | int btrfs_cont_expand(struct inode *inode, loff_t size); | 2349 | int btrfs_cont_expand(struct inode *inode, loff_t size); |
2334 | int btrfs_invalidate_inodes(struct btrfs_root *root); | 2350 | int btrfs_invalidate_inodes(struct btrfs_root *root); |
2351 | void btrfs_add_delayed_iput(struct inode *inode); | ||
2352 | void btrfs_run_delayed_iputs(struct btrfs_root *root); | ||
2335 | extern const struct dentry_operations btrfs_dentry_operations; | 2353 | extern const struct dentry_operations btrfs_dentry_operations; |
2336 | 2354 | ||
2337 | /* ioctl.c */ | 2355 | /* ioctl.c */ |
@@ -2345,12 +2363,9 @@ int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end, | |||
2345 | int skip_pinned); | 2363 | int skip_pinned); |
2346 | int btrfs_check_file(struct btrfs_root *root, struct inode *inode); | 2364 | int btrfs_check_file(struct btrfs_root *root, struct inode *inode); |
2347 | extern const struct file_operations btrfs_file_operations; | 2365 | extern const struct file_operations btrfs_file_operations; |
2348 | int btrfs_drop_extents(struct btrfs_trans_handle *trans, | 2366 | int btrfs_drop_extents(struct btrfs_trans_handle *trans, struct inode *inode, |
2349 | struct btrfs_root *root, struct inode *inode, | 2367 | u64 start, u64 end, u64 *hint_byte, int drop_cache); |
2350 | u64 start, u64 end, u64 locked_end, | ||
2351 | u64 inline_limit, u64 *hint_block, int drop_cache); | ||
2352 | int btrfs_mark_extent_written(struct btrfs_trans_handle *trans, | 2368 | int btrfs_mark_extent_written(struct btrfs_trans_handle *trans, |
2353 | struct btrfs_root *root, | ||
2354 | struct inode *inode, u64 start, u64 end); | 2369 | struct inode *inode, u64 start, u64 end); |
2355 | int btrfs_release_file(struct inode *inode, struct file *file); | 2370 | int btrfs_release_file(struct inode *inode, struct file *file); |
2356 | 2371 | ||
@@ -2380,7 +2395,8 @@ int btrfs_check_acl(struct inode *inode, int mask); | |||
2380 | #else | 2395 | #else |
2381 | #define btrfs_check_acl NULL | 2396 | #define btrfs_check_acl NULL |
2382 | #endif | 2397 | #endif |
2383 | int btrfs_init_acl(struct inode *inode, struct inode *dir); | 2398 | int btrfs_init_acl(struct btrfs_trans_handle *trans, |
2399 | struct inode *inode, struct inode *dir); | ||
2384 | int btrfs_acl_chmod(struct inode *inode); | 2400 | int btrfs_acl_chmod(struct inode *inode); |
2385 | 2401 | ||
2386 | /* relocation.c */ | 2402 | /* relocation.c */ |