diff options
author | Christoph Hellwig <hch@tuxera.com> | 2010-11-23 14:38:13 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2010-11-23 14:38:13 +0100 |
commit | b33b7921db14abcd10c30d0ccfc68e364f5ef7fe (patch) | |
tree | 208810679b25995ba47f00bb1915a19f644931f5 /fs/hfsplus/hfsplus_fs.h | |
parent | hfsplus: write up fsync for directories (diff) | |
download | linux-b33b7921db14abcd10c30d0ccfc68e364f5ef7fe.tar.xz linux-b33b7921db14abcd10c30d0ccfc68e364f5ef7fe.zip |
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.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index 625549579e9e..9889d0033b8f 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h @@ -171,7 +171,7 @@ struct hfsplus_inode_info { u32 cached_blocks; hfsplus_extent_rec first_extents; hfsplus_extent_rec cached_extents; - unsigned long flags; + unsigned int extent_state; struct mutex extents_lock; /* @@ -186,6 +186,11 @@ struct hfsplus_inode_info { u32 linkid; /* + * Accessed using atomic bitops. + */ + unsigned long flags; + + /* * Protected by i_mutex. */ sector_t fs_blocks; @@ -196,12 +201,13 @@ struct hfsplus_inode_info { struct inode vfs_inode; }; -#define HFSPLUS_FLG_RSRC 0x0001 -#define HFSPLUS_FLG_EXT_DIRTY 0x0002 -#define HFSPLUS_FLG_EXT_NEW 0x0004 +#define HFSPLUS_EXT_DIRTY 0x0001 +#define HFSPLUS_EXT_NEW 0x0002 + +#define HFSPLUS_I_RSRC 0 /* represents a resource fork */ -#define HFSPLUS_IS_DATA(inode) (!(HFSPLUS_I(inode)->flags & HFSPLUS_FLG_RSRC)) -#define HFSPLUS_IS_RSRC(inode) (HFSPLUS_I(inode)->flags & HFSPLUS_FLG_RSRC) +#define HFSPLUS_IS_RSRC(inode) \ + test_bit(HFSPLUS_I_RSRC, &HFSPLUS_I(inode)->flags) struct hfs_find_data { /* filled by caller */ |