diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-04 17:17:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-04 17:17:23 -0400 |
commit | e6ece70732b905742ad91a7b5489e0ca1362c0cd (patch) | |
tree | 1ded331dec1886cf5b30bd6c6181787b8f237008 /fs/btrfs/ctree.h | |
parent | 23c79d31a3dd2602ee1a5ff31303b2d7a2d3c159 (diff) | |
parent | aa0467d8d2a00e75b2bb6a56a4ee6d70c5d1928f (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (25 commits)
btrfs: fix uninitialized variable warning
btrfs: add helper for fs_info->closing
Btrfs: add mount -o inode_cache
btrfs: scrub: add explicit plugging
btrfs: use btrfs_ino to access inode number
Btrfs: don't save the inode cache if we are deleting this root
btrfs: false BUG_ON when degraded
Btrfs: don't save the inode cache in non-FS roots
Btrfs: make sure we don't overflow the free space cache crc page
Btrfs: fix uninit variable in the delayed inode code
btrfs: scrub: don't reuse bios and pages
Btrfs: leave spinning on lookup and map the leaf
Btrfs: check for duplicate entries in the free space cache
Btrfs: don't try to allocate from a block group that doesn't have enough space
Btrfs: don't always do readahead
Btrfs: try not to sleep as much when doing slow caching
Btrfs: kill BTRFS_I(inode)->block_group
Btrfs: don't look at the extent buffer level 3 times in a row
Btrfs: map the node block when looking for readahead targets
Btrfs: set range_start to the right start in count_range_bits
...
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 6c093fa98f61..378b5b4443f3 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -930,7 +930,6 @@ struct btrfs_fs_info { | |||
930 | * is required instead of the faster short fsync log commits | 930 | * is required instead of the faster short fsync log commits |
931 | */ | 931 | */ |
932 | u64 last_trans_log_full_commit; | 932 | u64 last_trans_log_full_commit; |
933 | u64 open_ioctl_trans; | ||
934 | unsigned long mount_opt:20; | 933 | unsigned long mount_opt:20; |
935 | unsigned long compress_type:4; | 934 | unsigned long compress_type:4; |
936 | u64 max_inline; | 935 | u64 max_inline; |
@@ -947,7 +946,6 @@ struct btrfs_fs_info { | |||
947 | struct super_block *sb; | 946 | struct super_block *sb; |
948 | struct inode *btree_inode; | 947 | struct inode *btree_inode; |
949 | struct backing_dev_info bdi; | 948 | struct backing_dev_info bdi; |
950 | struct mutex trans_mutex; | ||
951 | struct mutex tree_log_mutex; | 949 | struct mutex tree_log_mutex; |
952 | struct mutex transaction_kthread_mutex; | 950 | struct mutex transaction_kthread_mutex; |
953 | struct mutex cleaner_mutex; | 951 | struct mutex cleaner_mutex; |
@@ -968,6 +966,7 @@ struct btrfs_fs_info { | |||
968 | struct rw_semaphore subvol_sem; | 966 | struct rw_semaphore subvol_sem; |
969 | struct srcu_struct subvol_srcu; | 967 | struct srcu_struct subvol_srcu; |
970 | 968 | ||
969 | spinlock_t trans_lock; | ||
971 | struct list_head trans_list; | 970 | struct list_head trans_list; |
972 | struct list_head hashers; | 971 | struct list_head hashers; |
973 | struct list_head dead_roots; | 972 | struct list_head dead_roots; |
@@ -980,6 +979,7 @@ struct btrfs_fs_info { | |||
980 | atomic_t async_submit_draining; | 979 | atomic_t async_submit_draining; |
981 | atomic_t nr_async_bios; | 980 | atomic_t nr_async_bios; |
982 | atomic_t async_delalloc_pages; | 981 | atomic_t async_delalloc_pages; |
982 | atomic_t open_ioctl_trans; | ||
983 | 983 | ||
984 | /* | 984 | /* |
985 | * this is used by the balancing code to wait for all the pending | 985 | * this is used by the balancing code to wait for all the pending |
@@ -1044,6 +1044,7 @@ struct btrfs_fs_info { | |||
1044 | int closing; | 1044 | int closing; |
1045 | int log_root_recovering; | 1045 | int log_root_recovering; |
1046 | int enospc_unlink; | 1046 | int enospc_unlink; |
1047 | int trans_no_join; | ||
1047 | 1048 | ||
1048 | u64 total_pinned; | 1049 | u64 total_pinned; |
1049 | 1050 | ||
@@ -1065,7 +1066,6 @@ struct btrfs_fs_info { | |||
1065 | struct reloc_control *reloc_ctl; | 1066 | struct reloc_control *reloc_ctl; |
1066 | 1067 | ||
1067 | spinlock_t delalloc_lock; | 1068 | spinlock_t delalloc_lock; |
1068 | spinlock_t new_trans_lock; | ||
1069 | u64 delalloc_bytes; | 1069 | u64 delalloc_bytes; |
1070 | 1070 | ||
1071 | /* data_alloc_cluster is only used in ssd mode */ | 1071 | /* data_alloc_cluster is only used in ssd mode */ |
@@ -1340,6 +1340,7 @@ struct btrfs_ioctl_defrag_range_args { | |||
1340 | #define BTRFS_MOUNT_USER_SUBVOL_RM_ALLOWED (1 << 14) | 1340 | #define BTRFS_MOUNT_USER_SUBVOL_RM_ALLOWED (1 << 14) |
1341 | #define BTRFS_MOUNT_ENOSPC_DEBUG (1 << 15) | 1341 | #define BTRFS_MOUNT_ENOSPC_DEBUG (1 << 15) |
1342 | #define BTRFS_MOUNT_AUTO_DEFRAG (1 << 16) | 1342 | #define BTRFS_MOUNT_AUTO_DEFRAG (1 << 16) |
1343 | #define BTRFS_MOUNT_INODE_MAP_CACHE (1 << 17) | ||
1343 | 1344 | ||
1344 | #define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt) | 1345 | #define btrfs_clear_opt(o, opt) ((o) &= ~BTRFS_MOUNT_##opt) |
1345 | #define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt) | 1346 | #define btrfs_set_opt(o, opt) ((o) |= BTRFS_MOUNT_##opt) |
@@ -2238,6 +2239,9 @@ int btrfs_block_rsv_migrate(struct btrfs_block_rsv *src_rsv, | |||
2238 | void btrfs_block_rsv_release(struct btrfs_root *root, | 2239 | void btrfs_block_rsv_release(struct btrfs_root *root, |
2239 | struct btrfs_block_rsv *block_rsv, | 2240 | struct btrfs_block_rsv *block_rsv, |
2240 | u64 num_bytes); | 2241 | u64 num_bytes); |
2242 | int btrfs_truncate_reserve_metadata(struct btrfs_trans_handle *trans, | ||
2243 | struct btrfs_root *root, | ||
2244 | struct btrfs_block_rsv *rsv); | ||
2241 | int btrfs_set_block_group_ro(struct btrfs_root *root, | 2245 | int btrfs_set_block_group_ro(struct btrfs_root *root, |
2242 | struct btrfs_block_group_cache *cache); | 2246 | struct btrfs_block_group_cache *cache); |
2243 | int btrfs_set_block_group_rw(struct btrfs_root *root, | 2247 | int btrfs_set_block_group_rw(struct btrfs_root *root, |
@@ -2350,6 +2354,15 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans, | |||
2350 | struct btrfs_root *root, | 2354 | struct btrfs_root *root, |
2351 | struct extent_buffer *node, | 2355 | struct extent_buffer *node, |
2352 | struct extent_buffer *parent); | 2356 | struct extent_buffer *parent); |
2357 | static inline int btrfs_fs_closing(struct btrfs_fs_info *fs_info) | ||
2358 | { | ||
2359 | /* | ||
2360 | * Get synced with close_ctree() | ||
2361 | */ | ||
2362 | smp_mb(); | ||
2363 | return fs_info->closing; | ||
2364 | } | ||
2365 | |||
2353 | /* root-item.c */ | 2366 | /* root-item.c */ |
2354 | int btrfs_find_root_ref(struct btrfs_root *tree_root, | 2367 | int btrfs_find_root_ref(struct btrfs_root *tree_root, |
2355 | struct btrfs_path *path, | 2368 | struct btrfs_path *path, |
@@ -2512,8 +2525,7 @@ int btrfs_set_extent_delalloc(struct inode *inode, u64 start, u64 end, | |||
2512 | int btrfs_writepages(struct address_space *mapping, | 2525 | int btrfs_writepages(struct address_space *mapping, |
2513 | struct writeback_control *wbc); | 2526 | struct writeback_control *wbc); |
2514 | int btrfs_create_subvol_root(struct btrfs_trans_handle *trans, | 2527 | int btrfs_create_subvol_root(struct btrfs_trans_handle *trans, |
2515 | struct btrfs_root *new_root, | 2528 | struct btrfs_root *new_root, u64 new_dirid); |
2516 | u64 new_dirid, u64 alloc_hint); | ||
2517 | int btrfs_merge_bio_hook(struct page *page, unsigned long offset, | 2529 | int btrfs_merge_bio_hook(struct page *page, unsigned long offset, |
2518 | size_t size, struct bio *bio, unsigned long bio_flags); | 2530 | size_t size, struct bio *bio, unsigned long bio_flags); |
2519 | 2531 | ||