diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 16:57:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 16:57:12 -0400 |
commit | a0c3061093c8b49facef95dc09a618c6e0d17cb5 (patch) | |
tree | 1d6ff7c06134b71a8bd0721395386e82e46e60c8 /fs/btrfs/btrfs_inode.h | |
parent | 10799db60cbc4f990dd69eb49883477095c66af7 (diff) | |
parent | 174ba50915b08dcfd07c8b5fb795b46a165fa09a (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: (58 commits)
Btrfs: use the device_list_mutex during write_dev_supers
Btrfs: setup free ino caching in a more asynchronous way
btrfs scrub: don't coalesce pages that are logically discontiguous
Btrfs: return -ENOMEM in clear_extent_bit
Btrfs: add mount -o auto_defrag
Btrfs: using rcu lock in the reader side of devices list
Btrfs: drop unnecessary device lock
Btrfs: fix the race between remove dev and alloc chunk
Btrfs: fix the race between reading and updating devices
Btrfs: fix bh leak on __btrfs_open_devices path
Btrfs: fix unsafe usage of merge_state
Btrfs: allocate extent state and check the result properly
fs/btrfs: Add missing btrfs_free_path
Btrfs: check return value of btrfs_inc_extent_ref()
Btrfs: return error to caller if read_one_inode() fails
Btrfs: BUG_ON is deleted from the caller of btrfs_truncate_item & btrfs_extend_item
Btrfs: return error code to caller when btrfs_del_item fails
Btrfs: return error code to caller when btrfs_previous_item fails
btrfs: fix typo 'testeing' -> 'testing'
btrfs: typo: 'btrfS' -> 'btrfs'
...
Diffstat (limited to 'fs/btrfs/btrfs_inode.h')
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 57c3bb2884ce..93b1aa932014 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "extent_map.h" | 22 | #include "extent_map.h" |
23 | #include "extent_io.h" | 23 | #include "extent_io.h" |
24 | #include "ordered-data.h" | 24 | #include "ordered-data.h" |
25 | #include "delayed-inode.h" | ||
25 | 26 | ||
26 | /* in memory btrfs inode */ | 27 | /* in memory btrfs inode */ |
27 | struct btrfs_inode { | 28 | struct btrfs_inode { |
@@ -152,20 +153,34 @@ struct btrfs_inode { | |||
152 | unsigned ordered_data_close:1; | 153 | unsigned ordered_data_close:1; |
153 | unsigned orphan_meta_reserved:1; | 154 | unsigned orphan_meta_reserved:1; |
154 | unsigned dummy_inode:1; | 155 | unsigned dummy_inode:1; |
156 | unsigned in_defrag:1; | ||
155 | 157 | ||
156 | /* | 158 | /* |
157 | * always compress this one file | 159 | * always compress this one file |
158 | */ | 160 | */ |
159 | unsigned force_compress:4; | 161 | unsigned force_compress:4; |
160 | 162 | ||
163 | struct btrfs_delayed_node *delayed_node; | ||
164 | |||
161 | struct inode vfs_inode; | 165 | struct inode vfs_inode; |
162 | }; | 166 | }; |
163 | 167 | ||
168 | extern unsigned char btrfs_filetype_table[]; | ||
169 | |||
164 | static inline struct btrfs_inode *BTRFS_I(struct inode *inode) | 170 | static inline struct btrfs_inode *BTRFS_I(struct inode *inode) |
165 | { | 171 | { |
166 | return container_of(inode, struct btrfs_inode, vfs_inode); | 172 | return container_of(inode, struct btrfs_inode, vfs_inode); |
167 | } | 173 | } |
168 | 174 | ||
175 | static inline u64 btrfs_ino(struct inode *inode) | ||
176 | { | ||
177 | u64 ino = BTRFS_I(inode)->location.objectid; | ||
178 | |||
179 | if (ino <= BTRFS_FIRST_FREE_OBJECTID) | ||
180 | ino = inode->i_ino; | ||
181 | return ino; | ||
182 | } | ||
183 | |||
169 | static inline void btrfs_i_size_write(struct inode *inode, u64 size) | 184 | static inline void btrfs_i_size_write(struct inode *inode, u64 size) |
170 | { | 185 | { |
171 | i_size_write(inode, size); | 186 | i_size_write(inode, size); |