aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/hfsplus_fs.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@tuxera.com>2010-11-23 08:38:13 -0500
committerChristoph Hellwig <hch@lst.de>2010-11-23 08:38:13 -0500
commitb33b7921db14abcd10c30d0ccfc68e364f5ef7fe (patch)
tree208810679b25995ba47f00bb1915a19f644931f5 /fs/hfsplus/hfsplus_fs.h
parenteb29d66d4f2dc98a81ae590bbdddc8cfa8964d73 (diff)
hfsplus: split up inode flags
Split the flags field in the hfsplus inode into an extent_state flag that is locked by the extent_lock, and a new flags field that uses atomic bitops. The second will grow more flags in the next patch. Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/hfsplus_fs.h')
-rw-r--r--fs/hfsplus/hfsplus_fs.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index 625549579e9..9889d0033b8 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -171,7 +171,7 @@ struct hfsplus_inode_info {
171 u32 cached_blocks; 171 u32 cached_blocks;
172 hfsplus_extent_rec first_extents; 172 hfsplus_extent_rec first_extents;
173 hfsplus_extent_rec cached_extents; 173 hfsplus_extent_rec cached_extents;
174 unsigned long flags; 174 unsigned int extent_state;
175 struct mutex extents_lock; 175 struct mutex extents_lock;
176 176
177 /* 177 /*
@@ -186,6 +186,11 @@ struct hfsplus_inode_info {
186 u32 linkid; 186 u32 linkid;
187 187
188 /* 188 /*
189 * Accessed using atomic bitops.
190 */
191 unsigned long flags;
192
193 /*
189 * Protected by i_mutex. 194 * Protected by i_mutex.
190 */ 195 */
191 sector_t fs_blocks; 196 sector_t fs_blocks;
@@ -196,12 +201,13 @@ struct hfsplus_inode_info {
196 struct inode vfs_inode; 201 struct inode vfs_inode;
197}; 202};
198 203
199#define HFSPLUS_FLG_RSRC 0x0001 204#define HFSPLUS_EXT_DIRTY 0x0001
200#define HFSPLUS_FLG_EXT_DIRTY 0x0002 205#define HFSPLUS_EXT_NEW 0x0002
201#define HFSPLUS_FLG_EXT_NEW 0x0004 206
207#define HFSPLUS_I_RSRC 0 /* represents a resource fork */
202 208
203#define HFSPLUS_IS_DATA(inode) (!(HFSPLUS_I(inode)->flags & HFSPLUS_FLG_RSRC)) 209#define HFSPLUS_IS_RSRC(inode) \
204#define HFSPLUS_IS_RSRC(inode) (HFSPLUS_I(inode)->flags & HFSPLUS_FLG_RSRC) 210 test_bit(HFSPLUS_I_RSRC, &HFSPLUS_I(inode)->flags)
205 211
206struct hfs_find_data { 212struct hfs_find_data {
207 /* filled by caller */ 213 /* filled by caller */