diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-08-08 19:14:06 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-08-09 01:57:56 -0400 |
commit | dbe6a5ff4fa78bdfa983458c338831d91b35f315 (patch) | |
tree | 9cb566091b008512cdee731cb5502794c9d06c1a /fs/f2fs/f2fs.h | |
parent | c2d715d144af7209d035d0fe0b20a7a591c22c21 (diff) |
f2fs: fix the use of XATTR_NODE_OFFSET
This patch fixes the use of XATTR_NODE_OFFSET.
o The offset should not use several MSB bits which are used by marking node
blocks.
o IS_DNODE should handle XATTR_NODE_OFFSET to avoid potential abnormality
during the fsync call.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index d8e386ceb0cd..eb8c45b65fe5 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -135,11 +135,13 @@ static inline int update_sits_in_cursum(struct f2fs_summary_block *rs, int i) | |||
135 | /* | 135 | /* |
136 | * For INODE and NODE manager | 136 | * For INODE and NODE manager |
137 | */ | 137 | */ |
138 | #define XATTR_NODE_OFFSET (-1) /* | 138 | /* |
139 | * store xattrs to one node block per | 139 | * XATTR_NODE_OFFSET stores xattrs to one node block per file keeping -1 |
140 | * file keeping -1 as its node offset to | 140 | * as its node offset to distinguish from index node blocks. |
141 | * distinguish from index node blocks. | 141 | * But some bits are used to mark the node block. |
142 | */ | 142 | */ |
143 | #define XATTR_NODE_OFFSET ((((unsigned int)-1) << OFFSET_BIT_SHIFT) \ | ||
144 | >> OFFSET_BIT_SHIFT) | ||
143 | enum { | 145 | enum { |
144 | ALLOC_NODE, /* allocate a new node page if needed */ | 146 | ALLOC_NODE, /* allocate a new node page if needed */ |
145 | LOOKUP_NODE, /* look up a node without readahead */ | 147 | LOOKUP_NODE, /* look up a node without readahead */ |