[Ocfs2-commits] manish commits r930 - in trunk/src: . inc
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu May 20 20:57:52 CDT 2004
Author: manish
Date: 2004-05-20 19:57:50 -0500 (Thu, 20 May 2004)
New Revision: 930
Modified:
trunk/src/dlm.c
trunk/src/hash.c
trunk/src/inc/io.h
trunk/src/inode.c
trunk/src/io.c
trunk/src/journal.c
Log:
sector_t stuff uses %llu as format always now (and ugly unsigned long long
casts to go along with it)
Modified: trunk/src/dlm.c
===================================================================
--- trunk/src/dlm.c 2004-05-20 01:20:55 UTC (rev 929)
+++ trunk/src/dlm.c 2004-05-21 00:57:50 UTC (rev 930)
@@ -1217,8 +1217,8 @@
if (OCFS_BH_GET_DATA_WRITE_TRYLOCK(bh) == NULL) {
tries++;
ocfs_release_lockres(lockres); // ocfs_release_lock
- LOG_ERROR_ARGS("failed to get bh sem (%lu), attempt %d, trying again\n",
- bh->b_blocknr, tries);
+ LOG_ERROR_ARGS("failed to get bh sem (%llu), attempt %d, trying again\n",
+ (unsigned long long)bh->b_blocknr, tries);
ocfs_sleep(100);
goto again;
}
Modified: trunk/src/hash.c
===================================================================
--- trunk/src/hash.c 2004-05-20 01:20:55 UTC (rev 929)
+++ trunk/src/hash.c 2004-05-21 00:57:50 UTC (rev 930)
@@ -67,8 +67,8 @@
{
if (atomic_dec_and_lock(&sem->s_refcnt, &OcfsGlobalCtxt.bh_sem_hash_lock)) {
if (buffer_modified(sem->s_bh)) {
- LOG_ERROR_ARGS("putting last refcount of a modified buffer! block %lu\n",
- sem->s_bh->b_blocknr);
+ LOG_ERROR_ARGS("putting last refcount of a modified buffer! block %llu\n",
+ (unsigned long long)sem->s_bh->b_blocknr);
}
put_bh(sem->s_bh);
sem->s_bh = NULL;
@@ -166,9 +166,11 @@
sem->s_bh = bh;
}
if (sem->s_bh != bh) {
- LOG_ERROR_ARGS("bad bh_sem->bh: sem(%p,%lu,%lu), new(%p,%lu)\n",
- sem->s_bh, sem->s_bh ? sem->s_bh->b_blocknr : 0,
- sem->s_blocknr, bh, bh->b_blocknr);
+ LOG_ERROR_ARGS("bad bh_sem->bh: sem(%p,%llu,%llu), new(%p,%llu)\n",
+ sem->s_bh,
+ (unsigned long long)(sem->s_bh ? sem->s_bh->b_blocknr : 0),
+ (unsigned long long)sem->s_blocknr,
+ bh, (unsigned long long)bh->b_blocknr);
BUG();
}
break;
@@ -198,9 +200,9 @@
// sem->s_pid);
if (buffer_modified(sem->s_bh) && sem->s_pid == 0) {
- LOG_ERROR_ARGS("found a%s sem with a modified bh but no pid!!! (block=%lu)\n",
+ LOG_ERROR_ARGS("found a%s sem with a modified bh but no pid!!! (block=%llu)\n",
newsem != sem ? "n old" : " new",
- sem->s_bh->b_blocknr);
+ (unsigned long long)sem->s_bh->b_blocknr);
}
} else {
/* first pass. not found. do alloc */
@@ -423,8 +425,8 @@
/* only do one buffer at a time. */
spin_unlock(&OcfsGlobalCtxt.bh_sem_hash_lock);
- LOG_ERROR_ARGS("blocknr = %lu, pid = %d\n",
- sem->s_bh->b_blocknr, pid);
+ LOG_ERROR_ARGS("blocknr = %llu, pid = %d\n",
+ (unsigned long long)sem->s_bh->b_blocknr, pid);
ocfs_clear_buffer_modified(sem->s_bh);
ocfs_bh_sem_put(sem);
goto again;
@@ -462,8 +464,9 @@
sem = list_entry (iter, ocfs_bh_sem, s_list);
if (atomic_read(&sem->s_refcnt) < 1) {
if (sem->s_bh) {
- LOG_ERROR_ARGS("killing off bh_sem with bh still attached! block=%lu, count=%d\n",
- sem->s_bh->b_blocknr, atomic_read(&sem->s_bh->b_count));
+ LOG_ERROR_ARGS("killing off bh_sem with bh still attached! block=%llu, count=%d\n",
+ (unsigned long long)sem->s_bh->b_blocknr,
+ atomic_read(&sem->s_bh->b_count));
}
list_del(&sem->s_list);
list_add(&sem->s_list, &tmp);
@@ -506,7 +509,8 @@
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
- LOG_ENTRY_ARGS("(block=%lu, sem->s_pid=%d)\n", bh->b_blocknr,
+ LOG_ENTRY_ARGS("(block=%llu, sem->s_pid=%d)\n",
+ (unsigned long long)bh->b_blocknr,
sem->s_pid );
add_wait_queue(&sem->s_wait, &wait);
@@ -539,11 +543,13 @@
if (buffer_modified(bh) &&
sem->s_pid != current->pid && sem->s_pid != 0) {
#ifdef BH_SEM_DEBUG
- LOG_ERROR_ARGS("possible deadlock: block=%lu, owner=%d, this=%d, modifier='%s'\n",
- bh->b_blocknr, sem->s_pid, current->pid, sem->s_modifier);
+ LOG_ERROR_ARGS("possible deadlock: block=%llu, owner=%d, this=%d, modifier='%s'\n",
+ (unsigned long long)bh->b_blocknr,
+ sem->s_pid, current->pid, sem->s_modifier);
#else
- LOG_ERROR_ARGS("possible deadlock: block=%lu, owner=%d, this=%d\n",
- bh->b_blocknr, sem->s_pid, current->pid);
+ LOG_ERROR_ARGS("possible deadlock: block=%llu, owner=%d, this=%d\n",
+ (unsigned long long)bh->b_blocknr,
+ sem->s_pid, current->pid);
#endif
}
}
Modified: trunk/src/inc/io.h
===================================================================
--- trunk/src/inc/io.h 2004-05-20 01:20:55 UTC (rev 929)
+++ trunk/src/inc/io.h 2004-05-21 00:57:50 UTC (rev 930)
@@ -293,7 +293,8 @@
#define OCFS_DO_HEX_DUMP(bh) \
do { \
- printk("bh->b_blocknr = %lu, bh->b_data:\n", bh->b_blocknr); \
+ printk("bh->b_blocknr = %llu, bh->b_data:\n", \
+ (unsigned long long)bh->b_blocknr); \
for(i = 0; i < 512; i++) { \
printk("%03x ", bh->b_data[i]); \
if ( ((i+1) % 16) == 0 ) \
@@ -318,14 +319,15 @@
BUG();
} else if (bh->b_blocknr != 4720) {
OCFS_DO_HEX_DUMP(bh);
- printk("uh oh! dirnode is being written at blocknr=%lu!\n", bh->b_blocknr);
+ printk("uh oh! dirnode is being written at blocknr=%llu!\n", (unsigned long long)bh->b_blocknr);
BUG();
}
} else if (strncmp("FIL", fe->signature, strlen("FIL"))==0) {
if (fe->this_sector >> 9 != bh->b_blocknr) {
OCFS_DO_HEX_DUMP(bh);
- printk("uh oh! fe->this_sector (%u) != blocknr (%lu)\n",
- (__u32)(fe->this_sector>>9), bh->b_blocknr);
+ printk("uh oh! fe->this_sector (%u) != blocknr (%llu)\n",
+ (__u32)(fe->this_sector>>9),
+ (unsigned long long)bh->b_blocknr);
BUG();
} else if (fe->u.child_dirnode >> 9 == 4720) {
OCFS_DO_HEX_DUMP(bh);
Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c 2004-05-20 01:20:55 UTC (rev 929)
+++ trunk/src/inode.c 2004-05-21 00:57:50 UTC (rev 930)
@@ -841,8 +841,8 @@
__u64 entryOffset;
struct buffer_head *bh = NULL;
- LOG_ENTRY_ARGS ("(0x%p, %ld, 0x%p, %d)\n", inode, iblock, bh_result,
- create);
+ LOG_ENTRY_ARGS ("(0x%p, %llu, 0x%p, %d)\n", inode,
+ (unsigned long long)iblock, bh_result, create);
if (!inode) {
LOG_ERROR_STR ("bad inode");
@@ -852,7 +852,8 @@
osb = OCFS_SB(inode->i_sb);
if ((iblock << 9) > PATH_MAX + 1) {
- LOG_ERROR_ARGS ("file offset > PATH_MAX: %lu", iblock << 9);
+ LOG_ERROR_ARGS ("file offset > PATH_MAX: %llu",
+ (unsigned long long)iblock << 9);
goto bail;
}
@@ -873,8 +874,8 @@
if ((iblock << 9) >= (__s64)fe->alloc_size) {
OCFS_BH_PUT_DATA(bh);
- LOG_ERROR_ARGS ("file offset is outside the allocated size: %lu",
- iblock << 9);
+ LOG_ERROR_ARGS ("file offset is outside the allocated size: %llu",
+ (unsigned long long)iblock << 9);
goto bail;
}
@@ -904,8 +905,8 @@
__u32 len;
int oin_locked = 0;
- LOG_ENTRY_ARGS ("(0x%p, %ld, 0x%p, %d)\n", inode, iblock, bh_result,
- create);
+ LOG_ENTRY_ARGS ("(0x%p, %llu, 0x%p, %d)\n", inode,
+ (unsigned long long)iblock, bh_result, create);
if (S_ISLNK (inode->i_mode)) {
err = ocfs_symlink_get_block (inode, iblock, bh_result, create);
@@ -981,7 +982,7 @@
int err = 0;
struct inode *inode = mapping->host;
- LOG_ENTRY_ARGS("(block = %lu)\n", block);
+ LOG_ENTRY_ARGS("(block = %llu)\n", (unsigned long long)block);
if (!inode) {
LOG_ERROR_STR ("bmap: bad inode");
Modified: trunk/src/io.c
===================================================================
--- trunk/src/io.c 2004-05-20 01:20:55 UTC (rev 929)
+++ trunk/src/io.c 2004-05-21 00:57:50 UTC (rev 930)
@@ -197,8 +197,8 @@
my_timing_t begin, end;
#endif
- LOG_ENTRY_ARGS("(bh[0]->b_blocknr = %lu, nr=%d, flags=%u, inodes=%p)\n",
- bhs[0]->b_blocknr, nr, flags, inodes);
+ LOG_ENTRY_ARGS("(bh[0]->b_blocknr = %llu, nr=%d, flags=%u, inodes=%p)\n",
+ (unsigned long long)bhs[0]->b_blocknr, nr, flags, inodes);
#ifdef OCFS_DBG_TIMING
rdtsc (begin.lohi[0], begin.lohi[1]);
#endif
@@ -253,12 +253,14 @@
* buffer. */
if (!buffer_modified(bh)) {
printk("ocfs2: modified bit is NOT set on buffer "
- "(bh->b_blocknr = %lu)!\n", bh->b_blocknr);
+ "(bh->b_blocknr = %llu)!\n",
+ (unsigned long long)bh->b_blocknr);
BUG();
}
if (ocfs_bh_sem_lock_modify(bh) == OCFS_BH_SEM_WAIT_ON_MODIFY){
printk("ocfs2: someone else owns this buffer"
- "(bh->b_blocknr = %lu)!\n", bh->b_blocknr);
+ "(bh->b_blocknr = %llu)!\n",
+ (unsigned long long)bh->b_blocknr);
BUG();
}
ocfs_bh_sem_unlock(bh);
@@ -267,8 +269,8 @@
if (!(flags & OCFS_BH_IGNORE_JBD) && buffer_jbd(bh)) {
#ifdef VERBOSE_BH_JBD_TRACE
LOG_TRACE_ARGS("trying to write a jbd managed bh "
- "(blocknr = %lu), nr=%d\n",
- bh->b_blocknr, nr);
+ "(blocknr = %llu), nr=%d\n",
+ (unsigned long long)bh->b_blocknr, nr);
#endif
continue;
}
@@ -401,8 +403,9 @@
ignore_cache = 1;
} else if (flags & OCFS_BH_CACHED && !TEST_BH_SEQNUM(inodes[i], bh)) {
#ifdef VERBOSE_BH_SEQNUM_TRACE
- LOG_TRACE_ARGS("(read) bh (%lu) seqnum (%lu) does not "
- "match inode (%u)\n", bh->b_blocknr,
+ LOG_TRACE_ARGS("(read) bh (%llu) seqnum (%lu) does not "
+ "match inode (%u)\n",
+ (unsigned long long)bh->b_blocknr,
(bh->b_state & STATE_BIT_MASK) >> 19,
atomic_read(GET_INODE_CLEAN_SEQ(inodes[i])));
#endif
@@ -416,8 +419,8 @@
#ifdef VERBOSE_BH_JBD_TRACE
if (!(flags & OCFS_BH_CACHED) || ignore_cache)
LOG_TRACE_ARGS("trying to sync read a jbd "
- "managed bh (blocknr = %lu)\n",
- bh->b_blocknr);
+ "managed bh (blocknr = %llu)\n",
+ (unsigned long long)bh->b_blocknr);
#endif
continue;
}
@@ -427,8 +430,8 @@
/* This should probably be a BUG, or
* at least return an error. */
LOG_TRACE_ARGS("asking me to sync read a "
- "dirty buffer! (blocknr = %lu)\n",
- bh->b_blocknr);
+ "dirty buffer! (blocknr = %llu)\n",
+ (unsigned long long)bh->b_blocknr);
continue;
}
@@ -480,8 +483,8 @@
my_timing_t begin, end;
#endif
- LOG_ENTRY_ARGS("(bh[0]->b_blocknr = %lu, nr=%d, flags=%u, inode=%p)\n",
- bhs[0]->b_blocknr, nr, flags, inode);
+ LOG_ENTRY_ARGS("(bh[0]->b_blocknr = %llu, nr=%d, flags=%u, inode=%p)\n",
+ (unsigned long long)bhs[0]->b_blocknr, nr, flags, inode);
#ifdef OCFS_DBG_TIMING
rdtsc (begin.lohi[0], begin.lohi[1]);
#endif
@@ -536,12 +539,14 @@
* buffer. */
if (!buffer_modified(bh)) {
printk("ocfs2: modified bit is NOT set on buffer "
- "(bh->b_blocknr = %lu)!\n", bh->b_blocknr);
+ "(bh->b_blocknr = %llu)!\n",
+ (unsigned long long)bh->b_blocknr);
BUG();
}
if (ocfs_bh_sem_lock_modify(bh) == OCFS_BH_SEM_WAIT_ON_MODIFY){
printk("ocfs2: someone else owns this buffer"
- "(bh->b_blocknr = %lu)!\n", bh->b_blocknr);
+ "(bh->b_blocknr = %llu)!\n",
+ (unsigned long long)bh->b_blocknr);
BUG();
}
ocfs_bh_sem_unlock(bh);
@@ -550,8 +555,8 @@
if (!(flags & OCFS_BH_IGNORE_JBD) && buffer_jbd(bh)) {
#ifdef VERBOSE_BH_JBD_TRACE
LOG_TRACE_ARGS("trying to write a jbd managed bh "
- "(blocknr = %lu), nr=%d\n",
- bh->b_blocknr, nr);
+ "(blocknr = %llu), nr=%d\n",
+ (unsigned long long)bh->b_blocknr, nr);
#endif
continue;
}
@@ -684,8 +689,9 @@
if (flags & OCFS_BH_CACHED && inode &&
!TEST_BH_SEQNUM(inode, bh)) {
#ifdef VERBOSE_BH_SEQNUM_TRACE
- LOG_TRACE_ARGS("(read) bh (%lu) seqnum (%lu) does not "
- "match inode (%u)\n", bh->b_blocknr,
+ LOG_TRACE_ARGS("(read) bh (%llu) seqnum (%lu) does not "
+ "match inode (%u)\n",
+ (unsigned long long)bh->b_blocknr,
(bh->b_state & STATE_BIT_MASK) >> 19,
atomic_read(GET_INODE_CLEAN_SEQ(inode)));
#endif
@@ -699,8 +705,8 @@
#ifdef VERBOSE_BH_JBD_TRACE
if (!(flags & OCFS_BH_CACHED) || ignore_cache)
LOG_TRACE_ARGS("trying to sync read a jbd "
- "managed bh (blocknr = %lu)\n",
- bh->b_blocknr);
+ "managed bh (blocknr = %llu)\n",
+ (unsigned long long)bh->b_blocknr);
#endif
continue;
}
@@ -710,8 +716,8 @@
/* This should probably be a BUG, or
* at least return an error. */
LOG_TRACE_ARGS("asking me to sync read a "
- "dirty buffer! (blocknr = %lu)\n",
- bh->b_blocknr);
+ "dirty buffer! (blocknr = %llu)\n",
+ (unsigned long long)bh->b_blocknr);
continue;
}
Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c 2004-05-20 01:20:55 UTC (rev 929)
+++ trunk/src/journal.c 2004-05-21 00:57:50 UTC (rev 930)
@@ -536,9 +536,9 @@
CLEAR_BH_SEQNUM(bh);
if (buffer_jbd(bh))
- LOG_ERROR_ARGS("Buffer %lu has JBD bit set "
+ LOG_ERROR_ARGS("Buffer %llu has JBD bit set "
"after a journal_forget!\n",
- bh->b_blocknr);
+ (unsigned long long)bh->b_blocknr);
lock_buffer(bh);
clear_buffer_uptodate(bh);
@@ -638,9 +638,9 @@
int i;
int found = 0;
- LOG_ENTRY_ARGS("(bh->b_blocknr=%lu, type=%d (\"%s\"), "
+ LOG_ENTRY_ARGS("(bh->b_blocknr=%llu, type=%d (\"%s\"), "
"bh->b_size = %hu)\n",
- bh->b_blocknr, type,
+ (unsigned long long)bh->b_blocknr, type,
(type == OCFS_JOURNAL_ACCESS_CREATE) ?
"OCFS_JOURNAL_ACCESS_CREATE" :
"OCFS_JOURNAL_ACCESS_WRITE", bh->b_size);
@@ -648,7 +648,8 @@
/* we can safely remove this assertion after testing. */
if (!buffer_uptodate(bh)) {
printk("ocfs2: giving me a buffer that's not uptodate!\n");
- printk("ocfs2: b_blocknr=%lu\n", bh->b_blocknr);
+ printk("ocfs2: b_blocknr=%llu\n",
+ (unsigned long long)bh->b_blocknr);
BUG();
}
/* by taking a "read" lock, we prevent anyone from doing any
@@ -683,13 +684,15 @@
*
* Otherwise, we make a copy of the data in the buffer. */
if (!buffer_jbd(bh) && type == OCFS_JOURNAL_ACCESS_CREATE) {
- LOG_TRACE_ARGS("Making block (%lu) a forget block at "
- "position %d\n", bh->b_blocknr, i);
+ LOG_TRACE_ARGS("Making block (%llu) a forget block at "
+ "position %d\n",
+ (unsigned long long)bh->b_blocknr, i);
handle->co_buffs[i].data = NULL;
handle->co_buffs[i].forget = 1;
} else {
- LOG_TRACE_ARGS("Copying block (%lu) out to position"
- "%d\n", bh->b_blocknr, i);
+ LOG_TRACE_ARGS("Copying block (%llu) out to position"
+ "%d\n",
+ (unsigned long long)bh->b_blocknr, i);
/* This malloc should just be a slab. */
handle->co_buffs[i].data = ocfs_malloc(bh->b_size);
if (handle->co_buffs[i].data == NULL) {
@@ -740,7 +743,8 @@
int status = -1;
int i;
- LOG_ENTRY_ARGS("(bh->b_blocknr=%lu)\n", bh->b_blocknr);
+ LOG_ENTRY_ARGS("(bh->b_blocknr=%llu)\n",
+ (unsigned long long)bh->b_blocknr);
if (handle->num_buffs >= handle->max_buffs) {
LOG_ERROR_STR("Cannot add buffer to full transaction!");
@@ -753,8 +757,9 @@
*/
for(i = 0; i < handle->num_buffs; i++) {
if (handle->buffs[i] == bh) {
- LOG_TRACE_ARGS("block (%lu) already added to dirty " \
- "list!\n", bh->b_blocknr);
+ LOG_TRACE_ARGS("block (%llu) already added to dirty "
+ "list!\n",
+ (unsigned long long)bh->b_blocknr);
goto call_jbd;
}
}
@@ -773,7 +778,8 @@
status = journal_dirty_metadata(handle->k_handle, bh);
if (status < 0) {
LOG_ERROR_ARGS("Could not dirty metadata buffer. "
- "(bh->b_blocknr=%lu)\n", bh->b_blocknr);
+ "(bh->b_blocknr=%llu)\n",
+ (unsigned long long)bh->b_blocknr);
LOG_TRACE_ARGS("Setting handle->buffs[%d] = NULL\n", i);
brelse(bh);
handle->buffs[i] = NULL;
@@ -798,7 +804,8 @@
{
ocfs_journal_lock *lock;
- LOG_ENTRY_ARGS("(id=%lu, type=%u, flags=%u, bh=%p)\n", bh->b_blocknr, type, flags, bh);
+ LOG_ENTRY_ARGS("(id=%llu, type=%u, flags=%u, bh=%p)\n",
+ (unsigned long long)bh->b_blocknr, type, flags, bh);
lock = ocfs_malloc(sizeof(ocfs_journal_lock));
if (lock == NULL) {
More information about the Ocfs2-commits
mailing list