diff options
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index eee060f88113..766b31ae3186 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -43,11 +43,7 @@ struct btrfs_ordered_sum; | |||
43 | 43 | ||
44 | #define BTRFS_ACL_NOT_CACHED ((void *)-1) | 44 | #define BTRFS_ACL_NOT_CACHED ((void *)-1) |
45 | 45 | ||
46 | #ifdef CONFIG_LOCKDEP | 46 | #define BTRFS_MAX_LEVEL 8 |
47 | # define BTRFS_MAX_LEVEL 7 | ||
48 | #else | ||
49 | # define BTRFS_MAX_LEVEL 8 | ||
50 | #endif | ||
51 | 47 | ||
52 | /* holds pointers to all of the tree roots */ | 48 | /* holds pointers to all of the tree roots */ |
53 | #define BTRFS_ROOT_TREE_OBJECTID 1ULL | 49 | #define BTRFS_ROOT_TREE_OBJECTID 1ULL |
@@ -454,17 +450,11 @@ struct btrfs_timespec { | |||
454 | __le32 nsec; | 450 | __le32 nsec; |
455 | } __attribute__ ((__packed__)); | 451 | } __attribute__ ((__packed__)); |
456 | 452 | ||
457 | typedef enum { | 453 | enum btrfs_compression_type { |
458 | BTRFS_COMPRESS_NONE = 0, | 454 | BTRFS_COMPRESS_NONE = 0, |
459 | BTRFS_COMPRESS_ZLIB = 1, | 455 | BTRFS_COMPRESS_ZLIB = 1, |
460 | BTRFS_COMPRESS_LAST = 2, | 456 | BTRFS_COMPRESS_LAST = 2, |
461 | } btrfs_compression_type; | 457 | }; |
462 | |||
463 | /* we don't understand any encryption methods right now */ | ||
464 | typedef enum { | ||
465 | BTRFS_ENCRYPTION_NONE = 0, | ||
466 | BTRFS_ENCRYPTION_LAST = 1, | ||
467 | } btrfs_encryption_type; | ||
468 | 458 | ||
469 | struct btrfs_inode_item { | 459 | struct btrfs_inode_item { |
470 | /* nfs style generation number */ | 460 | /* nfs style generation number */ |
@@ -701,9 +691,7 @@ struct btrfs_fs_info { | |||
701 | struct btrfs_transaction *running_transaction; | 691 | struct btrfs_transaction *running_transaction; |
702 | wait_queue_head_t transaction_throttle; | 692 | wait_queue_head_t transaction_throttle; |
703 | wait_queue_head_t transaction_wait; | 693 | wait_queue_head_t transaction_wait; |
704 | |||
705 | wait_queue_head_t async_submit_wait; | 694 | wait_queue_head_t async_submit_wait; |
706 | wait_queue_head_t tree_log_wait; | ||
707 | 695 | ||
708 | struct btrfs_super_block super_copy; | 696 | struct btrfs_super_block super_copy; |
709 | struct btrfs_super_block super_for_commit; | 697 | struct btrfs_super_block super_for_commit; |
@@ -711,7 +699,6 @@ struct btrfs_fs_info { | |||
711 | struct super_block *sb; | 699 | struct super_block *sb; |
712 | struct inode *btree_inode; | 700 | struct inode *btree_inode; |
713 | struct backing_dev_info bdi; | 701 | struct backing_dev_info bdi; |
714 | spinlock_t hash_lock; | ||
715 | struct mutex trans_mutex; | 702 | struct mutex trans_mutex; |
716 | struct mutex tree_log_mutex; | 703 | struct mutex tree_log_mutex; |
717 | struct mutex transaction_kthread_mutex; | 704 | struct mutex transaction_kthread_mutex; |
@@ -730,10 +717,6 @@ struct btrfs_fs_info { | |||
730 | atomic_t async_submit_draining; | 717 | atomic_t async_submit_draining; |
731 | atomic_t nr_async_bios; | 718 | atomic_t nr_async_bios; |
732 | atomic_t async_delalloc_pages; | 719 | atomic_t async_delalloc_pages; |
733 | atomic_t tree_log_writers; | ||
734 | atomic_t tree_log_commit; | ||
735 | unsigned long tree_log_batch; | ||
736 | u64 tree_log_transid; | ||
737 | 720 | ||
738 | /* | 721 | /* |
739 | * this is used by the balancing code to wait for all the pending | 722 | * this is used by the balancing code to wait for all the pending |
@@ -833,7 +816,14 @@ struct btrfs_root { | |||
833 | struct kobject root_kobj; | 816 | struct kobject root_kobj; |
834 | struct completion kobj_unregister; | 817 | struct completion kobj_unregister; |
835 | struct mutex objectid_mutex; | 818 | struct mutex objectid_mutex; |
819 | |||
836 | struct mutex log_mutex; | 820 | struct mutex log_mutex; |
821 | wait_queue_head_t log_writer_wait; | ||
822 | wait_queue_head_t log_commit_wait[2]; | ||
823 | atomic_t log_writers; | ||
824 | atomic_t log_commit[2]; | ||
825 | unsigned long log_transid; | ||
826 | unsigned long log_batch; | ||
837 | 827 | ||
838 | u64 objectid; | 828 | u64 objectid; |
839 | u64 last_trans; | 829 | u64 last_trans; |
@@ -1721,7 +1711,8 @@ struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, | |||
1721 | u64 empty_size); | 1711 | u64 empty_size); |
1722 | struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans, | 1712 | struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans, |
1723 | struct btrfs_root *root, | 1713 | struct btrfs_root *root, |
1724 | u64 bytenr, u32 blocksize); | 1714 | u64 bytenr, u32 blocksize, |
1715 | int level); | ||
1725 | int btrfs_alloc_extent(struct btrfs_trans_handle *trans, | 1716 | int btrfs_alloc_extent(struct btrfs_trans_handle *trans, |
1726 | struct btrfs_root *root, | 1717 | struct btrfs_root *root, |
1727 | u64 num_bytes, u64 parent, u64 min_bytes, | 1718 | u64 num_bytes, u64 parent, u64 min_bytes, |
@@ -1840,7 +1831,9 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans, | |||
1840 | void btrfs_release_path(struct btrfs_root *root, struct btrfs_path *p); | 1831 | void btrfs_release_path(struct btrfs_root *root, struct btrfs_path *p); |
1841 | struct btrfs_path *btrfs_alloc_path(void); | 1832 | struct btrfs_path *btrfs_alloc_path(void); |
1842 | void btrfs_free_path(struct btrfs_path *p); | 1833 | void btrfs_free_path(struct btrfs_path *p); |
1843 | void btrfs_init_path(struct btrfs_path *p); | 1834 | void btrfs_set_path_blocking(struct btrfs_path *p); |
1835 | void btrfs_unlock_up_safe(struct btrfs_path *p, int level); | ||
1836 | |||
1844 | int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, | 1837 | int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, |
1845 | struct btrfs_path *path, int slot, int nr); | 1838 | struct btrfs_path *path, int slot, int nr); |
1846 | int btrfs_del_leaf(struct btrfs_trans_handle *trans, | 1839 | int btrfs_del_leaf(struct btrfs_trans_handle *trans, |