diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2007-03-07 19:46:57 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-04-26 18:02:37 -0400 |
commit | e48edee2d8eab812f31f0ff62c6ba635ca2e1e21 (patch) | |
tree | 6afb9fe59a06ce621cb11d570e432e7d739376ff /fs/ocfs2/file.c | |
parent | 6af67d8205cf65fbaaa743edc7ebb46e486e34ff (diff) |
ocfs2: make room for unwritten extents flag
Due to the size of our group bitmaps, we'll never have a leaf node extent
record with more than 16 bits worth of clusters. Split e_clusters up so that
leaf nodes can get a flags field where we can mark unwritten extents.
Interior nodes whose length references all the child nodes beneath it can't
split their e_clusters field, so we use a union to preserve sizing there.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index f516619a3744..36176018b4b4 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -1127,7 +1127,6 @@ static int ocfs2_check_range_for_holes(struct inode *inode, loff_t pos, | |||
1127 | size_t count) | 1127 | size_t count) |
1128 | { | 1128 | { |
1129 | int ret = 0; | 1129 | int ret = 0; |
1130 | unsigned int extent_flags; | ||
1131 | u32 cpos, clusters, extent_len, phys_cpos; | 1130 | u32 cpos, clusters, extent_len, phys_cpos; |
1132 | struct super_block *sb = inode->i_sb; | 1131 | struct super_block *sb = inode->i_sb; |
1133 | 1132 | ||
@@ -1135,14 +1134,13 @@ static int ocfs2_check_range_for_holes(struct inode *inode, loff_t pos, | |||
1135 | clusters = ocfs2_clusters_for_bytes(sb, pos + count) - cpos; | 1134 | clusters = ocfs2_clusters_for_bytes(sb, pos + count) - cpos; |
1136 | 1135 | ||
1137 | while (clusters) { | 1136 | while (clusters) { |
1138 | ret = ocfs2_get_clusters(inode, cpos, &phys_cpos, &extent_len, | 1137 | ret = ocfs2_get_clusters(inode, cpos, &phys_cpos, &extent_len); |
1139 | &extent_flags); | ||
1140 | if (ret < 0) { | 1138 | if (ret < 0) { |
1141 | mlog_errno(ret); | 1139 | mlog_errno(ret); |
1142 | goto out; | 1140 | goto out; |
1143 | } | 1141 | } |
1144 | 1142 | ||
1145 | if (phys_cpos == 0 || (extent_flags & OCFS2_EXT_UNWRITTEN)) { | 1143 | if (phys_cpos == 0) { |
1146 | ret = 1; | 1144 | ret = 1; |
1147 | break; | 1145 | break; |
1148 | } | 1146 | } |