[Ocfs2-commits] jlbec commits r871 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Apr 27 20:11:15 CDT 2004
Author: jlbec
Date: 2004-04-27 19:11:13 -0500 (Tue, 27 Apr 2004)
New Revision: 871
Modified:
trunk/src/alloc.c
trunk/src/dlm.c
Log:
* Fix all %u.%u in alloc.c
* Fix stupid __u32 k in ocfs_allocate_extent()
Modified: trunk/src/alloc.c
===================================================================
--- trunk/src/alloc.c 2004-04-27 22:20:50 UTC (rev 870)
+++ trunk/src/alloc.c 2004-04-28 00:11:13 UTC (rev 871)
@@ -504,7 +504,7 @@
LOG_TRACE_ARGS("Free Log Details (type = %d):\n", Type);
LOG_TRACE_ARGS("num_updates = %u\n", FreeLog->num_updates);
for(i = 0; i < FreeLog->num_updates; i++)
- LOG_TRACE_ARGS("(upd=%u, length=%u.%u, file_off=%u.%u, type=%d, node_num=%d)\n", i, HILO(FreeLog->update[i].length), HILO(FreeLog->update[i].file_off), FreeLog->update[i].type, FreeLog->update[i].node_num);
+ LOG_TRACE_ARGS("(upd=%u, length=%llu, file_off=%llu, type=%d, node_num=%d)\n", i, FreeLog->update[i].length, FreeLog->update[i].file_off, FreeLog->update[i].type, FreeLog->update[i].node_num);
switch (Type) {
case DISK_ALLOC_DIR_NODE:
@@ -884,7 +884,7 @@
void *buf;
ocfs_file_entry * fe = NULL, *real_fe = NULL;
- LOG_ENTRY_ARGS("(0x%08x, 0x%08x, %u.%u, %u.%u\n", osb, fe, HILO(disk_off), HILO(length));
+ LOG_ENTRY_ARGS("(0x%08x, 0x%08x, %llu, %llu\n", osb, fe, disk_off, length);
/* too complicated to deal with both reads and writes to the structure */
/* just save off a copy and replace the fe_bh with the new data at the end */
@@ -1135,7 +1135,7 @@
/* Update the File Entry Extent */
fe->local_ext = false;
- LOG_TRACE_ARGS("fe->alloc_size = %u.%u\n", HILO(fe->alloc_size));
+ LOG_TRACE_ARGS("fe->alloc_size = %llu\n", fe->alloc_size);
fe->extents[0].file_off = 0;
fe->extents[0].num_bytes = fe->alloc_size + length;
fe->extents[0].disk_off = physicalOffset;
@@ -1163,14 +1163,14 @@
{
int status = 0;
bool IncreaseTreeDepth = false;
- __u32 k = 0, i;
+ int k = 0, i;
ocfs_extent_group *extent = NULL, *extent_header = NULL;
struct buffer_head *extent_bh = NULL, *extent_header_bh = NULL;
bool UpdateParent = false;
__u64 newExtentOff, up_ptr;
ocfs_file_entry * FileEntry = NULL;
- LOG_ENTRY_ARGS("(actualDiskOffset=%u.%u, actualLength=%u.%u)\n", actualDiskOffset, actualLength);
+ LOG_ENTRY_ARGS("(actualDiskOffset=%llu, actualLength=%llu)\n", actualDiskOffset, actualLength);
FileEntry = (ocfs_file_entry *)OCFS_BH_GET_DATA_WRITE(fe_bh); /* write */
OCFS_ASSERT (FileEntry);
@@ -1625,7 +1625,7 @@
}
if (IS_VALID_EXTENT_DATA(cur_extent)) {
- LOG_TRACE_ARGS("found some data to free (%u.%u)\n", HI(cur_extent->this_ext), LO(cur_extent->this_ext));
+ LOG_TRACE_ARGS("found some data to free (%llu)\n", cur_extent->this_ext);
for(i = 0; i < cur_extent->next_free_ext; i++) {
/* Free the data associated with each header */
ext = &cur_extent->extents[i];
@@ -1643,7 +1643,7 @@
/* Did we already kill all his children, or
* are they already dead? */
if (cur_extent->next_free_ext == 0) {
- LOG_TRACE_ARGS("Popping this header (%u.%u)\n", HI(cur_extent->this_ext), LO(cur_extent->this_ext), cur_extent->next_free_ext);
+ LOG_TRACE_ARGS("Popping this header (%llu)\n", cur_extent->this_ext);
goto free_meta;
}
@@ -2022,7 +2022,7 @@
* to actually delete
* *anything* from
* this extent. */
- LOG_TRACE_ARGS("Not deleting extent %d, disk_off = %u.%u, num_bytes = %u.%u, file_off = %u.%u\n", i, HILO(ext->disk_off), HILO(ext->num_bytes), HILO(ext->file_off));
+ LOG_TRACE_ARGS("Not deleting extent %d, disk_off = %llu, num_bytes = %llu, file_off = %llu\n", i, ext->disk_off, ext->num_bytes, ext->file_off);
done = true;
goto skip_bitmap_add;
}
@@ -2094,9 +2094,8 @@
* are they already dead? */
if (AllocExtent->next_free_ext == 0) {
/*Ok, we're done with this guy, pop the stack*/
- LOG_TRACE_ARGS("Popping this header (%u.%u)\n",
- HI(AllocExtent->this_ext),
- LO(AllocExtent->this_ext),
+ LOG_TRACE_ARGS("Popping this header (%llu)\n",
+ AllocExtent->this_ext,
AllocExtent->next_free_ext);
status = ocfs_handle_add_commit_bits(handle, 1, AllocExtent->alloc_file_off, AllocExtent->alloc_node, DISK_ALLOC_EXTENT_NODE);
@@ -2114,9 +2113,8 @@
/* changed this from > to >= */
/* Do we just delete this whole part of the tree? */
if (AllocExtent->extents[0].file_off >= newsize) {
- LOG_TRACE_ARGS("whacking this tree: (%u.%u)\n",
- HI(AllocExtent->this_ext),
- LO(AllocExtent->this_ext));
+ LOG_TRACE_ARGS("whacking this tree: (%llu)\n",
+ AllocExtent->this_ext);
if (AllocExtent->extents[0].file_off ==newsize)
done = true;
@@ -2369,7 +2367,7 @@
goto finally;
}
- LOG_TRACE_ARGS("non-local extents. taking that code path, truncating to alloc_size of (%u.%u)\n", HI(alloc_size), LO(alloc_size));
+ LOG_TRACE_ARGS("non-local extents. taking that code path, truncating to alloc_size of (%llu)\n", alloc_size);
/* non-local extents */
updated_lep = false;
@@ -2409,7 +2407,7 @@
}
/* Ok, update the FileEntry */
- LOG_TRACE_ARGS("Alright. num_bytes = (%u,%u), alloc_size = (%u,%u) file_off = (%u,%u)\n", HI(FileEntry->extents[i].num_bytes), LO(FileEntry->extents[i].num_bytes), HI(alloc_size), LO(alloc_size), HI(FileEntry->extents[i].file_off), LO(FileEntry->extents[i].file_off));
+ LOG_TRACE_ARGS("Alright. num_bytes = (%llu), alloc_size = (%llu) file_off = (%llu)\n", FileEntry->extents[i].num_bytes, alloc_size, FileEntry->extents[i].file_off);
FileEntry->extents[i].num_bytes = alloc_size;
for (j=0; j < i; j++)
FileEntry->extents[i].num_bytes += FileEntry->extents[j].num_bytes;
@@ -2506,9 +2504,9 @@
}
if (!INODE_JOURNAL(inode) && Vbo >= (__s64) fe->alloc_size) {
- LOG_ERROR_ARGS ("vbo=%u.%u, fe->alloc_sz=%u.%u oin->alloc_size=%u.%u",
- HILO (Vbo), HILO (fe->alloc_size),
- HILO (OCFS_I(inode)->alloc_size));
+ LOG_ERROR_ARGS ("vbo=%llu, fe->alloc_sz=%llu alloc_size=%llu",
+ Vbo, fe->alloc_size,
+ OCFS_I(inode)->alloc_size);
status = -EFAIL;
goto finally;
}
@@ -2541,12 +2539,12 @@
if (remainingLength > 0) {
if (!OcfsExtent->next_data_ext) {
- LOG_ERROR_ARGS ("vbo=%u.%u, "
- "alloc_size=%u.%u, "
- " thisext=%u.%u",
- HILO(localVbo),
- HILO(OCFS_I(inode)->alloc_size),
- HILO(OcfsExtent->this_ext));
+ LOG_ERROR_ARGS ("localVbo=%llu, "
+ "alloc_size=%llu, "
+ " thisext=%llu",
+ localVbo,
+ OCFS_I(inode)->alloc_size,
+ OcfsExtent->this_ext);
status = -EFAIL;
goto finally;
}
@@ -2832,7 +2830,7 @@
goto leave;
}
- LOG_TRACE_ARGS ("byte offset=%u\n", bitoffset);
+ LOG_TRACE_ARGS ("setting at bit offset=%u\n", bitoffset);
ocfs_set_bits (&osb->cluster_bitmap, bitoffset, ClusterCount);
@@ -2924,7 +2922,7 @@
bool needs_uninit = false;
bool delay_lockrel = false;
- LOG_ENTRY_ARGS("(FileSize = (%u.%u), Type=%d)\n", HILO(FileSize),Type);
+ LOG_ENTRY_ARGS("(FileSize = (%llu), Type=%d)\n", FileSize,Type);
ocfs_down_sem (&(osb->dir_alloc_lock), true);
ocfs_down_sem (&(osb->file_alloc_lock), true);
@@ -3096,8 +3094,8 @@
/* this can just fall through */
if (*file_off == 0) {
- LOG_TRACE_ARGS ("offset=%u.%u, type=%x, blksz=%u, foundbit=%u\n",
- HILO (*file_off), Type, blockSize, foundBit);
+ LOG_TRACE_ARGS ("offset=%llu, type=%x, blksz=%u, foundbit=%u\n",
+ *file_off, Type, blockSize, foundBit);
}
leave:
@@ -3524,8 +3522,8 @@
/* we try to use find_contig_space_from_bitmap here for now. */
alloc_bytes = ocfs_local_alloc_window_bits(osb) * csize;
- LOG_TRACE_ARGS("Allocating %u.%u bytes (%u clusters) for a "
- "new window.\n", HILO(alloc_bytes),
+ LOG_TRACE_ARGS("Allocating %llu bytes (%u clusters) for a "
+ "new window.\n", alloc_bytes,
ocfs_local_alloc_window_bits(osb));
status = ocfs_find_contiguous_space_from_bitmap(osb, alloc_bytes,
@@ -3817,8 +3815,8 @@
__u32 csize = osb->vol_layout.cluster_size;
bool use_global = true;
- LOG_ENTRY_ARGS("(file_size = (%u.%u), handle = 0x%x, sysfile = %s)\n",
- HILO(file_size), handle, sysfile ? "true" : "false");
+ LOG_ENTRY_ARGS("(file_size = (%llu), handle = 0x%x, sysfile = %s)\n",
+ file_size, handle, sysfile ? "true" : "false");
if (file_size == 0) {
LOG_ERROR_STR ("asking for an allocation of zero bytes...");
@@ -3859,8 +3857,8 @@
if (status < 0)
LOG_ERROR_STATUS(status);
- LOG_TRACE_ARGS("Returning *cluster_off = %u.%u, *cluster_count"
- "= %u.%u\n", HILO(*cluster_off), HILO(*cluster_count));
+ LOG_TRACE_ARGS("Returning *cluster_off = %llu, *cluster_count"
+ "= %llu\n", *cluster_off, *cluster_count);
bail:
LOG_EXIT_STATUS(status);
Modified: trunk/src/dlm.c
===================================================================
--- trunk/src/dlm.c 2004-04-27 22:20:50 UTC (rev 870)
+++ trunk/src/dlm.c 2004-04-28 00:11:13 UTC (rev 871)
@@ -1237,7 +1237,7 @@
lockres->master_node_num, lockres->lock_type, flags|extra_lock_flags);
#ifdef VERBOSE_LOCKING_TRACE
- printk("lockres: lockid=%u.%u, this=%d, master=%d, locktype=%d, flags=%08x, ronode=%d, romap=%08x\n",
+ printk("lockres: lockid=%llu, this=%d, master=%d, locktype=%d, flags=%08x, ronode=%d, romap=%08x\n",
lockres->sector_num, osb->node_num, lockres->master_node_num, lockres->lock_type,
flags|extra_lock_flags, lockres->readonly_node, lockres->readonly_map);
#endif
More information about the Ocfs2-commits
mailing list