[Ocfs-tools-commits] smushran commits r221 - trunk/fsck
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Oct 15 13:50:39 CDT 2004
Author: smushran
Date: 2004-10-15 13:50:37 -0500 (Fri, 15 Oct 2004)
New Revision: 221
Modified:
trunk/fsck/utils.c
Log:
root dir bitmap alloc was not being accounted for
Modified: trunk/fsck/utils.c
===================================================================
--- trunk/fsck/utils.c 2004-10-14 23:58:42 UTC (rev 220)
+++ trunk/fsck/utils.c 2004-10-15 18:50:37 UTC (rev 221)
@@ -642,7 +642,7 @@
g_array_append_val(bits, i);
}
- if (bits) {
+ if (bits->len) {
LOG_WARNING("Unused bits (wasted space) detected in the global bitmap.");
print_bit_ranges(bits, "unused", bitmap);
}
@@ -895,9 +895,12 @@
}
/* Add bitmap entry for the dirnode itself */
- add_bm_data(dir->alloc_file_off, 1, dir->alloc_node,
- dir_offset,
- (dir->alloc_node == OCFS_INVALID_NODE_NUM ? bm_global : bm_dir));
+ if (dir->alloc_node == OCFS_INVALID_NODE_NUM)
+ add_bm_data(dir->alloc_file_off, OCFS_DEFAULT_DIR_NODE_SIZE,
+ dir->alloc_node, dir_offset, bm_global);
+ else
+ add_bm_data(dir->alloc_file_off, 1, dir->alloc_node,
+ dir_offset, bm_dir);
for (i = 0; i < dir->num_ent_used; i++) {
off = dir_offset;
More information about the Ocfs-tools-commits
mailing list