[Ocfs2-commits] mfasheh commits r1512 - branches/dlm-changes/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Sep 29 18:03:45 CDT 2004
Author: mfasheh
Date: 2004-09-29 18:03:44 -0500 (Wed, 29 Sep 2004)
New Revision: 1512
Modified:
branches/dlm-changes/src/suballoc.c
Log:
* fix a broken condition in ocfs_reserve_new_metadata
* move the best fit code in ocfs_block_group_find_clear_bits down closer to
the bottom of the loop as it was skipping a valid case.
Modified: branches/dlm-changes/src/suballoc.c
===================================================================
--- branches/dlm-changes/src/suballoc.c 2004-09-29 23:00:50 UTC (rev 1511)
+++ branches/dlm-changes/src/suballoc.c 2004-09-29 23:03:44 UTC (rev 1512)
@@ -436,7 +436,7 @@
#else
alloc_inode = ocfs_get_system_file_inode(osb, EXTENT_ALLOC_BITMAP_SYSTEM_INODE, osb->node_num);
#endif
- if (alloc_inode) {
+ if (!alloc_inode) {
status = -ENOMEM;
LOG_ERROR_STATUS(status);
goto bail;
@@ -536,15 +536,15 @@
/* we found a zero */
found++;
start++;
- if (found > best_size) {
- best_size = found;
- best_offset = start - found;
- }
} else {
/* got a zero after some ones */
found = 1;
start = offset + 1;
}
+ if (found > best_size) {
+ best_size = found;
+ best_offset = start - found;
+ }
/* we got everything we needed */
if (found == bits_wanted) {
/* LOG_TRACE_STR("Found it all!"); */
More information about the Ocfs2-commits
mailing list