Request to remove -Wfno-format
While porting to 2.6 I am just using the 2.6 build system and putting off the autoconfig stuff till later. As a result of this I am seeing a ton of additional warning messages due to the fact that the ocfs2 build system is including "-Wno-format".
Is there a good reason for adding the "-Wno-format" option to the build?
The kind of mistakes that are being ignored are ==>
LOG_TRACE_ARGS("found some data to free (%u.%u)\n",
HI(cur_extent->this_ext), LO(cur_extent->this_ext));
alloc.c: In function `ocfs_kill_this_tree':
alloc.c:1620: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:1620: warning: unsigned int format, long unsigned int arg (arg 3) alloc.c:1638: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:1638: warning: unsigned int format, long unsigned int arg (arg 3)
and ==>
LOG_TRACE_ARGS("Popping this header (%u.%u)\n",
HI(AllocExtent->this_ext),
LO(AllocExtent->this_ext),
AllocExtent->next_free_ext);alloc.c:2079: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:2079: warning: unsigned int format, long unsigned int arg (arg 3) alloc.c:2079: warning: too many arguments for format alloc.c:2099: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:2099: warning: unsigned int format, long unsigned int arg (arg 3)
If it is ok, I would like to make the build more strict, and treat each of the warnings as bugs.
--rusty
Quoted 30 lines · Rusty Lynch
While porting to 2.6 I am just using the 2.6 build system and putting off the autoconfig stuff till later. As a result of this I am seeing a ton of additional warning messages due to the fact that the ocfs2 build system is including "-Wno-format".
Is there a good reason for adding the "-Wno-format" option to the build?
The kind of mistakes that are being ignored are ==>
LOG_TRACE_ARGS("found some data to free (%u.%u)\n",
HI(cur_extent->this_ext), LO(cur_extent->this_ext));
alloc.c: In function `ocfs_kill_this_tree':
alloc.c:1620: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:1620: warning: unsigned int format, long unsigned int arg (arg 3) alloc.c:1638: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:1638: warning: unsigned int format, long unsigned int arg (arg 3)and ==>
LOG_TRACE_ARGS("Popping this header (%u.%u)\n",HI(AllocExtent->this_ext), LO(AllocExtent->this_ext), AllocExtent->next_free_ext);alloc.c:2079: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:2079: warning: unsigned int format, long unsigned int arg (arg 3) alloc.c:2079: warning: too many arguments for format alloc.c:2099: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:2099: warning: unsigned int format, long unsigned int arg (arg 3)
Quoted 4 lines
If it is ok, I would like to make the build more strict, and treat each of the warnings as bugs.
--rusty
and here is a quick patch to remove the flag
Makefile +1 -1
@@ -2,7 +2,7 @@ include $(TOPDIR)/Preamble.make -WARNINGS = -Wall -Wstrict-prototypes -Wno-format +WARNINGS = -Wall -Wstrict-prototypes ifneq ($(OCFS_PROCESSOR),x86_64) WARNINGS += -Wmissing-prototypes -Wmissing-declarations
Quoted 6 lines · Rusty Lynch
While porting to 2.6 I am just using the 2.6 build system and putting off the autoconfig stuff till later. As a result of this I am seeing a ton of additional warning messages due to the fact that the ocfs2 build system is including "-Wno-format".
Is there a good reason for adding the "-Wno-format" option to the build?
No good reason. Fixing the LOG messages for proper formats was deemed less important than fixing real functionality bugs, so -Wno-format is used to cut down on the warning noise.
Quoted 23 lines
The kind of mistakes that are being ignored are ==>
LOG_TRACE_ARGS("found some data to free (%u.%u)\n",
HI(cur_extent->this_ext), LO(cur_extent->this_ext));
alloc.c: In function `ocfs_kill_this_tree':
alloc.c:1620: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:1620: warning: unsigned int format, long unsigned int arg (arg 3) alloc.c:1638: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:1638: warning: unsigned int format, long unsigned int arg (arg 3)and ==>
LOG_TRACE_ARGS("Popping this header (%u.%u)\n",HI(AllocExtent->this_ext), LO(AllocExtent->this_ext), AllocExtent->next_free_ext);alloc.c:2079: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:2079: warning: unsigned int format, long unsigned int arg (arg 3) alloc.c:2079: warning: too many arguments for format alloc.c:2099: warning: unsigned int format, long unsigned int arg (arg 2) alloc.c:2099: warning: unsigned int format, long unsigned int arg (arg 3)
Quoted 2 lines
If it is ok, I would like to make the build more strict, and treat each of the warnings as bugs.
Go for it, the cleanup is welcome. While you're at it, getting rid of the HI()/LO() nonsense would be good too.
-Manish
Quoted 3 lines · Rusty Lynch
(There are a couple of places where I cast a
size_tto int to stop warnings on 64bit machines... can't think of a cleaner way of printingsize_tsince prink doesn't directly handle the type.)
%Zu works for size_t.
-Manish
On Thu, Feb 12, 2004 at 12:30:00PM -0800, Manish Singh wrote:
<snip>
Quoted 5 lines
Quoted 2 lines
If it is ok, I would like to make the build more strict, and treat each of the warnings as bugs.
Go for it, the cleanup is welcome. While you're at it, getting rid of the HI()/LO() nonsense would be good too.
I didn't remove the use of HI()/LO(), but here is a patch that both removes -Wno-format and also fixes the many formating warnings that you see if building with tracing enabled.
The patch is rather large, but it just does the same thing over and over.
(There are a couple of places where I cast a size_t to int to stop warnings on 64bit machines... can't think of a cleaner way of printing size_t since prink doesn't directly handle the type.)
--rusty
super.c +5 -5
@@ -326,7 +326,7 @@ inode =NULL ; } -LOG_EXIT_PTR (0 ); +LOG_EXIT_PTR (NULL );return NULL ; }/* ocfs_read_super */
@@ -355,7 +355,7 @@ goto bail; } -LOG_TRACE_ARGS ("strlen(options) = %d, options = \"%s\"\n" ,strlen (options), options); +LOG_TRACE_ARGS ("strlen(options) = %d, options = \"%s\"\n" , (int )strlen (options), options);#ifdef LINUX_2_5 while ( (c =strsep (&options,"," )) !=NULL )
@@ -675,7 +675,7 @@*/ static void ocfs_put_super (struct super_block *sb) { -LOG_ENTRY_ARGS ("(0x%08x)\n" , sb); +LOG_ENTRY_ARGS ("(%p)\n" , sb);ocfs_sync_blockdev (sb);LOG_TRACE_STR ("put super... do nothing! DONE!!!!" );
@@ -700,7 +700,7 @@ocfs_bitmap_lock *bm_lock =NULL ;struct buffer_head *bh =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n" , sb, buf); +LOG_ENTRY_ARGS ("(%p, %p)\n" , sb, buf); osb = (ocfs_super *)OCFS_GENERIC_SB_P (sb); numbits = osb->cluster_bitmap.validbits;
@@ -1064,7 +1064,7 @@__u32 tempmap;int i; -LOG_ENTRY_ARGS ("(0x%08x)\n" , sb); +LOG_ENTRY_ARGS ("(%p)\n" , sb);if (sb ==NULL ) {LOG_ERROR_STATUS (status = -EFAIL );
extmap.c +9 -9
@@ -245,7 +245,7 @@ bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_coalesce_extent_map_entry */
@@ -304,7 +304,7 @@spin_unlock (&(map->lock)); bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_extent_map_add */
@@ -385,7 +385,7 @@spin_unlock (&(map->lock)); bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_extent_map_lookup */
@@ -430,7 +430,7 @@spin_unlock (&(map->lock)); bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_extent_map_next_entry */
@@ -519,7 +519,7 @@ *SectorCount = (LO (LiSectorCount)) <<OCFS_LOG_SECTOR_SIZE ; } -LOG_EXIT_ULONG (Results); +LOG_EXIT_STATUS (Results);return Results; }/* ocfs_get_next_extent_map_entry */
@@ -566,7 +566,7 @@ } } -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_lookup_extent_map_entry */
@@ -648,7 +648,7 @@if ((OcfsExtent->next_free_ext !=OCFS_MAX_DATA_EXTENTS ) && (*remainingLength)) { -LOG_ERROR_ARGS ("next_free_extent=%d, rem_len=%u.%u" , +LOG_ERROR_ARGS ("next_free_extent=%d, rem_len=%lu.%lu" , OcfsExtent->next_free_ext,HILO (*remainingLength)); }else status =0 ;
@@ -689,10 +689,10 @@ ret =ocfs_extent_map_add (Map, ((__s64 ) Vbo), ((__s64 ) Lbo), ((__s64 ) ByteCount));if (!ret) -LOG_ERROR_ARGS ("fileoff=%u.%u, diskoff=%u.%u, len=%u.%u" , +LOG_ERROR_ARGS ("fileoff=%lu.%lu, diskoff=%lu.%lu, len=%lu.%lu" ,HILO (Vbo),HILO (Lbo),HILO (ByteCount)); -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_add_extent_map_entry */
inode.c +29 -29
193 lines not on this page · raw message
heartbeat.c +2 -2
@@ -56,7 +56,7 @@struct buffer_head **pub_bh = &osb->cfg_bhs[publish_idx];__u64 node_publ_off = osb->vol_layout.publ_sect_off + (osb->node_num * osb->sect_size); -LOG_ENTRY_ARGS ("(0x%08x, %u, %s)\n" , osb, flag, +LOG_ENTRY_ARGS ("(%p, %u, %s)\n" , osb, flag, read_publish ?"true" :"false" );if (flag &HEARTBEAT_METHOD_DISK ) {
@@ -124,7 +124,7 @@__u32 i;__u32 num_nodes; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u)\n" , osb, bhs, first_time); +LOG_ENTRY_ARGS ("(%p, %p, %u)\n" , osb, bhs, first_time); num_nodes =OCFS_MAXIMUM_NODES ; node_map = &(osb->vol_node_map);
proc.c +4 -4
@@ -441,13 +441,13 @@ *(ptr -1 ) ='\0' ;#define PROC_STATS \ - "File open count : %d.%u\n" \ + "File open count : %lu.%lu\n" \ "Publish map : %s\n" \ "Number of nodes : %u\n" \ "Cluster size : %u\n" \ - "Volume size : %u.%u\n" \ - "Dir node size : %u.%u\n" \ - "File node size : %u.%u\n" \ + "Volume size : %lu.%lu\n" \ + "Dir node size : %lu.%lu\n" \ + "File node size : %lu.%lu\n" \ "Failed Large Allocs : %u\n" \ "Retry Large Allocs : %u\n" \ "Inode Hash Objects : %u\n"
dcache.c +2 -2
@@ -48,7 +48,7 @@struct buffer_head *fe_bh =NULL ;int needs_trunc; -LOG_ENTRY_ARGS ("(0x%08x, %d, '%*s')\n" , dentry, flags, +LOG_ENTRY_ARGS ("(%p, %d, '%*s')\n" , dentry, flags, dentry->d_name.len, dentry->d_name.name); if ((inode = dentry->d_inode) == NULL ||
@@ -176,7 +176,7 @@struct list_head *list;int ret, done; -LOG_ENTRY_ARGS ("(0x%08x, '%*s')\n" , dentry, +LOG_ENTRY_ARGS ("(%p, '%*s')\n" , dentry, dentry->d_name.len, dentry->d_name.name);spin_lock (&dcache_lock);
io.c +21 -21
150 lines not on this page · raw message
ioctl.c +1 -1
@@ -40,7 +40,7 @@extern char *ocfs_version;int ret =0 ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %lu)\n" , inode, filp, cmd, arg); +LOG_ENTRY_ARGS ("(%p, %p, %u, %lu)\n" , inode, filp, cmd, arg);if (_IOC_TYPE (cmd) !=OCFS_IOC_MAGIC ) { ret = -ENOTTY ;
nm.c +12 -12
@@ -158,12 +158,12 @@ocfs_publish * publish;struct ocfs_sched_vote *sv =NULL ; -LOG_ENTRY_ARGS ("(vote_node = %d, bh = 0x%x)\n" , vote_node, bh); +LOG_ENTRY_ARGS ("(vote_node = %d, bh = %p)\n" , vote_node, bh); publish = (ocfs_publish *)OCFS_BH_GET_DATA_READ (bh);/* read */ if (osb->last_publ_seq_num[vote_node] == publish->publ_seq_num){ -LOG_TRACE_ARGS ("Already voted on node %d, seqnum (%u.%u)\n" , +LOG_TRACE_ARGS ("Already voted on node %d, seqnum (%lu.%lu)\n" , vote_node,HILO (publish->publ_seq_num));OCFS_BH_PUT_DATA (bh); status =0 ;
@@ -310,7 +310,7 @@atomic_inc (&osb->nm_init); } -LOG_TRACE_ARGS ("Publish map: 0x%08x\n" ,LO (osb->publ_map)); +LOG_TRACE_ARGS ("Publish map: %lu\n" ,LO (osb->publ_map));/* map of local node */ curr_node_map = (__u64) ((__u64 )1 << osb->node_num);
@@ -433,7 +433,7 @@int status =0 ;ocfs_file_entry *fe; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, 0x%08x)\n" , osb, lock_res, bh); +LOG_ENTRY_ARGS ("(%p, %p, %p)\n" , osb, lock_res, bh);/* Don't sync-read if we already own the lock as it may not * have hit disk yet. */
@@ -447,7 +447,7 @@ status =ocfs_acquire_lockres_ex (lock_res, timeout);if (status <0 ) { -LOG_TRACE_ARGS ("Timedout locking lockres for id: %u.%u\n" , +LOG_TRACE_ARGS ("Timedout locking lockres for id: %lu.%lu\n" ,HILO (lock_res->sector_num)); goto finally; }
@@ -487,7 +487,7 @@ocfs_lock_res *tmp_lockres =NULL ;struct buffer_head *tmpbh =NULL , **b =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, %u.%u, 0x%08x, 0x%08x, 0x%08x)\n" , osb, +LOG_ENTRY_ARGS ("(%p, %lu.%lu, %p, %p, %p)\n" , osb,HI (lock_id),LO (lock_id), lockres, bh, updated);if (bh ==NULL )
@@ -720,7 +720,7 @@__u64 lock_id, seq_num;int needs_trunc =0 ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n" , osb, ctxt); +LOG_ENTRY_ARGS ("(%p, %p)\n" , osb, ctxt);if (!publish && !dlm_msg) { status = -EINVAL ;
@@ -743,7 +743,7 @@ } lockflags = (lock_id >= osb->vol_layout.bitmap_off ?OCFS_BH_CACHED :0 ); -LOG_TRACE_ARGS ("node=%u, id=%u.%u, seq=%u.%u\n" , node_num, +LOG_TRACE_ARGS ("node=%u, id=%lu.%lu, seq=%lu.%lu\n" , node_num,HILO (lock_id),HILO (seq_num));if (disk_vote) {
@@ -765,7 +765,7 @@ }else { status =ocfs_acquire_lockres_ex (lockres, (OCFS_NM_HEARTBEAT_TIME /2 ));if (status <0 ) { -LOG_TRACE_ARGS ("Timedout locking lockres for id: %u.%u\n" , +LOG_TRACE_ARGS ("Timedout locking lockres for id: %lu.%lu\n" ,HILO (lockres->sector_num));ocfs_put_lockres (lockres); goto leave;
@@ -775,9 +775,9 @@ vote_type =get_process_vote_action (osb, lockres, node_num, flags, status, &master_alive, &oin); -printk ("ocfs_process_vote: %s request for lockid: %u.%u, action: %s, type: %s\n" , +printk ("ocfs_process_vote: %s request for lockid: %lu.%lu, action: %s, type: %s\n" , flags &FLAG_RELEASE_LOCK ?"RELEASE" : - (flags &FLAG_ACQUIRE_LOCK ?"ACQUIRE" :"MODIFY" ), lock_id, + (flags &FLAG_ACQUIRE_LOCK ?"ACQUIRE" :"MODIFY" ),HILO (lock_id), process_vote_strings[vote_type], disk_vote ?"disk vote" :"net vote" );
@@ -938,7 +938,7 @@* him the lock if it's part of the cache and * we can flush it... */ -LOG_TRACE_ARGS ("Lock id (%u.%u) has %u holders\n" , +LOG_TRACE_ARGS ("Lock id (%lu.%lu) has %u holders\n" ,HILO (lockres->sector_num), lockres->lock_holders);
journal.c +13 -13
@@ -96,7 +96,7 @@ retval->k_handle =journal_start (journal, max_buffs);if (IS_ERR (retval->k_handle)) {LOG_ERROR_STR ("journal_start() failed!" ); -LOG_ERROR_STATUS (PTR_ERR (retval->k_handle)); +LOG_ERROR_STATUS ((int )PTR_ERR (retval->k_handle)); retval->k_handle =NULL ; goto done_free; }
@@ -240,7 +240,7 @@ lock->flags, lock->res, (abort ? NULL : lock->bh), NULL);if (tmpstat <0 ) { -LOG_ERROR_ARGS ("Could not release lock %u.%u\n" , +LOG_ERROR_ARGS ("Could not release lock %lu.%lu\n" ,HILO (lock->id));LOG_ERROR_STATUS (tmpstat); status = tmpstat;
@@ -265,7 +265,7 @@int status = -ENOENT ;struct list_head *p1; -LOG_ENTRY_ARGS ("(%u.%u)\n" , lockid); +LOG_ENTRY_ARGS ("(%lu.%lu)\n" ,HILO (lockid));/* make sure that we have a root_start off */ /* this can be called early in the first mount */
@@ -748,8 +748,8 @@ {ocfs_journal_lock *lock; -LOG_ENTRY_ARGS ("(id=%u.%u, type=%u, flags=%u, res=0x%08x, " -"bh=0x%08x)\n" ,HILO (id), type, flags, res, bh); +LOG_ENTRY_ARGS ("(id=%lu.%lu, type=%u, flags=%u, res=%p, " +"bh=%p)\n" ,HILO (id), type, flags, res, bh); lock =ocfs_malloc (sizeof (ocfs_journal_lock));if (lock ==NULL ) {
@@ -882,9 +882,9 @@ } fe = (ocfs_file_entry *)OCFS_BH_GET_DATA_READ (bh);/* read */ } -LOG_TRACE_ARGS ("fe->file_size = %u.%u\n" ,HI (fe->file_size), +LOG_TRACE_ARGS ("fe->file_size = %lu.%lu\n" ,HI (fe->file_size),LO (fe->file_size)); -LOG_TRACE_ARGS ("fe->alloc_size = %u.%u\n" ,HI (fe->alloc_size), +LOG_TRACE_ARGS ("fe->alloc_size = %lu.%lu\n" ,HI (fe->alloc_size),LO (fe->alloc_size));/* gonna need this later */
@@ -893,7 +893,7 @@/* Ok, look up the inode for our journal */ args.offset = fe->this_sector; args.fe_bh = bh; -LOG_TRACE_ARGS ("fe->this_sector = %u.%u\n" ,HI (fe->this_sector), +LOG_TRACE_ARGS ("fe->this_sector = %lu.%lu\n" ,HI (fe->this_sector),LO (fe->this_sector));OCFS_BH_PUT_DATA (bh); fe =NULL ;
@@ -914,14 +914,14 @@ status = -EACCES ; goto done; } -LOG_TRACE_ARGS ("inode->i_size = %u\n" , inode->i_size); +LOG_TRACE_ARGS ("inode->i_size = %lu.%lu\n" ,HILO (inode->i_size)); status =ocfs_create_new_oin (&oin, alloc_size, osb); status =ocfs_initialize_oin (oin, osb,0 , lock_id, lock_id, false,NULL ); oin->journal_inode = true; oin->open_hndl_cnt++;SET_INODE_OIN (inode, oin); -LOG_TRACE_ARGS ("oin->alloc_size = %u.%u\n" ,HI (oin->alloc_size), +LOG_TRACE_ARGS ("oin->alloc_size = %lu.%lu\n" ,HI (oin->alloc_size),LO (oin->alloc_size));/* call the kernels journal init function now */
@@ -1328,7 +1328,7 @@ status = -EINVAL ; goto bail; } -LOG_TRACE_ARGS ("(Run %d), lbo = %d.%d bytes, numbytes = %u " +LOG_TRACE_ARGS ("(Run %d), lbo = %lu.%lu bytes, numbytes = %u " "bytes\n" , run,HILO (lbo), numbytes);/* there are actually returned in bytes. need blocks. */
@@ -1537,7 +1537,7 @@ status = -EACCES ; goto done; } -LOG_TRACE_ARGS ("inode->i_size = %u\n" , inode->i_size); +LOG_TRACE_ARGS ("inode->i_size = %lu.%lu\n" ,HILO (inode->i_size)); status =ocfs_create_new_oin (&oin, alloc_size, osb);if (status <0 ) {
@@ -1654,7 +1654,7 @@struct buffer_head *publish_bh =NULL ;__u64 node_publ_off; -LOG_ENTRY_ARGS ("(0x%08x, %u.%u)\n" , osb,HI (node_num),LO (node_num)); +LOG_ENTRY_ARGS ("(%p, %lu.%lu)\n" , osb,HI (node_num),LO (node_num));/* take a lock on the publish sector */ down (&(osb->publish_lock));
bitmap.c +5 -5
@@ -42,7 +42,7 @@ {__u32 tmp; -LOG_ENTRY_ARGS ("(0x%08x, %u, %u)\n" , bitmap, validbits, allocbits); +LOG_ENTRY_ARGS ("(%p, %u, %u)\n" , bitmap, validbits, allocbits); bitmap->validbits = validbits; bitmap->allocbits = allocbits;
@@ -137,7 +137,7 @@int c;struct buffer_head *currbh =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u, %u)\n" , osb, bitmap, numBits, +LOG_ENTRY_ARGS ("(%p, %p, %u, %u, %u)\n" , osb, bitmap, numBits, offset, sysonly); globalsize = bitmap->validbits - sysonly;
@@ -258,7 +258,7 @@OCFS_BH_PUT_DATA (currbh); } -LOG_EXIT_ULONG (count); +LOG_EXIT_STATUS (count);return count; }/* ocfs_count_bits */
@@ -277,7 +277,7 @@void *buff;int i, local; -LOG_ENTRY_ARGS ("(0x%08x, %u, %u)\n" , bitmap, start, num); +LOG_ENTRY_ARGS ("(%p, %u, %u)\n" , bitmap, start, num);if ((start + num) > bitmap->validbits) { LOG_ERROR_ARGS("bitmap->validbits = %u but start = %u and " \
@@ -318,7 +318,7 @@void *buff;int i, local; -LOG_ENTRY_ARGS ("(0x%08x, %u, %u)\n" , bitmap, start, num); +LOG_ENTRY_ARGS ("(%p, %u, %u)\n" , bitmap, start, num);if ((start + num) > bitmap->validbits) { LOG_ERROR_ARGS("bitmap->validbits = %u but start = %u and " \
dlm.c +37 -37
258 lines not on this page · raw message
util.c +4 -4
@@ -270,7 +270,7 @@ *oin =GET_INODE_OIN (inode); *off =GET_INODE_VOTEOFF (inode); -LOG_TRACE_ARGS ("offset=%u.%u, i_ino=%u\n" ,HILO ((*off)), inode->i_ino); +LOG_TRACE_ARGS ("offset=%lu.%lu, i_ino=%lu\n" ,HILO ((*off)), inode->i_ino);if (*off ==-1 )BUG ();
@@ -388,9 +388,9 @@void ocfs_truncate_inode_pages (struct inode *inode,loff_t off) {#if LINUX_VERSION_CODE <=LinuxVersionCode (2 ,4 ,10 ) -LOG_TRACE_ARGS ("NOT truncating pages for inode %p from offset %u.%u\n" , inode, off); +LOG_TRACE_ARGS ("NOT truncating pages for inode %p from offset %lu.%lu\n" , inode,HILO (off));#else -LOG_TRACE_ARGS ("truncating pages for inode %p from offset %u.%u\n" , inode, off); +LOG_TRACE_ARGS ("truncating pages for inode %p from offset %lu.%lu\n" , inode,HILO (off));truncate_inode_pages (&inode->i_data, off);#endif }/* ocfs_truncate_inode_pages */
@@ -471,7 +471,7 @@ addr = *stack++;if (ocfs_kernel_text_address (addr)) {// lookup_symbol(addr, buffer, 512); -printk ("[<%08lx>] %s (0x%x)\n" , addr," " ,stack-1 ); +printk ("[<%08lx>] %s (%p)\n" , addr," " ,stack-1 ); } }printk ("\n" );
vote.c +4 -4
@@ -118,7 +118,7 @@struct sockaddr_in sin;mm_segment_t oldfs; -LOG_ENTRY_ARGS ("(votemap=0x%x)\n" ,LO (votemap)); +LOG_ENTRY_ARGS ("(%lu)\n" ,LO (votemap)); oldfs =get_fs ();for (map =LO (votemap), num =0 ; map !=0 ; map >>=1 , num++) {
@@ -362,7 +362,7 @@ goto bail; } -LOG_TRACE_ARGS ("node=%u, lockid=%u.%u, seq=%u.%u, vote=%d\n" , +LOG_TRACE_ARGS ("node=%u, lockid=%lu.%lu, seq=%lu.%lu, vote=%d\n" , dlm_msg->src_node,HI (reply_msg->lock_id),LO (reply_msg->lock_id),HI (reply_msg->lock_seq_num),LO (reply_msg->lock_seq_num), reply->status);
@@ -388,7 +388,7 @@ (reply_msg->flags & FLAG_FILE_UPDATE)) lockres->oin_openmap = lockres->tmp_openmap; lockres->tmp_openmap =0 ; -LOG_TRACE_ARGS ("OK vote, lockid=%u.%u, map: 0x%08x\n" , +LOG_TRACE_ARGS ("OK vote, lockid=%lu.%lu, map: %lu\n" ,HI (lockres->sector_num),LO (lockres->sector_num),LO (lockres->got_vote_map)); lockres->vote_state =0 ;
@@ -512,7 +512,7 @@__u32 msg_len;ocfs_dlm_msg_hdr *req; -LOG_ENTRY_ARGS ("(osb=0x%08x, vm=0x%08x)\n" , osb,LO (vote_map)); +LOG_ENTRY_ARGS ("(osb=%p, vm=%lu)\n" , osb,LO (vote_map)); msg_len =sizeof (ocfs_dlm_msg) -1 +sizeof (ocfs_dlm_req_master);
dir.c +9 -9
@@ -54,7 +54,7 @@int ret =0 ;struct inode *inode = filp->f_dentry->d_inode; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, '%*s')\n" , filp, dirent, +LOG_ENTRY_ARGS ("(%p, %p, '%*s')\n" , filp, dirent, filp->f_dentry->d_name.len, filp->f_dentry->d_name.name); pos = filp->f_pos;
@@ -175,7 +175,7 @@/* TODO: change this to take a buffer head instead of fe */ -LOG_ENTRY_ARGS ("(osb=%p, parent=%u.%u, fname=%p, fe_bh=%p, ofile=%p, inode=%p)\n" , osb, parent_off, file_name, fe_bh, ofile, inode); +LOG_ENTRY_ARGS ("(osb=%p, parent=%lu.%lu, fname=%p, fe_bh=%p, ofile=%p, inode=%p)\n" , osb,HILO (parent_off), file_name, fe_bh, ofile, inode); nbhs = osb->vol_layout.dir_node_size >>9 ; bufsz = nbhs * (sizeof (struct buffer_head *));
@@ -503,7 +503,7 @@if (DirNode)ocfs_safefree (DirNode); -LOG_EXIT_ULONG (bRet); +LOG_EXIT_STATUS (bRet);return bRet; }/* ocfs_search_dir_node */
@@ -618,7 +618,7 @@ bail:if (DirNode)OCFS_BH_PUT_DATA (bhs[0 ]); -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_find_index */
@@ -1091,7 +1091,7 @@ locknode_off = LockNode->node_disk_off; locknode_head_del = LockNode->head_del_ent_node; -LOG_TRACE_ARGS ("ocfs_insert_file: head_del=%u.%u, free_node=%u.%u, locknode=%u.%u\n" , +LOG_TRACE_ARGS ("ocfs_insert_file: head_del=%lu.%lu, free_node=%lu.%lu, locknode=%lu.%lu\n" ,HILO (LockNode->head_del_ent_node),HILO (LockNode->free_node_ptr),HILO (locknode_off));
@@ -1102,7 +1102,7 @@else dir_off = locknode_off; -LOG_TRACE_ARGS ("ocfs_insert_file: dir_off selected was %u.%u\n" ,HILO (dir_off)); +LOG_TRACE_ARGS ("ocfs_insert_file: dir_off selected was %lu.%lu\n" ,HILO (dir_off)); parent_is_lock_node = (dir_off == locknode_off);OCFS_BH_PUT_DATA (lock_bh);
@@ -1143,7 +1143,7 @@/* start from locknode, travel along next_node_ptr */ dir_off = locknode_off;while (1 ) { -LOG_TRACE_ARGS ("ocfs_insert_file: now checking %u.%u\n" , dir_off); +LOG_TRACE_ARGS ("ocfs_insert_file: now checking %lu.%lu\n" ,HILO (dir_off)); status =ocfs_read_dirnode (osb, dir_off, false, bhs, dir_inode);if (status <0 ) {LOG_ERROR_STATUS (status);
@@ -1157,12 +1157,12 @@ DirNode =NULL ;if (dir_num_ent_used < osb->max_dir_node_ent) { -LOG_TRACE_ARGS ("ocfs_insert_file: num_ent_used for %u.%u is good (%d)\n" , dir_off, +LOG_TRACE_ARGS ("ocfs_insert_file: num_ent_used for %lu.%lu is good (%d)\n" ,HILO (dir_off), dir_num_ent_used); new_head_del = dir_off;break ; } -LOG_TRACE_ARGS ("ocfs_insert_file: next_node pointer for %u.%u is %u.%u\n" , dir_off, dir_next_node); +LOG_TRACE_ARGS ("ocfs_insert_file: next_node pointer for %lu.%lu is %lu.%lu\n" ,HILO (dir_off),HILO (dir_next_node)); dir_off = dir_next_node;if (dir_off ==INVALID_NODE_POINTER ) { new_head_del =INVALID_NODE_POINTER ;
sysfile.c +6 -6
@@ -145,8 +145,8 @@int flags =OCFS_BH_CACHED ;bool bWriteThru = false; -LOG_ENTRY_ARGS ("(FileId = %u, metadatafile = %u, offset = (%u.%u), " -"Length = (%u.%u))\n" , FileId, +LOG_ENTRY_ARGS ("(FileId = %u, metadatafile = %u, offset = (%lu.%lu), " +"Length = (%lu.%lu))\n" , FileId,OCFS_FILE_VOL_META_DATA + osb->node_num,HILO (Offset),HILO (Length));
@@ -273,7 +273,7 @@if (Buffer)vfree (Buffer); -LOG_EXIT_ARGS ("%u.%u" ,HI (StartOffset),LO (StartOffset)); +LOG_EXIT_ARGS ("%lu.%lu" ,HI (StartOffset),LO (StartOffset));return StartOffset; }/* ocfs_file_to_disk_off */
@@ -312,7 +312,7 @@ fe = (ocfs_file_entry *)OCFS_BH_GET_DATA_READ (fe_bh);/* read */ if (!IS_VALID_FILE_ENTRY (fe)) { -LOG_ERROR_ARGS ("offset=%u.%u" ,HILO (offset)); +LOG_ERROR_ARGS ("offset=%lu.%lu" ,HILO (offset)); status = -EINVAL ; goto leave; }
@@ -351,7 +351,7 @@char *data;struct buffer_head **bhs; -LOG_ENTRY_ARGS ("(FileId = %u, Size = %u.%u)\n" , FileId,HI (FileSize), +LOG_ENTRY_ARGS ("(FileId = %u, Size = %lu.%lu)\n" , FileId,HI (FileSize),LO (FileSize));OCFS_ASSERT (osb);
@@ -775,7 +775,7 @@ }if (allocSize < neededSize) { -LOG_TRACE_ARGS ("allocSize(%u.%u) < neededSize(%u.%u)" , +LOG_TRACE_ARGS ("allocSize(%lu.%lu) < neededSize(%lu.%lu)" ,HILO (allocSize),HILO (neededSize)); status = ocfs_extend_system_file (osb, (OCFS_FILE_VOL_META_DATA + osb->node_num),
file.c +22 -21
156 lines not on this page · raw message
volcfg.c +3 -3
@@ -76,12 +76,12 @@ }if (atomic_read (&osb->lock_stop)) { -LOG_TRACE_ARGS ("Last Lock written : %d\n" , jiffies); +LOG_TRACE_ARGS ("Last Lock written : %lu\n" , jiffies);atomic_set (&osb->lock_event_woken,1 );brelse (bh);wake_up (&osb->lock_event); }else { -LOG_TRACE_ARGS ("Lock written : %d\n" , jiffies); +LOG_TRACE_ARGS ("Lock written : %lu\n" , jiffies);mod_timer (&osb->lock_timer, jiffies +OCFS_VOLCFG_LOCK_ITERATE ); }
@@ -400,7 +400,7 @@ lock_buf =NULL ;/* Set timer to reiterate lock every few jiffies */ -LOG_TRACE_ARGS ("Start Timer: %d\n" , jiffies); +LOG_TRACE_ARGS ("Start Timer: %lu\n" , jiffies); osb->lock_timer.expires = jiffies +OCFS_VOLCFG_LOCK_ITERATE ;/* we get_bh here because we brelse later in
hash.c +40 -38
247 lines not on this page · raw message
sem.c +1 -1
@@ -92,7 +92,7 @@ } } -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_down_sem */
oin.c +7 -7
@@ -467,7 +467,7 @@int status =0 ;ocfs_inode *oin =NULL ; -LOG_ENTRY_ARGS ("(alloc_size = %u.%u)\n" ,HILO (alloc_size)); +LOG_ENTRY_ARGS ("(alloc_size = %lu.%lu)\n" ,HILO (alloc_size));OCFS_ASSERT (osb);
@@ -650,8 +650,8 @@__u64 savedOffset = oin->file_disk_off;CLEAR_INODE_OIN (inode); -LOG_TRACE_ARGS ("inode oin cleared / flags: %d / offset: %u.%u\n" , - inode->i_flags, savedOffset); +LOG_TRACE_ARGS ("inode oin cleared / flags: %d / offset: %lu.%lu\n" , + inode->i_flags,HILO (savedOffset)); }ocfs_extent_map_destroy (&oin->map);
@@ -696,7 +696,7 @@int status =0 ; -LOG_ENTRY_ARGS ("(oin = 0x%08x)\n" , oin); +LOG_ENTRY_ARGS ("(oin = %p)\n" , oin);if (oin ==NULL ) goto bail;
@@ -731,7 +731,7 @@ lockResource = (ocfs_lock_res *) oin->lock_res;if (lockResource ==NULL ) {LOG_ERROR_ARGS ("lockres=null, oin->file_disk_off " -"= %u.%u\n" , +"= %lu.%lu\n" ,HILO (oin->file_disk_off)); goto bail;
@@ -763,7 +763,7 @@if (val == lockResource)ocfs_remove_sector_node (osb, val);else -LOG_ERROR_ARGS ("(lres=0x%08x) != (val=0x%08x)" , +LOG_ERROR_ARGS ("(lres=%p) != (val=%p)" , lockResource, val);ocfs_put_lockres (val); }else {
@@ -773,7 +773,7 @@LOG_TRACE_ARGS ("hashtable already destroyed\n" ); goto bail; } -LOG_ERROR_ARGS ("lres=0x%08x is not in the hash!" , +LOG_ERROR_ARGS ("lres=%p is not in the hash!" , lockResource); }ocfs_put_lockres (oin->lock_res);
symlink.c +1 -1
@@ -121,7 +121,7 @@struct inode *inode = (struct inode *)data;ocfs_super *osb = (ocfs_super *)OCFS_GENERIC_SB_P (inode->i_sb); -sprintf (buf,"%ld" ,osb->node_num); +sprintf (buf,"%u" ,osb->node_num); l =strlen (buf);if (str) {
inc/ocfs.h +2 -2
@@ -1399,8 +1399,8 @@#define LOG_EXIT () LOG_EXIT_ARGS(NULL)#define LOG_EXIT_STATUS (val) LOG_EXIT_ARGS("%d ", val)#define LOG_EXIT_LONG (val) LOG_EXIT_ARGS("%d ", val) -#define LOG_EXIT_ULONG (val) LOG_EXIT_ARGS("%u ", val) -#define LOG_EXIT_PTR (val) LOG_EXIT_ARGS("0x%08x ", val) +#define LOG_EXIT_ULONG (val) LOG_EXIT_ARGS("%lu ", val) +#define LOG_EXIT_PTR (val) LOG_EXIT_ARGS("%p ", val)/* TRACE macros */
inc/io.h +2 -2
@@ -278,13 +278,13 @@BUG (); }else if (bh->b_blocknr !=4720 ) {OCFS_DO_HEX_DUMP (bh); -printk ("uh oh! dirnode is being written at blocknr=%u!\n" , bh->b_blocknr); +printk ("uh oh! dirnode is being written at blocknr=%lu!\n" , 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 (%u)\n" , +printk ("uh oh! fe->this_sector (%u) != blocknr (%lu)\n" , (__u32)(fe->this_sector>>9 ), bh->b_blocknr);BUG (); }else if (fe->extents[0 ].disk_off >>9 ==4720 ) {
namei.c +21 -21
153 lines not on this page · raw message
alloc.c +28 -29
202 lines not on this page · raw message
Makefile +1 -1
@@ -2,7 +2,7 @@ include $(TOPDIR)/Preamble.make -WARNINGS = -Wall -Wstrict-prototypes -Wno-format +WARNINGS = -Wall -Wstrict-prototypes ifneq ($(OCFS_PROCESSOR),x86_64) WARNINGS += -Wmissing-prototypes -Wmissing-declarations
Quoted 6 lines · Manish Singh
Quoted 3 lines · Rusty Lynch
(There are a couple of places where I cast a
size_tto int to stop warnings on 64bit machines... can't think of a cleaner way of printingsize_tsince prink doesn't directly handle the type.)%Zu works for
size_t.
Ah.. I see that now in the fprintf man page.
Here is another version of the patch that uses %zu where appropriate.
--rusty
inode.c +29 -29
@@ -147,7 +147,7 @@mode_t mode;ocfs_file_entry *fe =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, %u, 0x%08x)\n" , inode, ino, opaque); +LOG_ENTRY_ARGS ("(%p, %lu, %p)\n" , inode, ino, opaque);if (opaque ==NULL || inode ==NULL ) goto bail;
@@ -167,14 +167,14 @@LOG_TRACE_STR ("find_inode -> S_ISDIR" );if (fe->extents[0 ].disk_off != fileOff) {LOG_TRACE_ARGS - ("DIR : inode number same but full offset does not match: %u.%u != %u.%u\n" , - fe->extents[0 ].disk_off, fileOff); + ("DIR : inode number same but full offset does not match: %lu.%lu != %lu.%lu\n" , +HILO (fe->extents[0 ].disk_off),HILO (fileOff)); goto bail; } }else if (args->offset != fileOff) {LOG_TRACE_ARGS - ("FILE : inode number same but full offset does not match: %u.%u != %u.%u\n" , - args->offset, fileOff); + ("FILE : inode number same but full offset does not match: %lu.%lu != %lu.%lu\n" , +HILO (args->offset),HILO (fileOff)); goto bail; }
@@ -237,7 +237,7 @@__u64 offset, fe_off;unsigned long uniq_ino; -LOG_ENTRY_ARGS ("(0x%08x, %u, size:%u)\n" , inode, mode, fe->file_size); +LOG_ENTRY_ARGS ("(%p, %u, size:%lu.%lu)\n" , inode, mode,HILO (fe->file_size)); sb = inode->i_sb; osb = (ocfs_super *)OCFS_GENERIC_SB_P (sb);
@@ -274,7 +274,7 @@ inode->i_ino = uniq_ino;/* caller needs to know to call inode_hash_bind! */ } -LOG_TRACE_ARGS ("offset = %u.%u, ino = %lu, create_ino = %s\n" , +LOG_TRACE_ARGS ("offset = %lu.%lu, ino = %lu, create_ino = %s\n" ,HILO (offset), inode->i_ino, create_ino ?"true" :"false" );
@@ -418,7 +418,7 @@ocfs_file_entry *fe =NULL ;__u64 voteoff; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n" , inode, opaque); +LOG_ENTRY_ARGS ("(%p, %p)\n" , inode, opaque);if (inode ==NULL || inode->i_sb ==NULL ) {LOG_ERROR_STR ("bad inode" );
@@ -657,8 +657,8 @@ {ocfs_super *osb; -LOG_ENTRY_ARGS ("(0x%08x, inode_i_ino=%lu)\n" , inode, inode->i_ino); -LOG_TRACE_ARGS ("put_inode: count=%d\n" , inode->i_count); +LOG_ENTRY_ARGS ("(%p, inode_i_ino=%lu)\n" , inode, inode->i_ino); +LOG_TRACE_ARGS ("put_inode: count=%d\n" ,atomic_read (&inode->i_count)); osb =OCFS_GENERIC_SB_P (inode->i_sb);if (inode_data_is_oin (inode) && (atomic_read (&inode->i_count) ==1 ) ) {ocfs_inode *oin;
@@ -783,7 +783,7 @@ {int ret; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u)\n" , file, page, from, to); +LOG_ENTRY_ARGS ("(%p, %p, %u, %u)\n" , file, page, from, to); ret =block_prepare_write (page, from, to, ocfs_get_block);
@@ -799,7 +799,7 @@ {int ret; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u)\n" , file, page, from, to); +LOG_ENTRY_ARGS ("(%p, %p, %u, %u)\n" , file, page, from, to); ret =generic_commit_write (file, page, from, to);
@@ -861,7 +861,7 @@int status =0 ;if (newsize > oin->alloc_size) { -LOG_TRACE_ARGS ("Extend: have=%u.%u, need=%u.%u\n" , +LOG_TRACE_ARGS ("Extend: have=%lu.%lu, need=%lu.%lu\n" ,HILO (oin->alloc_size),HILO (newsize));if (unlock)
@@ -875,7 +875,7 @@if (status <0 ) {LOG_ERROR_STATUS (status); -LOG_TRACE_ARGS ("Failed to extend file to %u.%u\n" ,HILO (newsize)); +LOG_TRACE_ARGS ("Failed to extend file to %lu.%lu\n" ,HILO (newsize)); status = -ENOSPC ; }
@@ -895,8 +895,8 @@__u64 entryOffset;struct buffer_head *bh =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, %d, 0x%08x, %d)\n" , inode, iblock, bh_result, - create); +LOG_ENTRY_ARGS ("(%p, %lu.%lu, %p, %d)\n" , inode,HILO (iblock), + bh_result, create);if (!inode) {LOG_ERROR_STR ("bad inode" );
@@ -906,7 +906,7 @@ osb = (ocfs_super *)OCFS_GENERIC_SB_P (inode->i_sb);if ((iblock <<9 ) >PATH_MAX +1 ) { -LOG_ERROR_ARGS ("file offset > PATH_MAX: %u.%u" , iblock <<9 ); +LOG_ERROR_ARGS ("file offset > PATH_MAX: %lu.%lu" ,HILO (iblock <<9 )); goto bail; }
@@ -924,13 +924,13 @@if (!IS_VALID_FILE_ENTRY (fe)) {OCFS_BH_PUT_DATA (bh); -LOG_ERROR_ARGS ("Invalid fe at offset %u.%u" ,HILO (entryOffset)); +LOG_ERROR_ARGS ("Invalid fe@offset %lu.%lu" ,HILO (entryOffset)); goto bail; }if ((iblock <<9 ) >= (__s64 )fe->alloc_size) {OCFS_BH_PUT_DATA (bh); -LOG_ERROR_ARGS ("file offset is outside the allocated size: %u.%u" , +LOG_ERROR_ARGS ("file offset is outside the allocated size: %lu.%lu" ,HILO (iblock <<9 )); goto bail; }
@@ -962,7 +962,7 @@__u32 len;bool oin_locked = false; -LOG_ENTRY_ARGS ("(0x%08x, %d, 0x%08x, %d)\n" , inode, iblock, bh_result, +LOG_ENTRY_ARGS ("(%p, %lu.%lu, %p, %d)\n" , inode,HILO (iblock), bh_result, create);if (S_ISLNK (inode->i_mode)) {
@@ -1004,7 +1004,7 @@ err =ocfs_lookup_file_allocation (osb, oin, vbo, &lbo, len,NULL , (oin->journal_inode) ?NULL : inode);if (err <0 ) { -LOG_ERROR_ARGS ("vbo=%u.%u lbo=%u.%u len=%u" ,HILO (vbo), +LOG_ERROR_ARGS ("vbo=%lu.%lu lbo=%lu.%lu len=%u" ,HILO (vbo),HILO (lbo), len); goto bail; }
@@ -1015,8 +1015,8 @@if (bh_result->b_blocknr ==0 ) { err = -EIO ; -LOG_ERROR_ARGS ("vbo=%u.%u lbo=%u.%u len=%u, fe=0x%08x" , -HILO (vbo),HILO (lbo), len, oin->file_disk_off); +LOG_ERROR_ARGS ("vbo=%lu.%lu lbo=%lu.%lu len=%u, fe=%lu.%lu" , +HILO (vbo),HILO (lbo), len,HILO (oin->file_disk_off)); } bail:
@@ -1079,7 +1079,7 @@ err =ocfs_lookup_file_allocation (osb, oin, vbo, &lbo, len,NULL ,NULL );if (err <0 ) { -LOG_ERROR_ARGS ("vbo=%u.%u lbo=%u.%u len=%u" ,HILO (vbo), +LOG_ERROR_ARGS ("vbo=%lu.%lu lbo=%lu.%lu len=%u" ,HILO (vbo),HILO (lbo), len);LOG_ERROR_STATUS (err); goto bail;
@@ -1105,7 +1105,7 @@__s64 vbo =0 ;__s64 lbo =0 ; -LOG_ENTRY_ARGS ("(0x%08x, %d)\n" , inode, iblock); +LOG_ENTRY_ARGS ("(%p, %lu.%lu)\n" , inode,HILO (iblock));if (!inode || !inode_data_is_oin (inode)) {LOG_ERROR_STR ("bad inode or inode has no oin" );
@@ -1130,8 +1130,8 @@ *oblock = lbo >> inode->i_sb->s_blocksize_bits;if (*oblock ==0 ) { err = -EIO ; -LOG_ERROR_ARGS ("vbo=%u.%u lbo=%u.%u len=%u, fe=0x%08x" , -HILO (vbo),HILO (lbo), len, oin->file_disk_off); +LOG_ERROR_ARGS ("vbo=%lu.%lu lbo=%lu.%lu len=%u, fe=%lu.%lu" , +HILO (vbo),HILO (lbo), len,HILO (oin->file_disk_off)); } bail:
@@ -1150,7 +1150,7 @@ {int ret; -LOG_ENTRY_ARGS ("(0x%08x, %u)\n" , file, (page ? page->index :0 )); +LOG_ENTRY_ARGS ("(%p, %lu)\n" , file, (page ? page->index :0 )); ret =block_read_full_page (page, ocfs_get_block);
@@ -1179,7 +1179,7 @@ {int ret; -LOG_ENTRY_ARGS ("(0x%08x)\n" , page); +LOG_ENTRY_ARGS ("(%p)\n" , page); ret =block_write_full_page (page, ocfs_get_block);
extmap.c +9 -9
@@ -245,7 +245,7 @@ bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_coalesce_extent_map_entry */
@@ -304,7 +304,7 @@spin_unlock (&(map->lock)); bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_extent_map_add */
@@ -385,7 +385,7 @@spin_unlock (&(map->lock)); bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_extent_map_lookup */
@@ -430,7 +430,7 @@spin_unlock (&(map->lock)); bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_extent_map_next_entry */
@@ -519,7 +519,7 @@ *SectorCount = (LO (LiSectorCount)) <<OCFS_LOG_SECTOR_SIZE ; } -LOG_EXIT_ULONG (Results); +LOG_EXIT_STATUS (Results);return Results; }/* ocfs_get_next_extent_map_entry */
@@ -566,7 +566,7 @@ } } -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_lookup_extent_map_entry */
@@ -648,7 +648,7 @@if ((OcfsExtent->next_free_ext !=OCFS_MAX_DATA_EXTENTS ) && (*remainingLength)) { -LOG_ERROR_ARGS ("next_free_extent=%d, rem_len=%u.%u" , +LOG_ERROR_ARGS ("next_free_extent=%d, rem_len=%lu.%lu" , OcfsExtent->next_free_ext,HILO (*remainingLength)); }else status =0 ;
@@ -689,10 +689,10 @@ ret =ocfs_extent_map_add (Map, ((__s64 ) Vbo), ((__s64 ) Lbo), ((__s64 ) ByteCount));if (!ret) -LOG_ERROR_ARGS ("fileoff=%u.%u, diskoff=%u.%u, len=%u.%u" , +LOG_ERROR_ARGS ("fileoff=%lu.%lu, diskoff=%lu.%lu, len=%lu.%lu" ,HILO (Vbo),HILO (Lbo),HILO (ByteCount)); -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_add_extent_map_entry */
super.c +5 -5
@@ -326,7 +326,7 @@ inode =NULL ; } -LOG_EXIT_PTR (0 ); +LOG_EXIT_PTR (NULL );return NULL ; }/* ocfs_read_super */
@@ -355,7 +355,7 @@ goto bail; } -LOG_TRACE_ARGS ("strlen(options) = %d, options = \"%s\"\n" ,strlen (options), options); +LOG_TRACE_ARGS ("strlen(options) = %zu, options = \"%s\"\n" ,strlen (options), options);#ifdef LINUX_2_5 while ( (c =strsep (&options,"," )) !=NULL )
@@ -675,7 +675,7 @@*/ static void ocfs_put_super (struct super_block *sb) { -LOG_ENTRY_ARGS ("(0x%08x)\n" , sb); +LOG_ENTRY_ARGS ("(%p)\n" , sb);ocfs_sync_blockdev (sb);LOG_TRACE_STR ("put super... do nothing! DONE!!!!" );
@@ -700,7 +700,7 @@ocfs_bitmap_lock *bm_lock =NULL ;struct buffer_head *bh =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n" , sb, buf); +LOG_ENTRY_ARGS ("(%p, %p)\n" , sb, buf); osb = (ocfs_super *)OCFS_GENERIC_SB_P (sb); numbits = osb->cluster_bitmap.validbits;
@@ -1064,7 +1064,7 @@__u32 tempmap;int i; -LOG_ENTRY_ARGS ("(0x%08x)\n" , sb); +LOG_ENTRY_ARGS ("(%p)\n" , sb);if (sb ==NULL ) {LOG_ERROR_STATUS (status = -EFAIL );
heartbeat.c +2 -2
@@ -56,7 +56,7 @@struct buffer_head **pub_bh = &osb->cfg_bhs[publish_idx];__u64 node_publ_off = osb->vol_layout.publ_sect_off + (osb->node_num * osb->sect_size); -LOG_ENTRY_ARGS ("(0x%08x, %u, %s)\n" , osb, flag, +LOG_ENTRY_ARGS ("(%p, %u, %s)\n" , osb, flag, read_publish ?"true" :"false" );if (flag &HEARTBEAT_METHOD_DISK ) {
@@ -124,7 +124,7 @@__u32 i;__u32 num_nodes; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u)\n" , osb, bhs, first_time); +LOG_ENTRY_ARGS ("(%p, %p, %u)\n" , osb, bhs, first_time); num_nodes =OCFS_MAXIMUM_NODES ; node_map = &(osb->vol_node_map);
proc.c +4 -4
@@ -441,13 +441,13 @@ *(ptr -1 ) ='\0' ;#define PROC_STATS \ - "File open count : %d.%u\n" \ + "File open count : %lu.%lu\n" \ "Publish map : %s\n" \ "Number of nodes : %u\n" \ "Cluster size : %u\n" \ - "Volume size : %u.%u\n" \ - "Dir node size : %u.%u\n" \ - "File node size : %u.%u\n" \ + "Volume size : %lu.%lu\n" \ + "Dir node size : %lu.%lu\n" \ + "File node size : %lu.%lu\n" \ "Failed Large Allocs : %u\n" \ "Retry Large Allocs : %u\n" \ "Inode Hash Objects : %u\n"
io.c +21 -21
150 lines not on this page · raw message
dcache.c +2 -2
@@ -48,7 +48,7 @@struct buffer_head *fe_bh =NULL ;int needs_trunc; -LOG_ENTRY_ARGS ("(0x%08x, %d, '%*s')\n" , dentry, flags, +LOG_ENTRY_ARGS ("(%p, %d, '%*s')\n" , dentry, flags, dentry->d_name.len, dentry->d_name.name); if ((inode = dentry->d_inode) == NULL ||
@@ -176,7 +176,7 @@struct list_head *list;int ret, done; -LOG_ENTRY_ARGS ("(0x%08x, '%*s')\n" , dentry, +LOG_ENTRY_ARGS ("(%p, '%*s')\n" , dentry, dentry->d_name.len, dentry->d_name.name);spin_lock (&dcache_lock);
journal.c +13 -13
@@ -96,7 +96,7 @@ retval->k_handle =journal_start (journal, max_buffs);if (IS_ERR (retval->k_handle)) {LOG_ERROR_STR ("journal_start() failed!" ); -LOG_ERROR_STATUS (PTR_ERR (retval->k_handle)); +LOG_ERROR_STATUS ((int )PTR_ERR (retval->k_handle)); retval->k_handle =NULL ; goto done_free; }
@@ -240,7 +240,7 @@ lock->flags, lock->res, (abort ? NULL : lock->bh), NULL);if (tmpstat <0 ) { -LOG_ERROR_ARGS ("Could not release lock %u.%u\n" , +LOG_ERROR_ARGS ("Could not release lock %lu.%lu\n" ,HILO (lock->id));LOG_ERROR_STATUS (tmpstat); status = tmpstat;
@@ -265,7 +265,7 @@int status = -ENOENT ;struct list_head *p1; -LOG_ENTRY_ARGS ("(%u.%u)\n" , lockid); +LOG_ENTRY_ARGS ("(%lu.%lu)\n" ,HILO (lockid));/* make sure that we have a root_start off */ /* this can be called early in the first mount */
@@ -748,8 +748,8 @@ {ocfs_journal_lock *lock; -LOG_ENTRY_ARGS ("(id=%u.%u, type=%u, flags=%u, res=0x%08x, " -"bh=0x%08x)\n" ,HILO (id), type, flags, res, bh); +LOG_ENTRY_ARGS ("(id=%lu.%lu, type=%u, flags=%u, res=%p, " +"bh=%p)\n" ,HILO (id), type, flags, res, bh); lock =ocfs_malloc (sizeof (ocfs_journal_lock));if (lock ==NULL ) {
@@ -882,9 +882,9 @@ } fe = (ocfs_file_entry *)OCFS_BH_GET_DATA_READ (bh);/* read */ } -LOG_TRACE_ARGS ("fe->file_size = %u.%u\n" ,HI (fe->file_size), +LOG_TRACE_ARGS ("fe->file_size = %lu.%lu\n" ,HI (fe->file_size),LO (fe->file_size)); -LOG_TRACE_ARGS ("fe->alloc_size = %u.%u\n" ,HI (fe->alloc_size), +LOG_TRACE_ARGS ("fe->alloc_size = %lu.%lu\n" ,HI (fe->alloc_size),LO (fe->alloc_size));/* gonna need this later */
@@ -893,7 +893,7 @@/* Ok, look up the inode for our journal */ args.offset = fe->this_sector; args.fe_bh = bh; -LOG_TRACE_ARGS ("fe->this_sector = %u.%u\n" ,HI (fe->this_sector), +LOG_TRACE_ARGS ("fe->this_sector = %lu.%lu\n" ,HI (fe->this_sector),LO (fe->this_sector));OCFS_BH_PUT_DATA (bh); fe =NULL ;
@@ -914,14 +914,14 @@ status = -EACCES ; goto done; } -LOG_TRACE_ARGS ("inode->i_size = %u\n" , inode->i_size); +LOG_TRACE_ARGS ("inode->i_size = %lu.%lu\n" ,HILO (inode->i_size)); status =ocfs_create_new_oin (&oin, alloc_size, osb); status =ocfs_initialize_oin (oin, osb,0 , lock_id, lock_id, false,NULL ); oin->journal_inode = true; oin->open_hndl_cnt++;SET_INODE_OIN (inode, oin); -LOG_TRACE_ARGS ("oin->alloc_size = %u.%u\n" ,HI (oin->alloc_size), +LOG_TRACE_ARGS ("oin->alloc_size = %lu.%lu\n" ,HI (oin->alloc_size),LO (oin->alloc_size));/* call the kernels journal init function now */
@@ -1328,7 +1328,7 @@ status = -EINVAL ; goto bail; } -LOG_TRACE_ARGS ("(Run %d), lbo = %d.%d bytes, numbytes = %u " +LOG_TRACE_ARGS ("(Run %d), lbo = %lu.%lu bytes, numbytes = %u " "bytes\n" , run,HILO (lbo), numbytes);/* there are actually returned in bytes. need blocks. */
@@ -1537,7 +1537,7 @@ status = -EACCES ; goto done; } -LOG_TRACE_ARGS ("inode->i_size = %u\n" , inode->i_size); +LOG_TRACE_ARGS ("inode->i_size = %lu.%lu\n" ,HILO (inode->i_size)); status =ocfs_create_new_oin (&oin, alloc_size, osb);if (status <0 ) {
@@ -1654,7 +1654,7 @@struct buffer_head *publish_bh =NULL ;__u64 node_publ_off; -LOG_ENTRY_ARGS ("(0x%08x, %u.%u)\n" , osb,HI (node_num),LO (node_num)); +LOG_ENTRY_ARGS ("(%p, %lu.%lu)\n" , osb,HI (node_num),LO (node_num));/* take a lock on the publish sector */ down (&(osb->publish_lock));
nm.c +12 -12
@@ -158,12 +158,12 @@ocfs_publish * publish;struct ocfs_sched_vote *sv =NULL ; -LOG_ENTRY_ARGS ("(vote_node = %d, bh = 0x%x)\n" , vote_node, bh); +LOG_ENTRY_ARGS ("(vote_node = %d, bh = %p)\n" , vote_node, bh); publish = (ocfs_publish *)OCFS_BH_GET_DATA_READ (bh);/* read */ if (osb->last_publ_seq_num[vote_node] == publish->publ_seq_num){ -LOG_TRACE_ARGS ("Already voted on node %d, seqnum (%u.%u)\n" , +LOG_TRACE_ARGS ("Already voted on node %d, seqnum (%lu.%lu)\n" , vote_node,HILO (publish->publ_seq_num));OCFS_BH_PUT_DATA (bh); status =0 ;
@@ -310,7 +310,7 @@atomic_inc (&osb->nm_init); } -LOG_TRACE_ARGS ("Publish map: 0x%08x\n" ,LO (osb->publ_map)); +LOG_TRACE_ARGS ("Publish map: %lu\n" ,LO (osb->publ_map));/* map of local node */ curr_node_map = (__u64) ((__u64 )1 << osb->node_num);
@@ -433,7 +433,7 @@int status =0 ;ocfs_file_entry *fe; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, 0x%08x)\n" , osb, lock_res, bh); +LOG_ENTRY_ARGS ("(%p, %p, %p)\n" , osb, lock_res, bh);/* Don't sync-read if we already own the lock as it may not * have hit disk yet. */
@@ -447,7 +447,7 @@ status =ocfs_acquire_lockres_ex (lock_res, timeout);if (status <0 ) { -LOG_TRACE_ARGS ("Timedout locking lockres for id: %u.%u\n" , +LOG_TRACE_ARGS ("Timedout locking lockres for id: %lu.%lu\n" ,HILO (lock_res->sector_num)); goto finally; }
@@ -487,7 +487,7 @@ocfs_lock_res *tmp_lockres =NULL ;struct buffer_head *tmpbh =NULL , **b =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, %u.%u, 0x%08x, 0x%08x, 0x%08x)\n" , osb, +LOG_ENTRY_ARGS ("(%p, %lu.%lu, %p, %p, %p)\n" , osb,HI (lock_id),LO (lock_id), lockres, bh, updated);if (bh ==NULL )
@@ -720,7 +720,7 @@__u64 lock_id, seq_num;int needs_trunc =0 ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n" , osb, ctxt); +LOG_ENTRY_ARGS ("(%p, %p)\n" , osb, ctxt);if (!publish && !dlm_msg) { status = -EINVAL ;
@@ -743,7 +743,7 @@ } lockflags = (lock_id >= osb->vol_layout.bitmap_off ?OCFS_BH_CACHED :0 ); -LOG_TRACE_ARGS ("node=%u, id=%u.%u, seq=%u.%u\n" , node_num, +LOG_TRACE_ARGS ("node=%u, id=%lu.%lu, seq=%lu.%lu\n" , node_num,HILO (lock_id),HILO (seq_num));if (disk_vote) {
@@ -765,7 +765,7 @@ }else { status =ocfs_acquire_lockres_ex (lockres, (OCFS_NM_HEARTBEAT_TIME /2 ));if (status <0 ) { -LOG_TRACE_ARGS ("Timedout locking lockres for id: %u.%u\n" , +LOG_TRACE_ARGS ("Timedout locking lockres for id: %lu.%lu\n" ,HILO (lockres->sector_num));ocfs_put_lockres (lockres); goto leave;
@@ -775,9 +775,9 @@ vote_type =get_process_vote_action (osb, lockres, node_num, flags, status, &master_alive, &oin); -printk ("ocfs_process_vote: %s request for lockid: %u.%u, action: %s, type: %s\n" , +printk ("ocfs_process_vote: %s request for lockid: %lu.%lu, action: %s, type: %s\n" , flags &FLAG_RELEASE_LOCK ?"RELEASE" : - (flags &FLAG_ACQUIRE_LOCK ?"ACQUIRE" :"MODIFY" ), lock_id, + (flags &FLAG_ACQUIRE_LOCK ?"ACQUIRE" :"MODIFY" ),HILO (lock_id), process_vote_strings[vote_type], disk_vote ?"disk vote" :"net vote" );
@@ -938,7 +938,7 @@* him the lock if it's part of the cache and * we can flush it... */ -LOG_TRACE_ARGS ("Lock id (%u.%u) has %u holders\n" , +LOG_TRACE_ARGS ("Lock id (%lu.%lu) has %u holders\n" ,HILO (lockres->sector_num), lockres->lock_holders);
ioctl.c +1 -1
@@ -40,7 +40,7 @@extern char *ocfs_version;int ret =0 ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %lu)\n" , inode, filp, cmd, arg); +LOG_ENTRY_ARGS ("(%p, %p, %u, %lu)\n" , inode, filp, cmd, arg);if (_IOC_TYPE (cmd) !=OCFS_IOC_MAGIC ) { ret = -ENOTTY ;
dlm.c +37 -37
258 lines not on this page · raw message
bitmap.c +5 -5
@@ -42,7 +42,7 @@ {__u32 tmp; -LOG_ENTRY_ARGS ("(0x%08x, %u, %u)\n" , bitmap, validbits, allocbits); +LOG_ENTRY_ARGS ("(%p, %u, %u)\n" , bitmap, validbits, allocbits); bitmap->validbits = validbits; bitmap->allocbits = allocbits;
@@ -137,7 +137,7 @@int c;struct buffer_head *currbh =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u, %u)\n" , osb, bitmap, numBits, +LOG_ENTRY_ARGS ("(%p, %p, %u, %u, %u)\n" , osb, bitmap, numBits, offset, sysonly); globalsize = bitmap->validbits - sysonly;
@@ -258,7 +258,7 @@OCFS_BH_PUT_DATA (currbh); } -LOG_EXIT_ULONG (count); +LOG_EXIT_STATUS (count);return count; }/* ocfs_count_bits */
@@ -277,7 +277,7 @@void *buff;int i, local; -LOG_ENTRY_ARGS ("(0x%08x, %u, %u)\n" , bitmap, start, num); +LOG_ENTRY_ARGS ("(%p, %u, %u)\n" , bitmap, start, num);if ((start + num) > bitmap->validbits) { LOG_ERROR_ARGS("bitmap->validbits = %u but start = %u and " \
@@ -318,7 +318,7 @@void *buff;int i, local; -LOG_ENTRY_ARGS ("(0x%08x, %u, %u)\n" , bitmap, start, num); +LOG_ENTRY_ARGS ("(%p, %u, %u)\n" , bitmap, start, num);if ((start + num) > bitmap->validbits) { LOG_ERROR_ARGS("bitmap->validbits = %u but start = %u and " \
vote.c +4 -4
@@ -118,7 +118,7 @@struct sockaddr_in sin;mm_segment_t oldfs; -LOG_ENTRY_ARGS ("(votemap=0x%x)\n" ,LO (votemap)); +LOG_ENTRY_ARGS ("(%lu)\n" ,LO (votemap)); oldfs =get_fs ();for (map =LO (votemap), num =0 ; map !=0 ; map >>=1 , num++) {
@@ -362,7 +362,7 @@ goto bail; } -LOG_TRACE_ARGS ("node=%u, lockid=%u.%u, seq=%u.%u, vote=%d\n" , +LOG_TRACE_ARGS ("node=%u, lockid=%lu.%lu, seq=%lu.%lu, vote=%d\n" , dlm_msg->src_node,HI (reply_msg->lock_id),LO (reply_msg->lock_id),HI (reply_msg->lock_seq_num),LO (reply_msg->lock_seq_num), reply->status);
@@ -388,7 +388,7 @@ (reply_msg->flags & FLAG_FILE_UPDATE)) lockres->oin_openmap = lockres->tmp_openmap; lockres->tmp_openmap =0 ; -LOG_TRACE_ARGS ("OK vote, lockid=%u.%u, map: 0x%08x\n" , +LOG_TRACE_ARGS ("OK vote, lockid=%lu.%lu, map: %lu\n" ,HI (lockres->sector_num),LO (lockres->sector_num),LO (lockres->got_vote_map)); lockres->vote_state =0 ;
@@ -512,7 +512,7 @@__u32 msg_len;ocfs_dlm_msg_hdr *req; -LOG_ENTRY_ARGS ("(osb=0x%08x, vm=0x%08x)\n" , osb,LO (vote_map)); +LOG_ENTRY_ARGS ("(osb=%p, vm=%lu)\n" , osb,LO (vote_map)); msg_len =sizeof (ocfs_dlm_msg) -1 +sizeof (ocfs_dlm_req_master);
util.c +4 -4
@@ -270,7 +270,7 @@ *oin =GET_INODE_OIN (inode); *off =GET_INODE_VOTEOFF (inode); -LOG_TRACE_ARGS ("offset=%u.%u, i_ino=%u\n" ,HILO ((*off)), inode->i_ino); +LOG_TRACE_ARGS ("offset=%lu.%lu, i_ino=%lu\n" ,HILO ((*off)), inode->i_ino);if (*off ==-1 )BUG ();
@@ -388,9 +388,9 @@void ocfs_truncate_inode_pages (struct inode *inode,loff_t off) {#if LINUX_VERSION_CODE <=LinuxVersionCode (2 ,4 ,10 ) -LOG_TRACE_ARGS ("NOT truncating pages for inode %p from offset %u.%u\n" , inode, off); +LOG_TRACE_ARGS ("NOT truncating pages for inode %p from offset %lu.%lu\n" , inode,HILO (off));#else -LOG_TRACE_ARGS ("truncating pages for inode %p from offset %u.%u\n" , inode, off); +LOG_TRACE_ARGS ("truncating pages for inode %p from offset %lu.%lu\n" , inode,HILO (off));truncate_inode_pages (&inode->i_data, off);#endif }/* ocfs_truncate_inode_pages */
@@ -471,7 +471,7 @@ addr = *stack++;if (ocfs_kernel_text_address (addr)) {// lookup_symbol(addr, buffer, 512); -printk ("[<%08lx>] %s (0x%x)\n" , addr," " ,stack-1 ); +printk ("[<%08lx>] %s (%p)\n" , addr," " ,stack-1 ); } }printk ("\n" );
dir.c +9 -9
@@ -54,7 +54,7 @@int ret =0 ;struct inode *inode = filp->f_dentry->d_inode; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, '%*s')\n" , filp, dirent, +LOG_ENTRY_ARGS ("(%p, %p, '%*s')\n" , filp, dirent, filp->f_dentry->d_name.len, filp->f_dentry->d_name.name); pos = filp->f_pos;
@@ -175,7 +175,7 @@/* TODO: change this to take a buffer head instead of fe */ -LOG_ENTRY_ARGS ("(osb=%p, parent=%u.%u, fname=%p, fe_bh=%p, ofile=%p, inode=%p)\n" , osb, parent_off, file_name, fe_bh, ofile, inode); +LOG_ENTRY_ARGS ("(osb=%p, parent=%lu.%lu, fname=%p, fe_bh=%p, ofile=%p, inode=%p)\n" , osb,HILO (parent_off), file_name, fe_bh, ofile, inode); nbhs = osb->vol_layout.dir_node_size >>9 ; bufsz = nbhs * (sizeof (struct buffer_head *));
@@ -503,7 +503,7 @@if (DirNode)ocfs_safefree (DirNode); -LOG_EXIT_ULONG (bRet); +LOG_EXIT_STATUS (bRet);return bRet; }/* ocfs_search_dir_node */
@@ -618,7 +618,7 @@ bail:if (DirNode)OCFS_BH_PUT_DATA (bhs[0 ]); -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_find_index */
@@ -1091,7 +1091,7 @@ locknode_off = LockNode->node_disk_off; locknode_head_del = LockNode->head_del_ent_node; -LOG_TRACE_ARGS ("ocfs_insert_file: head_del=%u.%u, free_node=%u.%u, locknode=%u.%u\n" , +LOG_TRACE_ARGS ("ocfs_insert_file: head_del=%lu.%lu, free_node=%lu.%lu, locknode=%lu.%lu\n" ,HILO (LockNode->head_del_ent_node),HILO (LockNode->free_node_ptr),HILO (locknode_off));
@@ -1102,7 +1102,7 @@else dir_off = locknode_off; -LOG_TRACE_ARGS ("ocfs_insert_file: dir_off selected was %u.%u\n" ,HILO (dir_off)); +LOG_TRACE_ARGS ("ocfs_insert_file: dir_off selected was %lu.%lu\n" ,HILO (dir_off)); parent_is_lock_node = (dir_off == locknode_off);OCFS_BH_PUT_DATA (lock_bh);
@@ -1143,7 +1143,7 @@/* start from locknode, travel along next_node_ptr */ dir_off = locknode_off;while (1 ) { -LOG_TRACE_ARGS ("ocfs_insert_file: now checking %u.%u\n" , dir_off); +LOG_TRACE_ARGS ("ocfs_insert_file: now checking %lu.%lu\n" ,HILO (dir_off)); status =ocfs_read_dirnode (osb, dir_off, false, bhs, dir_inode);if (status <0 ) {LOG_ERROR_STATUS (status);
@@ -1157,12 +1157,12 @@ DirNode =NULL ;if (dir_num_ent_used < osb->max_dir_node_ent) { -LOG_TRACE_ARGS ("ocfs_insert_file: num_ent_used for %u.%u is good (%d)\n" , dir_off, +LOG_TRACE_ARGS ("ocfs_insert_file: num_ent_used for %lu.%lu is good (%d)\n" ,HILO (dir_off), dir_num_ent_used); new_head_del = dir_off;break ; } -LOG_TRACE_ARGS ("ocfs_insert_file: next_node pointer for %u.%u is %u.%u\n" , dir_off, dir_next_node); +LOG_TRACE_ARGS ("ocfs_insert_file: next_node pointer for %lu.%lu is %lu.%lu\n" ,HILO (dir_off),HILO (dir_next_node)); dir_off = dir_next_node;if (dir_off ==INVALID_NODE_POINTER ) { new_head_del =INVALID_NODE_POINTER ;
sysfile.c +6 -6
@@ -145,8 +145,8 @@int flags =OCFS_BH_CACHED ;bool bWriteThru = false; -LOG_ENTRY_ARGS ("(FileId = %u, metadatafile = %u, offset = (%u.%u), " -"Length = (%u.%u))\n" , FileId, +LOG_ENTRY_ARGS ("(FileId = %u, metadatafile = %u, offset = (%lu.%lu), " +"Length = (%lu.%lu))\n" , FileId,OCFS_FILE_VOL_META_DATA + osb->node_num,HILO (Offset),HILO (Length));
@@ -273,7 +273,7 @@if (Buffer)vfree (Buffer); -LOG_EXIT_ARGS ("%u.%u" ,HI (StartOffset),LO (StartOffset)); +LOG_EXIT_ARGS ("%lu.%lu" ,HI (StartOffset),LO (StartOffset));return StartOffset; }/* ocfs_file_to_disk_off */
@@ -312,7 +312,7 @@ fe = (ocfs_file_entry *)OCFS_BH_GET_DATA_READ (fe_bh);/* read */ if (!IS_VALID_FILE_ENTRY (fe)) { -LOG_ERROR_ARGS ("offset=%u.%u" ,HILO (offset)); +LOG_ERROR_ARGS ("offset=%lu.%lu" ,HILO (offset)); status = -EINVAL ; goto leave; }
@@ -351,7 +351,7 @@char *data;struct buffer_head **bhs; -LOG_ENTRY_ARGS ("(FileId = %u, Size = %u.%u)\n" , FileId,HI (FileSize), +LOG_ENTRY_ARGS ("(FileId = %u, Size = %lu.%lu)\n" , FileId,HI (FileSize),LO (FileSize));OCFS_ASSERT (osb);
@@ -775,7 +775,7 @@ }if (allocSize < neededSize) { -LOG_TRACE_ARGS ("allocSize(%u.%u) < neededSize(%u.%u)" , +LOG_TRACE_ARGS ("allocSize(%lu.%lu) < neededSize(%lu.%lu)" ,HILO (allocSize),HILO (neededSize)); status = ocfs_extend_system_file (osb, (OCFS_FILE_VOL_META_DATA + osb->node_num),
file.c +23 -22
158 lines not on this page · raw message
volcfg.c +3 -3
@@ -76,12 +76,12 @@ }if (atomic_read (&osb->lock_stop)) { -LOG_TRACE_ARGS ("Last Lock written : %d\n" , jiffies); +LOG_TRACE_ARGS ("Last Lock written : %lu\n" , jiffies);atomic_set (&osb->lock_event_woken,1 );brelse (bh);wake_up (&osb->lock_event); }else { -LOG_TRACE_ARGS ("Lock written : %d\n" , jiffies); +LOG_TRACE_ARGS ("Lock written : %lu\n" , jiffies);mod_timer (&osb->lock_timer, jiffies +OCFS_VOLCFG_LOCK_ITERATE ); }
@@ -400,7 +400,7 @@ lock_buf =NULL ;/* Set timer to reiterate lock every few jiffies */ -LOG_TRACE_ARGS ("Start Timer: %d\n" , jiffies); +LOG_TRACE_ARGS ("Start Timer: %lu\n" , jiffies); osb->lock_timer.expires = jiffies +OCFS_VOLCFG_LOCK_ITERATE ;/* we get_bh here because we brelse later in
hash.c +40 -38
247 lines not on this page · raw message
sem.c +1 -1
@@ -92,7 +92,7 @@ } } -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_down_sem */
oin.c +7 -7
@@ -467,7 +467,7 @@int status =0 ;ocfs_inode *oin =NULL ; -LOG_ENTRY_ARGS ("(alloc_size = %u.%u)\n" ,HILO (alloc_size)); +LOG_ENTRY_ARGS ("(alloc_size = %lu.%lu)\n" ,HILO (alloc_size));OCFS_ASSERT (osb);
@@ -650,8 +650,8 @@__u64 savedOffset = oin->file_disk_off;CLEAR_INODE_OIN (inode); -LOG_TRACE_ARGS ("inode oin cleared / flags: %d / offset: %u.%u\n" , - inode->i_flags, savedOffset); +LOG_TRACE_ARGS ("inode oin cleared / flags: %d / offset: %lu.%lu\n" , + inode->i_flags,HILO (savedOffset)); }ocfs_extent_map_destroy (&oin->map);
@@ -696,7 +696,7 @@int status =0 ; -LOG_ENTRY_ARGS ("(oin = 0x%08x)\n" , oin); +LOG_ENTRY_ARGS ("(oin = %p)\n" , oin);if (oin ==NULL ) goto bail;
@@ -731,7 +731,7 @@ lockResource = (ocfs_lock_res *) oin->lock_res;if (lockResource ==NULL ) {LOG_ERROR_ARGS ("lockres=null, oin->file_disk_off " -"= %u.%u\n" , +"= %lu.%lu\n" ,HILO (oin->file_disk_off)); goto bail;
@@ -763,7 +763,7 @@if (val == lockResource)ocfs_remove_sector_node (osb, val);else -LOG_ERROR_ARGS ("(lres=0x%08x) != (val=0x%08x)" , +LOG_ERROR_ARGS ("(lres=%p) != (val=%p)" , lockResource, val);ocfs_put_lockres (val); }else {
@@ -773,7 +773,7 @@LOG_TRACE_ARGS ("hashtable already destroyed\n" ); goto bail; } -LOG_ERROR_ARGS ("lres=0x%08x is not in the hash!" , +LOG_ERROR_ARGS ("lres=%p is not in the hash!" , lockResource); }ocfs_put_lockres (oin->lock_res);
symlink.c +1 -1
@@ -121,7 +121,7 @@struct inode *inode = (struct inode *)data;ocfs_super *osb = (ocfs_super *)OCFS_GENERIC_SB_P (inode->i_sb); -sprintf (buf,"%ld" ,osb->node_num); +sprintf (buf,"%u" ,osb->node_num); l =strlen (buf);if (str) {
inc/ocfs.h +2 -2
@@ -1399,8 +1399,8 @@#define LOG_EXIT () LOG_EXIT_ARGS(NULL)#define LOG_EXIT_STATUS (val) LOG_EXIT_ARGS("%d ", val)#define LOG_EXIT_LONG (val) LOG_EXIT_ARGS("%d ", val) -#define LOG_EXIT_ULONG (val) LOG_EXIT_ARGS("%u ", val) -#define LOG_EXIT_PTR (val) LOG_EXIT_ARGS("0x%08x ", val) +#define LOG_EXIT_ULONG (val) LOG_EXIT_ARGS("%lu ", val) +#define LOG_EXIT_PTR (val) LOG_EXIT_ARGS("%p ", val)/* TRACE macros */
inc/io.h +2 -2
@@ -278,13 +278,13 @@BUG (); }else if (bh->b_blocknr !=4720 ) {OCFS_DO_HEX_DUMP (bh); -printk ("uh oh! dirnode is being written at blocknr=%u!\n" , bh->b_blocknr); +printk ("uh oh! dirnode is being written at blocknr=%lu!\n" , 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 (%u)\n" , +printk ("uh oh! fe->this_sector (%u) != blocknr (%lu)\n" , (__u32)(fe->this_sector>>9 ), bh->b_blocknr);BUG (); }else if (fe->extents[0 ].disk_off >>9 ==4720 ) {
namei.c +21 -21
153 lines not on this page · raw message
alloc.c +28 -29
202 lines not on this page · raw message
Makefile +1 -1
@@ -2,7 +2,7 @@ include $(TOPDIR)/Preamble.make -WARNINGS = -Wall -Wstrict-prototypes -Wno-format +WARNINGS = -Wall -Wstrict-prototypes ifneq ($(OCFS_PROCESSOR),x86_64) WARNINGS += -Wmissing-prototypes -Wmissing-declarations
Quoted 11 lines · Rusty Lynch
Quoted 6 lines · Manish Singh
Quoted 3 lines · Rusty Lynch
(There are a couple of places where I cast a
size_tto int to stop warnings on 64bit machines... can't think of a cleaner way of printingsize_tsince prink doesn't directly handle the type.)%Zu works for
size_t.Ah.. I see that now in the fprintf man page.
Here is another version of the patch that uses %zu where appropriate.
Well, I really meant "%Zu". 'z' is a modifier that was introduced in C99, but it's only in very recent 2.4.x printk implementations, i.e. none of current AS 2.1, EL3, or UL have it, which means we can't use it. 'Z' is GNU extension (that's deprecated now in favor of the C99 modifier) that *is* in all the printks we need to support, so we should use that. __attribute__ format should know about both anyway.
BTW, are you planning on replacing HI/LO with %L in a later patch?
-Manish
Quoted 11 lines · Manish Singh
Quoted 10 lines · Rusty Lynch
Quoted 6 lines · Manish Singh
Quoted 3 lines · Rusty Lynch
(There are a couple of places where I cast a
size_tto int to stop warnings on 64bit machines... can't think of a cleaner way of printingsize_tsince prink doesn't directly handle the type.)%Zu works for
size_t.Ah.. I see that now in the fprintf man page.
Quoted 9 lines
Quoted 1 line
Here is another version of the patch that uses %zu where appropriate.
Well, I really meant "%Zu". 'z' is a modifier that was introduced in C99, but it's only in very recent 2.4.x printk implementations, i.e. none of current AS 2.1, EL3, or UL have it, which means we can't use it. 'Z' is GNU extension (that's deprecated now in favor of the C99 modifier) that *is* in all the printks we need to support, so we should use that.
__attribute__format should know about both anyway.
ah... I'm not using any older Linux installs and didn't realize 'z' was such a recent addition. I will change the patch over the 'Z'.
Quoted 1 line
BTW, are you planning on replacing HI/LO with %L in a later patch?
I'll go ahead and do this in one chunk before I disapear for a long weekend.
--rusty
On Fri, Feb 13, 2004 at 02:15:37PM -0800, Manish Singh wrote:
<snip>
Quoted 6 lines
Well, I really meant "%Zu". 'z' is a modifier that was introduced in C99, but it's only in very recent 2.4.x printk implementations, i.e. none of current AS 2.1, EL3, or UL have it, which means we can't use it. 'Z' is GNU extension (that's deprecated now in favor of the C99 modifier) that *is* in all the printks we need to support, so we should use that.
__attribute__format should know about both anyway.
Any ideas on cleanly printing sector_t? In 2.4 it was always a u32, now it is architecture dependent (u32 by default but set to u64 by most architectures including ia32 and ia64.)
Quoted 9 lines · Rusty Lynch
On Fri, Feb 13, 2004 at 02:15:37PM -0800, Manish Singh wrote:
<snip>Quoted 6 lines
Well, I really meant "%Zu". 'z' is a modifier that was introduced in C99, but it's only in very recent 2.4.x printk implementations, i.e. none of current AS 2.1, EL3, or UL have it, which means we can't use it. 'Z' is GNU extension (that's deprecated now in favor of the C99 modifier) that *is* in all the printks we need to support, so we should use that.
__attribute__format should know about both anyway.
Quoted 3 lines
Any ideas on cleanly printing
sector_t? In 2.4 it was always a u32, now it is architecture dependent (u32 by default but set to u64 by most architectures including ia32 and ia64.)
I'd suggest always casting to u64 and using %Lu.
-Manish
Quoted 10 lines · Manish Singh
Quoted 9 lines · Rusty Lynch
On Fri, Feb 13, 2004 at 02:15:37PM -0800, Manish Singh wrote:
<snip>Quoted 6 lines
Well, I really meant "%Zu". 'z' is a modifier that was introduced in C99, but it's only in very recent 2.4.x printk implementations, i.e. none of current AS 2.1, EL3, or UL have it, which means we can't use it. 'Z' is GNU extension (that's deprecated now in favor of the C99 modifier) that *is* in all the printks we need to support, so we should use that.
__attribute__format should know about both anyway.
Quoted 5 lines
Quoted 3 lines
Any ideas on cleanly printing
sector_t? In 2.4 it was always a u32, now it is architecture dependent (u32 by default but set to u64 by most architectures including ia32 and ia64.)I'd suggest always casting to u64 and using %Lu.
How would you feel about always casting to (unsigned long long)? u64 is unsigned long on some arch's and unsigned long long on others. Specifically, we get warnings on ia64 and ppc64 since they both define u64 as unsigned long.
--rusty
Quoted 15 lines · Rusty Lynch
Quoted 14 lines · Manish Singh
Quoted 12 lines · Rusty Lynch
On Fri, Feb 13, 2004 at 02:15:37PM -0800, Manish Singh wrote:
<snip>Quoted 6 lines
Well, I really meant "%Zu". 'z' is a modifier that was introduced in C99, but it's only in very recent 2.4.x printk implementations, i.e. none of current AS 2.1, EL3, or UL have it, which means we can't use it. 'Z' is GNU extension (that's deprecated now in favor of the C99 modifier) that *is* in all the printks we need to support, so we should use that.
__attribute__format should know about both anyway.Any ideas on cleanly printing
sector_t? In 2.4 it was always a u32, now it is architecture dependent (u32 by default but set to u64 by most architectures including ia32 and ia64.)
Quoted 5 lines
Quoted 1 line
I'd suggest always casting to u64 and using %Lu.
How would you feel about always casting to (unsigned long long)? u64 is unsigned long on some arch's and unsigned long long on others. Specifically, we get warnings on ia64 and ppc64 since they both define u64 as unsigned long.
Ugh. That's going to be a general problem with all u64 values. Talking with Kurt and Mark here, they prefer a U64C define which expands to an unsigned long long cast. You're going to need that for the HI/LO removal too.
-Manish
Quoted 22 lines · Manish Singh
Quoted 15 lines · Rusty Lynch
Quoted 14 lines · Manish Singh
Quoted 12 lines · Rusty Lynch
On Fri, Feb 13, 2004 at 02:15:37PM -0800, Manish Singh wrote:
<snip>Quoted 6 lines
Well, I really meant "%Zu". 'z' is a modifier that was introduced in C99, but it's only in very recent 2.4.x printk implementations, i.e. none of current AS 2.1, EL3, or UL have it, which means we can't use it. 'Z' is GNU extension (that's deprecated now in favor of the C99 modifier) that *is* in all the printks we need to support, so we should use that.
__attribute__format should know about both anyway.Any ideas on cleanly printing
sector_t? In 2.4 it was always a u32, now it is architecture dependent (u32 by default but set to u64 by most architectures including ia32 and ia64.)Quoted 5 lines
Quoted 1 line
I'd suggest always casting to u64 and using %Lu.
How would you feel about always casting to (unsigned long long)? u64 is unsigned long on some arch's and unsigned long long on others. Specifically, we get warnings on ia64 and ppc64 since they both define u64 as unsigned long.
Quoted 5 lines
Ugh. That's going to be a general problem with all u64 values. Talking with Kurt and Mark here, they prefer a U64C define which expands to an unsigned long long cast. You're going to need that for the HI/LO removal too.
-Manish
I have something here that instead of doing crazy cast, with define a U64_MODIFIER that will expand appropriatly. So... it's always correct and much easier on the eyes.
printk's would look something like:
printk(KERN_DEBUG "size_t is %Zu, and a u64 is " U64_MODIFIER "\n", asize, au64value);
Let me do one more verification on the patch and I will send it out.
--rusty
Quoted 10 lines · Rusty Lynch
I have something here that instead of doing crazy cast, with define a
U64_MODIFIERthat will expand appropriatly. So... it's always correct and much easier on the eyes.printk's would look something like:
printk(KERN_DEBUG "size_t is %Zu, and a u64 is " U64_MODIFIER "\n", asize, au64value);Let me do one more verification on the patch and I will send it out.
--rusty
Have you seen how often we print out __u64's? I predict that chopping up our format strings with that will be much uglier than a cast macro ;)
--Mark
--
Mark Fasheh
Software Developer, Oracle Corp
[email protected]
Quoted 8 lines · Mark Fasheh
Quoted 7 lines · Rusty Lynch
I have something here that instead of doing crazy cast, with define a
U64_MODIFIERthat will expand appropriatly. So... it's always correct and much easier on the eyes.printk's would look something like:
printk(KERN_DEBUG "size_t is %Zu, and a u64 is " U64_MODIFIER "\n", asize, au64value);
Quoted 8 lines
Quoted 3 lines
Let me do one more verification on the patch and I will send it out.
--rustyHave you seen how often we print out __u64's? I predict that chopping up our format strings with that will be much uglier than a cast macro ;)
--Mark
Take a look at the following and see if it's too much.
--rusty
inode.c +36 -35
@@ -147,7 +147,7 @@mode_t mode;ocfs_file_entry *fe =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, %u, 0x%08x)\n" , inode, ino, opaque); +LOG_ENTRY_ARGS ("(%p, %lu, %p)\n" , inode, ino, opaque);if (opaque ==NULL || inode ==NULL ) goto bail;
@@ -167,13 +167,13 @@LOG_TRACE_STR ("find_inode -> S_ISDIR" );if (fe->extents[0 ].disk_off != fileOff) {LOG_TRACE_ARGS - ("DIR : inode number same but full offset does not match: %u.%u != %u.%u\n" , + ("DIR : inode number same but full offset does not match: " U64_MODIFIER " != " U64_MODIFIER "\n" , fe->extents[0 ].disk_off, fileOff); goto bail; } }else if (args->offset != fileOff) {LOG_TRACE_ARGS - ("FILE : inode number same but full offset does not match: %u.%u != %u.%u\n" , + ("FILE : inode number same but full offset does not match: " U64_MODIFIER " != " U64_MODIFIER "\n" , args->offset, fileOff); goto bail; }
@@ -237,7 +237,7 @@__u64 offset, fe_off;unsigned long uniq_ino; -LOG_ENTRY_ARGS ("(0x%08x, %u, size:%u)\n" , inode, mode, fe->file_size); +LOG_ENTRY_ARGS ("(%p, %u, size:" U64_MODIFIER ")\n" , inode, mode, fe->file_size); sb = inode->i_sb; osb = (ocfs_super *)OCFS_GENERIC_SB_P (sb);
@@ -274,8 +274,8 @@ inode->i_ino = uniq_ino;/* caller needs to know to call inode_hash_bind! */ } -LOG_TRACE_ARGS ("offset = %u.%u, ino = %lu, create_ino = %s\n" , -HILO (offset), inode->i_ino, +LOG_TRACE_ARGS ("offset = " U64_MODIFIER ", ino = %lu, create_ino = %s\n" , + offset, inode->i_ino, create_ino ?"true" :"false" );switch (inode->i_mode &S_IFMT ) {
@@ -418,7 +418,7 @@ocfs_file_entry *fe =NULL ;__u64 voteoff; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n" , inode, opaque); +LOG_ENTRY_ARGS ("(%p, %p)\n" , inode, opaque);if (inode ==NULL || inode->i_sb ==NULL ) {LOG_ERROR_STR ("bad inode" );
@@ -623,7 +623,7 @@ off = args->offset;/* Need to verify that ocfs_find_inode does the right thing, * and need to actually write ocfs_init_inode */ - inode =iget5_locked (sb,LO (off), ocfs_find_actor, + inode =iget5_locked (sb, off, ocfs_find_actor, ocfs_init_locked_inode, args); }
@@ -657,8 +657,8 @@ {ocfs_super *osb; -LOG_ENTRY_ARGS ("(0x%08x, inode_i_ino=%lu)\n" , inode, inode->i_ino); -LOG_TRACE_ARGS ("put_inode: count=%d\n" , inode->i_count); +LOG_ENTRY_ARGS ("(%p, inode_i_ino=%lu)\n" , inode, inode->i_ino); +LOG_TRACE_ARGS ("put_inode: count=%d\n" ,atomic_read (&inode->i_count)); osb =OCFS_GENERIC_SB_P (inode->i_sb);if (inode_data_is_oin (inode) && (atomic_read (&inode->i_count) ==1 ) ) {ocfs_inode *oin;
@@ -765,7 +765,7 @@ else LOG_TRACE_ARGS("Inode %lu (%u.%u) already deleted, ""skipping call to hash_remove\n" , - inode->i_ino, HILO(offset)); + inode->i_ino, offset); }#endif
@@ -783,7 +783,7 @@ {int ret; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u)\n" , file, page, from, to); +LOG_ENTRY_ARGS ("(%p, %p, %u, %u)\n" , file, page, from, to); ret =block_prepare_write (page, from, to, ocfs_get_block);
@@ -799,7 +799,7 @@ {int ret; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u)\n" , file, page, from, to); +LOG_ENTRY_ARGS ("(%p, %p, %u, %u)\n" , file, page, from, to); ret =generic_commit_write (file, page, from, to);
@@ -861,8 +861,8 @@int status =0 ;if (newsize > oin->alloc_size) { -LOG_TRACE_ARGS ("Extend: have=%u.%u, need=%u.%u\n" , -HILO (oin->alloc_size),HILO (newsize)); +LOG_TRACE_ARGS ("Extend: have=" U64_MODIFIER ", need=" U64_MODIFIER "\n" , + oin->alloc_size, newsize);if (unlock)ocfs_up_sem (&(oin->main_res));
@@ -875,7 +875,7 @@if (status <0 ) {LOG_ERROR_STATUS (status); -LOG_TRACE_ARGS ("Failed to extend file to %u.%u\n" ,HILO (newsize)); +LOG_TRACE_ARGS ("Failed to extend file to " U64_MODIFIER "\n" , newsize); status = -ENOSPC ; }
@@ -895,8 +895,8 @@__u64 entryOffset;struct buffer_head *bh =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, %d, 0x%08x, %d)\n" , inode, iblock, bh_result, - create); +LOG_ENTRY_ARGS ("(%p, " SECTOR_MODIFIER ", %p, %d)\n" , + inode, iblock, bh_result, create);if (!inode) {LOG_ERROR_STR ("bad inode" );
@@ -906,7 +906,8 @@ osb = (ocfs_super *)OCFS_GENERIC_SB_P (inode->i_sb);if ((iblock <<9 ) >PATH_MAX +1 ) { -LOG_ERROR_ARGS ("file offset > PATH_MAX: %u.%u" , iblock <<9 ); +LOG_ERROR_ARGS ("file offset > PATH_MAX: " +SECTOR_MODIFIER "" , iblock <<9 ); goto bail; }
@@ -924,14 +925,14 @@if (!IS_VALID_FILE_ENTRY (fe)) {OCFS_BH_PUT_DATA (bh); -LOG_ERROR_ARGS ("Invalid fe at offset %u.%u" ,HILO (entryOffset)); +LOG_ERROR_ARGS ("Invalid fe@offset " U64_MODIFIER "" , entryOffset); goto bail; }if ((iblock <<9 ) >= (__s64 )fe->alloc_size) {OCFS_BH_PUT_DATA (bh); -LOG_ERROR_ARGS ("file offset is outside the allocated size: %u.%u" , -HILO (iblock <<9 )); +LOG_ERROR_ARGS ("file offset is outside the allocated size: " +SECTOR_MODIFIER , iblock <<9 ); goto bail; }
@@ -962,8 +963,8 @@__u32 len;bool oin_locked = false; -LOG_ENTRY_ARGS ("(0x%08x, %d, 0x%08x, %d)\n" , inode, iblock, bh_result, - create); +LOG_ENTRY_ARGS ("(%p, " SECTOR_MODIFIER ", %p, %d)\n" , + inode, iblock, bh_result, create);if (S_ISLNK (inode->i_mode)) { err =ocfs_symlink_get_block (inode, iblock, bh_result, create);
@@ -1004,8 +1005,8 @@ err =ocfs_lookup_file_allocation (osb, oin, vbo, &lbo, len,NULL , (oin->journal_inode) ?NULL : inode);if (err <0 ) { -LOG_ERROR_ARGS ("vbo=%u.%u lbo=%u.%u len=%u" ,HILO (vbo), -HILO (lbo), len); +LOG_ERROR_ARGS ("vbo=" U64_MODIFIER " lbo=" U64_MODIFIER " len=%u" , vbo, + lbo, len); goto bail; }
@@ -1015,8 +1016,8 @@if (bh_result->b_blocknr ==0 ) { err = -EIO ; -LOG_ERROR_ARGS ("vbo=%u.%u lbo=%u.%u len=%u, fe=0x%08x" , -HILO (vbo),HILO (lbo), len, oin->file_disk_off); +LOG_ERROR_ARGS ("vbo=" U64_MODIFIER " lbo=" U64_MODIFIER " len=%u, fe=" U64_MODIFIER "" , + vbo, lbo, len, oin->file_disk_off); } bail:
@@ -1079,8 +1080,8 @@ err =ocfs_lookup_file_allocation (osb, oin, vbo, &lbo, len,NULL ,NULL );if (err <0 ) { -LOG_ERROR_ARGS ("vbo=%u.%u lbo=%u.%u len=%u" ,HILO (vbo), -HILO (lbo), len); +LOG_ERROR_ARGS ("vbo=" U64_MODIFIER " lbo=" U64_MODIFIER " len=%u" , vbo, + lbo, len);LOG_ERROR_STATUS (err); goto bail; }
@@ -1105,7 +1106,7 @@__s64 vbo =0 ;__s64 lbo =0 ; -LOG_ENTRY_ARGS ("(0x%08x, %d)\n" , inode, iblock); +LOG_ENTRY_ARGS ("(%p, %li)\n" , inode, iblock);if (!inode || !inode_data_is_oin (inode)) {LOG_ERROR_STR ("bad inode or inode has no oin" );
@@ -1130,8 +1131,8 @@ *oblock = lbo >> inode->i_sb->s_blocksize_bits;if (*oblock ==0 ) { err = -EIO ; -LOG_ERROR_ARGS ("vbo=%u.%u lbo=%u.%u len=%u, fe=0x%08x" , -HILO (vbo),HILO (lbo), len, oin->file_disk_off); +LOG_ERROR_ARGS ("vbo=" U64_MODIFIER " lbo=" U64_MODIFIER " len=%u, fe=" U64_MODIFIER "" , + vbo, lbo, len, oin->file_disk_off); } bail:
@@ -1150,7 +1151,7 @@ {int ret; -LOG_ENTRY_ARGS ("(0x%08x, %u)\n" , file, (page ? page->index :0 )); +LOG_ENTRY_ARGS ("(%p, %lu)\n" , file, (page ? page->index :0 )); ret =block_read_full_page (page, ocfs_get_block);
@@ -1179,7 +1180,7 @@ {int ret; -LOG_ENTRY_ARGS ("(0x%08x)\n" , page); +LOG_ENTRY_ARGS ("(%p)\n" , page); ret =block_write_full_page (page, ocfs_get_block);
extmap.c +12 -12
@@ -245,7 +245,7 @@ bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_coalesce_extent_map_entry */
@@ -304,7 +304,7 @@spin_unlock (&(map->lock)); bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_extent_map_add */
@@ -385,7 +385,7 @@spin_unlock (&(map->lock)); bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_extent_map_lookup */
@@ -430,7 +430,7 @@spin_unlock (&(map->lock)); bail: -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_extent_map_next_entry */
@@ -516,10 +516,10 @@ Results = false; *SectorCount =0xffffffffUL ; }else { - *SectorCount = (LO (LiSectorCount)) <<OCFS_LOG_SECTOR_SIZE ; + *SectorCount = (LiSectorCount &0x00000000FFFFFFFFUL ) <<OCFS_LOG_SECTOR_SIZE ; } -LOG_EXIT_ULONG (Results); +LOG_EXIT_STATUS (Results);return Results; }/* ocfs_get_next_extent_map_entry */
@@ -566,7 +566,7 @@ } } -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_lookup_extent_map_entry */
@@ -648,8 +648,8 @@if ((OcfsExtent->next_free_ext !=OCFS_MAX_DATA_EXTENTS ) && (*remainingLength)) { -LOG_ERROR_ARGS ("next_free_extent=%d, rem_len=%u.%u" , - OcfsExtent->next_free_ext,HILO (*remainingLength)); +LOG_ERROR_ARGS ("next_free_extent=%d, rem_len=" U64_MODIFIER "" , + OcfsExtent->next_free_ext, *remainingLength); }else status =0 ; }
@@ -689,10 +689,10 @@ ret =ocfs_extent_map_add (Map, ((__s64 ) Vbo), ((__s64 ) Lbo), ((__s64 ) ByteCount));if (!ret) -LOG_ERROR_ARGS ("fileoff=%u.%u, diskoff=%u.%u, len=%u.%u" , -HILO (Vbo),HILO (Lbo),HILO (ByteCount)); +LOG_ERROR_ARGS ("fileoff=" U64_MODIFIER ", diskoff=" U64_MODIFIER ", len=" U64_MODIFIER "" , + Vbo, Lbo, ByteCount); -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_add_extent_map_entry */
super.c +5 -5
@@ -326,7 +326,7 @@ inode =NULL ; } -LOG_EXIT_PTR (0 ); +LOG_EXIT_PTR (NULL );return NULL ; }/* ocfs_read_super */
@@ -355,7 +355,7 @@ goto bail; } -LOG_TRACE_ARGS ("strlen(options) = %d, options = \"%s\"\n" ,strlen (options), options); +LOG_TRACE_ARGS ("strlen(options) = %Zu, options = \"%s\"\n" ,strlen (options), options);#ifdef LINUX_2_5 while ( (c =strsep (&options,"," )) !=NULL )
@@ -675,7 +675,7 @@*/ static void ocfs_put_super (struct super_block *sb) { -LOG_ENTRY_ARGS ("(0x%08x)\n" , sb); +LOG_ENTRY_ARGS ("(%p)\n" , sb);ocfs_sync_blockdev (sb);LOG_TRACE_STR ("put super... do nothing! DONE!!!!" );
@@ -700,7 +700,7 @@ocfs_bitmap_lock *bm_lock =NULL ;struct buffer_head *bh =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n" , sb, buf); +LOG_ENTRY_ARGS ("(%p, %p)\n" , sb, buf); osb = (ocfs_super *)OCFS_GENERIC_SB_P (sb); numbits = osb->cluster_bitmap.validbits;
@@ -1064,7 +1064,7 @@__u32 tempmap;int i; -LOG_ENTRY_ARGS ("(0x%08x)\n" , sb); +LOG_ENTRY_ARGS ("(%p)\n" , sb);if (sb ==NULL ) {LOG_ERROR_STATUS (status = -EFAIL );
heartbeat.c +2 -2
@@ -56,7 +56,7 @@struct buffer_head **pub_bh = &osb->cfg_bhs[publish_idx];__u64 node_publ_off = osb->vol_layout.publ_sect_off + (osb->node_num * osb->sect_size); -LOG_ENTRY_ARGS ("(0x%08x, %u, %s)\n" , osb, flag, +LOG_ENTRY_ARGS ("(%p, %u, %s)\n" , osb, flag, read_publish ?"true" :"false" );if (flag &HEARTBEAT_METHOD_DISK ) {
@@ -124,7 +124,7 @@__u32 i;__u32 num_nodes; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u)\n" , osb, bhs, first_time); +LOG_ENTRY_ARGS ("(%p, %p, %u)\n" , osb, bhs, first_time); num_nodes =OCFS_MAXIMUM_NODES ; node_map = &(osb->vol_node_map);
proc.c +14 -14
@@ -174,7 +174,7 @@"%08x %9s %-40s %5d %u.%u\n" , item->address, slabname, item->tag,atomic_read (&p->lr_ref_cnt), - HILO(p->sector_num)); + p->sector_num); }else sprintf (tmpstr,"%08x %9s %-40s\n" , item->address, slabname, item->tag);
@@ -440,21 +440,21 @@if (pubmap != ptr) *(ptr -1 ) ='\0' ; -#define PROC_STATS \ - "File open count : %d.%u\n" \ - "Publish map : %s\n" \ - "Number of nodes : %u\n" \ - "Cluster size : %u\n" \ - "Volume size : %u.%u\n" \ - "Dir node size : %u.%u\n" \ - "File node size : %u.%u\n" \ - "Failed Large Allocs : %u\n" \ - "Retry Large Allocs : %u\n" \ +#define PROC_STATS \ + "File open count : " U64_MODIFIER "\n" \ + "Publish map : %s\n" \ + "Number of nodes : %u\n" \ + "Cluster size : %u\n" \ + "Volume size : " U64_MODIFIER "\n" \ + "Dir node size : " U64_MODIFIER "\n" \ + "File node size : " U64_MODIFIER "\n" \ + "Failed Large Allocs : %u\n" \ + "Retry Large Allocs : %u\n" \ "Inode Hash Objects : %u\n" - len =sprintf (page,PROC_STATS ,HILO (osb->file_open_cnt), pubmap, - vol->num_nodes, vol->cluster_size,HILO (vol->size), -HILO (vol->dir_node_size),HILO (vol->file_node_size), + len =sprintf (page,PROC_STATS , osb->file_open_cnt, pubmap, + vol->num_nodes, vol->cluster_size, vol->size, + vol->dir_node_size, vol->file_node_size, osb->cluster_bitmap.failed, osb->cluster_bitmap.ok_retries, osb->inode_hash.num_ents);
io.c +24 -24
154 lines not on this page · raw message
dcache.c +2 -2
@@ -48,7 +48,7 @@struct buffer_head *fe_bh =NULL ;int needs_trunc; -LOG_ENTRY_ARGS ("(0x%08x, %d, '%*s')\n" , dentry, flags, +LOG_ENTRY_ARGS ("(%p, %d, '%*s')\n" , dentry, flags, dentry->d_name.len, dentry->d_name.name); if ((inode = dentry->d_inode) == NULL ||
@@ -176,7 +176,7 @@struct list_head *list;int ret, done; -LOG_ENTRY_ARGS ("(0x%08x, '%*s')\n" , dentry, +LOG_ENTRY_ARGS ("(%p, '%*s')\n" , dentry, dentry->d_name.len, dentry->d_name.name);spin_lock (&dcache_lock);
journal.c +15 -19
@@ -96,7 +96,7 @@ retval->k_handle =journal_start (journal, max_buffs);if (IS_ERR (retval->k_handle)) {LOG_ERROR_STR ("journal_start() failed!" ); -LOG_ERROR_STATUS (PTR_ERR (retval->k_handle)); +LOG_ERROR_STATUS ((int )PTR_ERR (retval->k_handle)); retval->k_handle =NULL ; goto done_free; }
@@ -240,8 +240,8 @@ lock->flags, lock->res, (abort ? NULL : lock->bh), NULL);if (tmpstat <0 ) { -LOG_ERROR_ARGS ("Could not release lock %u.%u\n" , -HILO (lock->id)); +LOG_ERROR_ARGS ("Could not release lock " U64_MODIFIER "\n" , + lock->id);LOG_ERROR_STATUS (tmpstat); status = tmpstat; }
@@ -265,7 +265,7 @@int status = -ENOENT ;struct list_head *p1; -LOG_ENTRY_ARGS ("(%u.%u)\n" , lockid); +LOG_ENTRY_ARGS ("(" U64_MODIFIER ")\n" , lockid);/* make sure that we have a root_start off */ /* this can be called early in the first mount */
@@ -748,8 +748,8 @@ {ocfs_journal_lock *lock; -LOG_ENTRY_ARGS ("(id=%u.%u, type=%u, flags=%u, res=0x%08x, " -"bh=0x%08x)\n" ,HILO (id), type, flags, res, bh); +LOG_ENTRY_ARGS ("(id=" U64_MODIFIER ", type=%u, flags=%u, res=%p, " +"bh=%p)\n" , id, type, flags, res, bh); lock =ocfs_malloc (sizeof (ocfs_journal_lock));if (lock ==NULL ) {
@@ -882,10 +882,8 @@ } fe = (ocfs_file_entry *)OCFS_BH_GET_DATA_READ (bh);/* read */ } -LOG_TRACE_ARGS ("fe->file_size = %u.%u\n" ,HI (fe->file_size), -LO (fe->file_size)); -LOG_TRACE_ARGS ("fe->alloc_size = %u.%u\n" ,HI (fe->alloc_size), -LO (fe->alloc_size)); +LOG_TRACE_ARGS ("fe->file_size = " U64_MODIFIER "\n" , fe->file_size); +LOG_TRACE_ARGS ("fe->alloc_size = " U64_MODIFIER "\n" , fe->alloc_size);/* gonna need this later */ alloc_size = fe->alloc_size;
@@ -893,8 +891,7 @@/* Ok, look up the inode for our journal */ args.offset = fe->this_sector; args.fe_bh = bh; -LOG_TRACE_ARGS ("fe->this_sector = %u.%u\n" ,HI (fe->this_sector), -LO (fe->this_sector)); +LOG_TRACE_ARGS ("fe->this_sector = " U64_MODIFIER "\n" , fe->this_sector);OCFS_BH_PUT_DATA (bh); fe =NULL ;#ifdef LINUX_2_5
@@ -914,15 +911,14 @@ status = -EACCES ; goto done; } -LOG_TRACE_ARGS ("inode->i_size = %u\n" , inode->i_size); +LOG_TRACE_ARGS ("inode->i_size = %Lu\n" , inode->i_size); status =ocfs_create_new_oin (&oin, alloc_size, osb); status =ocfs_initialize_oin (oin, osb,0 , lock_id, lock_id, false,NULL ); oin->journal_inode = true; oin->open_hndl_cnt++;SET_INODE_OIN (inode, oin); -LOG_TRACE_ARGS ("oin->alloc_size = %u.%u\n" ,HI (oin->alloc_size), -LO (oin->alloc_size)); +LOG_TRACE_ARGS ("oin->alloc_size = " U64_MODIFIER "\n" , oin->alloc_size);/* call the kernels journal init function now */ k_journal =journal_init_inode (inode);
@@ -1328,8 +1324,8 @@ status = -EINVAL ; goto bail; } -LOG_TRACE_ARGS ("(Run %d), lbo = %d.%d bytes, numbytes = %u " -"bytes\n" , run,HILO (lbo), numbytes); +LOG_TRACE_ARGS ("(Run %d), lbo = " U64_MODIFIER " bytes, numbytes = %u " +"bytes\n" , run, lbo, numbytes);/* there are actually returned in bytes. need blocks. */ numblks = numbytes / osb->sect_size;
@@ -1537,7 +1533,7 @@ status = -EACCES ; goto done; } -LOG_TRACE_ARGS ("inode->i_size = %u\n" , inode->i_size); +LOG_TRACE_ARGS ("inode->i_size = %Lu\n" , inode->i_size); status =ocfs_create_new_oin (&oin, alloc_size, osb);if (status <0 ) {
@@ -1654,7 +1650,7 @@struct buffer_head *publish_bh =NULL ;__u64 node_publ_off; -LOG_ENTRY_ARGS ("(0x%08x, %u.%u)\n" , osb,HI (node_num),LO (node_num)); +LOG_ENTRY_ARGS ("(%p, " U64_MODIFIER ")\n" , osb, node_num);/* take a lock on the publish sector */ down (&(osb->publish_lock));
nm.c +17 -17
@@ -158,13 +158,13 @@ocfs_publish * publish;struct ocfs_sched_vote *sv =NULL ; -LOG_ENTRY_ARGS ("(vote_node = %d, bh = 0x%x)\n" , vote_node, bh); +LOG_ENTRY_ARGS ("(vote_node = %d, bh = %p)\n" , vote_node, bh); publish = (ocfs_publish *)OCFS_BH_GET_DATA_READ (bh);/* read */ if (osb->last_publ_seq_num[vote_node] == publish->publ_seq_num){ -LOG_TRACE_ARGS ("Already voted on node %d, seqnum (%u.%u)\n" , - vote_node,HILO (publish->publ_seq_num)); +LOG_TRACE_ARGS ("Already voted on node %d, seqnum (" U64_MODIFIER ")\n" , + vote_node, publish->publ_seq_num);OCFS_BH_PUT_DATA (bh); status =0 ; goto bail;
@@ -310,7 +310,7 @@atomic_inc (&osb->nm_init); } -LOG_TRACE_ARGS ("Publish map: 0x%08x\n" ,LO (osb->publ_map)); +LOG_TRACE_ARGS ("Publish map: " U64_MODIFIER "\n" , osb->publ_map);/* map of local node */ curr_node_map = (__u64) ((__u64 )1 << osb->node_num);
@@ -433,7 +433,7 @@int status =0 ;ocfs_file_entry *fe; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, 0x%08x)\n" , osb, lock_res, bh); +LOG_ENTRY_ARGS ("(%p, %p, %p)\n" , osb, lock_res, bh);/* Don't sync-read if we already own the lock as it may not * have hit disk yet. */
@@ -447,8 +447,8 @@ status =ocfs_acquire_lockres_ex (lock_res, timeout);if (status <0 ) { -LOG_TRACE_ARGS ("Timedout locking lockres for id: %u.%u\n" , -HILO (lock_res->sector_num)); +LOG_TRACE_ARGS ("Timedout locking lockres for id: " U64_MODIFIER "\n" , + lock_res->sector_num); goto finally; }
@@ -487,8 +487,8 @@ocfs_lock_res *tmp_lockres =NULL ;struct buffer_head *tmpbh =NULL , **b =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, %u.%u, 0x%08x, 0x%08x, 0x%08x)\n" , osb, -HI (lock_id),LO (lock_id), lockres, bh, updated); +LOG_ENTRY_ARGS ("(%p, " U64_MODIFIER ", %p, %p, %p)\n" , + osb, lock_id, lockres, bh, updated);if (bh ==NULL ) b = &tmpbh;
@@ -720,7 +720,7 @@__u64 lock_id, seq_num;int needs_trunc =0 ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x)\n" , osb, ctxt); +LOG_ENTRY_ARGS ("(%p, %p)\n" , osb, ctxt);if (!publish && !dlm_msg) { status = -EINVAL ;
@@ -743,8 +743,8 @@ } lockflags = (lock_id >= osb->vol_layout.bitmap_off ?OCFS_BH_CACHED :0 ); -LOG_TRACE_ARGS ("node=%u, id=%u.%u, seq=%u.%u\n" , node_num, -HILO (lock_id),HILO (seq_num)); +LOG_TRACE_ARGS ("node=%u, id=" U64_MODIFIER ", seq=" U64_MODIFIER "\n" , node_num, + lock_id, seq_num);if (disk_vote) { offset = osb->vol_layout.vote_sect_off + (osb->node_num * osb->sect_size);
@@ -765,8 +765,8 @@ }else { status =ocfs_acquire_lockres_ex (lockres, (OCFS_NM_HEARTBEAT_TIME /2 ));if (status <0 ) { -LOG_TRACE_ARGS ("Timedout locking lockres for id: %u.%u\n" , -HILO (lockres->sector_num)); +LOG_TRACE_ARGS ("Timedout locking lockres for id: " U64_MODIFIER "\n" , + lockres->sector_num);ocfs_put_lockres (lockres); goto leave; }
@@ -775,7 +775,7 @@ vote_type =get_process_vote_action (osb, lockres, node_num, flags, status, &master_alive, &oin); -printk ("ocfs_process_vote: %s request for lockid: %u.%u, action: %s, type: %s\n" , +printk ("ocfs_process_vote: %s request for lockid: " U64_MODIFIER ", action: %s, type: %s\n" , flags &FLAG_RELEASE_LOCK ?"RELEASE" : (flags &FLAG_ACQUIRE_LOCK ?"ACQUIRE" :"MODIFY" ), lock_id, process_vote_strings[vote_type], disk_vote ?"disk vote" :"net vote" );
@@ -938,8 +938,8 @@* him the lock if it's part of the cache and * we can flush it... */ -LOG_TRACE_ARGS ("Lock id (%u.%u) has %u holders\n" , -HILO (lockres->sector_num), +LOG_TRACE_ARGS ("Lock id (" U64_MODIFIER ") has %u holders\n" , + lockres->sector_num, lockres->lock_holders);/* Try to take the trans_lock. We try a couple
ioctl.c +1 -1
@@ -40,7 +40,7 @@extern char *ocfs_version;int ret =0 ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %lu)\n" , inode, filp, cmd, arg); +LOG_ENTRY_ARGS ("(%p, %p, %u, %lu)\n" , inode, filp, cmd, arg);if (_IOC_TYPE (cmd) !=OCFS_IOC_MAGIC ) { ret = -ENOTTY ;
dlm.c +53 -60
294 lines not on this page · raw message
bitmap.c +5 -5
@@ -42,7 +42,7 @@ {__u32 tmp; -LOG_ENTRY_ARGS ("(0x%08x, %u, %u)\n" , bitmap, validbits, allocbits); +LOG_ENTRY_ARGS ("(%p, %u, %u)\n" , bitmap, validbits, allocbits); bitmap->validbits = validbits; bitmap->allocbits = allocbits;
@@ -137,7 +137,7 @@int c;struct buffer_head *currbh =NULL ; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, %u, %u, %u)\n" , osb, bitmap, numBits, +LOG_ENTRY_ARGS ("(%p, %p, %u, %u, %u)\n" , osb, bitmap, numBits, offset, sysonly); globalsize = bitmap->validbits - sysonly;
@@ -258,7 +258,7 @@OCFS_BH_PUT_DATA (currbh); } -LOG_EXIT_ULONG (count); +LOG_EXIT_STATUS (count);return count; }/* ocfs_count_bits */
@@ -277,7 +277,7 @@void *buff;int i, local; -LOG_ENTRY_ARGS ("(0x%08x, %u, %u)\n" , bitmap, start, num); +LOG_ENTRY_ARGS ("(%p, %u, %u)\n" , bitmap, start, num);if ((start + num) > bitmap->validbits) { LOG_ERROR_ARGS("bitmap->validbits = %u but start = %u and " \
@@ -318,7 +318,7 @@void *buff;int i, local; -LOG_ENTRY_ARGS ("(0x%08x, %u, %u)\n" , bitmap, start, num); +LOG_ENTRY_ARGS ("(%p, %u, %u)\n" , bitmap, start, num);if ((start + num) > bitmap->validbits) { LOG_ERROR_ARGS("bitmap->validbits = %u but start = %u and " \
vote.c +8 -10
@@ -118,10 +118,10 @@struct sockaddr_in sin;mm_segment_t oldfs; -LOG_ENTRY_ARGS ("(votemap=0x%x)\n" ,LO (votemap)); +LOG_ENTRY_ARGS ("(" U64_MODIFIER ")\n" , votemap); oldfs =get_fs (); -for (map =LO (votemap), num =0 ; map !=0 ; map >>=1 , num++) { +for (map = votemap, num =0 ; map !=0 ; map >>=1 , num++) {if (num == osb->node_num)continue ;
@@ -362,10 +362,9 @@ goto bail; } -LOG_TRACE_ARGS ("node=%u, lockid=%u.%u, seq=%u.%u, vote=%d\n" , - dlm_msg->src_node,HI (reply_msg->lock_id), -LO (reply_msg->lock_id),HI (reply_msg->lock_seq_num), -LO (reply_msg->lock_seq_num), reply->status); +LOG_TRACE_ARGS ("node=%u, lockid=" U64_MODIFIER ", seq=" U64_MODIFIER ", vote=%d\n" , + dlm_msg->src_node, reply_msg->lock_id, + reply_msg->lock_seq_num, reply->status); ctxt.reply_method =COMM_VOTE ; ctxt.got_vote_map = &(lockres->got_vote_map);
@@ -388,9 +387,8 @@ (reply_msg->flags & FLAG_FILE_UPDATE)) lockres->oin_openmap = lockres->tmp_openmap; lockres->tmp_openmap =0 ; -LOG_TRACE_ARGS ("OK vote, lockid=%u.%u, map: 0x%08x\n" , -HI (lockres->sector_num),LO (lockres->sector_num), -LO (lockres->got_vote_map)); +LOG_TRACE_ARGS ("OK vote, lockid=" U64_MODIFIER ", map: " U64_MODIFIER "\n" , + lockres->sector_num, lockres->got_vote_map); lockres->vote_state =0 ;atomic_set (&lockres->voted_event_woken,1 );wake_up (&lockres->voted_event);
@@ -512,7 +510,7 @@__u32 msg_len;ocfs_dlm_msg_hdr *req; -LOG_ENTRY_ARGS ("(osb=0x%08x, vm=0x%08x)\n" , osb,LO (vote_map)); +LOG_ENTRY_ARGS ("(osb=%p, vm=" U64_MODIFIER ")\n" , osb, vote_map); msg_len =sizeof (ocfs_dlm_msg) -1 +sizeof (ocfs_dlm_req_master);
util.c +4 -4
@@ -270,7 +270,7 @@ *oin =GET_INODE_OIN (inode); *off =GET_INODE_VOTEOFF (inode); -LOG_TRACE_ARGS ("offset=%u.%u, i_ino=%u\n" ,HILO ((*off)), inode->i_ino); +LOG_TRACE_ARGS ("offset=" U64_MODIFIER ", i_ino=%lu\n" , (*off), inode->i_ino);if (*off ==-1 )BUG ();
@@ -388,9 +388,9 @@void ocfs_truncate_inode_pages (struct inode *inode,loff_t off) {#if LINUX_VERSION_CODE <=LinuxVersionCode (2 ,4 ,10 ) -LOG_TRACE_ARGS ("NOT truncating pages for inode %p from offset %u.%u\n" , inode, off); +LOG_TRACE_ARGS ("NOT truncating pages for inode %p from offset " U64_MODIFIER "\n" , inode, off);#else -LOG_TRACE_ARGS ("truncating pages for inode %p from offset %u.%u\n" , inode, off); +LOG_TRACE_ARGS ("truncating pages for inode %p from offset %Lu\n" , inode, off);truncate_inode_pages (&inode->i_data, off);#endif }/* ocfs_truncate_inode_pages */
@@ -471,7 +471,7 @@ addr = *stack++;if (ocfs_kernel_text_address (addr)) {// lookup_symbol(addr, buffer, 512); -printk ("[<%08lx>] %s (0x%x)\n" , addr," " ,stack-1 ); +printk ("[<%08lx>] %s (%p)\n" , addr," " ,stack-1 ); } }printk ("\n" );
dir.c +13 -13
@@ -54,7 +54,7 @@int ret =0 ;struct inode *inode = filp->f_dentry->d_inode; -LOG_ENTRY_ARGS ("(0x%08x, 0x%08x, '%*s')\n" , filp, dirent, +LOG_ENTRY_ARGS ("(%p, %p, '%*s')\n" , filp, dirent, filp->f_dentry->d_name.len, filp->f_dentry->d_name.name); pos = filp->f_pos;
@@ -126,11 +126,11 @@break ; entry = (ocfs_file_entry *)OCFS_BH_GET_DATA_READ (entry_bh);/* read */ r=filldir (dirent, entry->filename,strlen (entry->filename), filp->f_pos, -LO (entry->this_sector),DT_UNKNOWN ); + entry->this_sector,DT_UNKNOWN );if (r <0 ) {memcpy (ofile->filldir.fname, entry->filename,OCFS_MAX_FILENAME_LENGTH ); ofile->filldir.pos = filp->f_pos; - ofile->filldir.ino =LO (entry->this_sector); + ofile->filldir.ino = entry->this_sector; }OCFS_BH_PUT_DATA (entry_bh);brelse (entry_bh);
@@ -175,7 +175,7 @@/* TODO: change this to take a buffer head instead of fe */ -LOG_ENTRY_ARGS ("(osb=%p, parent=%u.%u, fname=%p, fe_bh=%p, ofile=%p, inode=%p)\n" , osb, parent_off, file_name, fe_bh, ofile, inode); +LOG_ENTRY_ARGS ("(osb=%p, parent=" U64_MODIFIER ", fname=%p, fe_bh=%p, ofile=%p, inode=%p)\n" , osb, parent_off, file_name, fe_bh, ofile, inode); nbhs = osb->vol_layout.dir_node_size >>9 ; bufsz = nbhs * (sizeof (struct buffer_head *));
@@ -503,7 +503,7 @@if (DirNode)ocfs_safefree (DirNode); -LOG_EXIT_ULONG (bRet); +LOG_EXIT_STATUS (bRet);return bRet; }/* ocfs_search_dir_node */
@@ -618,7 +618,7 @@ bail:if (DirNode)OCFS_BH_PUT_DATA (bhs[0 ]); -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_find_index */
@@ -1091,9 +1091,9 @@ locknode_off = LockNode->node_disk_off; locknode_head_del = LockNode->head_del_ent_node; -LOG_TRACE_ARGS ("ocfs_insert_file: head_del=%u.%u, free_node=%u.%u, locknode=%u.%u\n" , -HILO (LockNode->head_del_ent_node),HILO (LockNode->free_node_ptr), -HILO (locknode_off)); +LOG_TRACE_ARGS ("ocfs_insert_file: head_del=" U64_MODIFIER ", free_node=" U64_MODIFIER ", locknode=" U64_MODIFIER "\n" , + LockNode->head_del_ent_node, LockNode->free_node_ptr, + locknode_off);if (locknode_head_del !=INVALID_NODE_POINTER ) dir_off = locknode_head_del;
@@ -1102,7 +1102,7 @@else dir_off = locknode_off; -LOG_TRACE_ARGS ("ocfs_insert_file: dir_off selected was %u.%u\n" ,HILO (dir_off)); +LOG_TRACE_ARGS ("ocfs_insert_file: dir_off selected was " U64_MODIFIER "\n" , dir_off); parent_is_lock_node = (dir_off == locknode_off);OCFS_BH_PUT_DATA (lock_bh);
@@ -1143,7 +1143,7 @@/* start from locknode, travel along next_node_ptr */ dir_off = locknode_off;while (1 ) { -LOG_TRACE_ARGS ("ocfs_insert_file: now checking %u.%u\n" , dir_off); +LOG_TRACE_ARGS ("ocfs_insert_file: now checking " U64_MODIFIER "\n" , dir_off); status =ocfs_read_dirnode (osb, dir_off, false, bhs, dir_inode);if (status <0 ) {LOG_ERROR_STATUS (status);
@@ -1157,12 +1157,12 @@ DirNode =NULL ;if (dir_num_ent_used < osb->max_dir_node_ent) { -LOG_TRACE_ARGS ("ocfs_insert_file: num_ent_used for %u.%u is good (%d)\n" , dir_off, +LOG_TRACE_ARGS ("ocfs_insert_file: num_ent_used for " U64_MODIFIER " is good (%d)\n" , dir_off, dir_num_ent_used); new_head_del = dir_off;break ; } -LOG_TRACE_ARGS ("ocfs_insert_file: next_node pointer for %u.%u is %u.%u\n" , dir_off, dir_next_node); +LOG_TRACE_ARGS ("ocfs_insert_file: next_node pointer for " U64_MODIFIER " is " U64_MODIFIER "\n" , dir_off, dir_next_node); dir_off = dir_next_node;if (dir_off ==INVALID_NODE_POINTER ) { new_head_del =INVALID_NODE_POINTER ;
sysfile.c +9 -10
@@ -145,10 +145,10 @@int flags =OCFS_BH_CACHED ;bool bWriteThru = false; -LOG_ENTRY_ARGS ("(FileId = %u, metadatafile = %u, offset = (%u.%u), " -"Length = (%u.%u))\n" , FileId, -OCFS_FILE_VOL_META_DATA + osb->node_num,HILO (Offset), -HILO (Length)); +LOG_ENTRY_ARGS ("(FileId = %u, metadatafile = %u, offset = (" U64_MODIFIER "), " +"Length = (" U64_MODIFIER "))\n" , FileId, +OCFS_FILE_VOL_META_DATA + osb->node_num, Offset, + Length);if ((FileId == (OCFS_FILE_VOL_LOG_FILE + osb->node_num)) || (FileId == (OCFS_FILE_VOL_META_DATA + osb->node_num))) {
@@ -273,7 +273,7 @@if (Buffer)vfree (Buffer); -LOG_EXIT_ARGS ("%u.%u" ,HI (StartOffset),LO (StartOffset)); +LOG_EXIT_ARGS ("" U64_MODIFIER "" , StartOffset);return StartOffset; }/* ocfs_file_to_disk_off */
@@ -312,7 +312,7 @@ fe = (ocfs_file_entry *)OCFS_BH_GET_DATA_READ (fe_bh);/* read */ if (!IS_VALID_FILE_ENTRY (fe)) { -LOG_ERROR_ARGS ("offset=%u.%u" ,HILO (offset)); +LOG_ERROR_ARGS ("offset=" U64_MODIFIER "" , offset); status = -EINVAL ; goto leave; }
@@ -351,8 +351,7 @@char *data;struct buffer_head **bhs; -LOG_ENTRY_ARGS ("(FileId = %u, Size = %u.%u)\n" , FileId,HI (FileSize), -LO (FileSize)); +LOG_ENTRY_ARGS ("(FileId = %u, Size = " U64_MODIFIER ")\n" , FileId, FileSize);OCFS_ASSERT (osb);
@@ -775,8 +774,8 @@ }if (allocSize < neededSize) { -LOG_TRACE_ARGS ("allocSize(%u.%u) < neededSize(%u.%u)" , -HILO (allocSize),HILO (neededSize)); +LOG_TRACE_ARGS ("allocSize(" U64_MODIFIER ") < neededSize(" U64_MODIFIER ")" , + allocSize, neededSize); status =ocfs_extend_system_file (osb, (OCFS_FILE_VOL_META_DATA + osb->node_num), neededSize,NULL ,NULL , false);
file.c +28 -29
167 lines not on this page · raw message
volcfg.c +3 -3
@@ -76,12 +76,12 @@ }if (atomic_read (&osb->lock_stop)) { -LOG_TRACE_ARGS ("Last Lock written : %d\n" , jiffies); +LOG_TRACE_ARGS ("Last Lock written : %lu\n" , jiffies);atomic_set (&osb->lock_event_woken,1 );brelse (bh);wake_up (&osb->lock_event); }else { -LOG_TRACE_ARGS ("Lock written : %d\n" , jiffies); +LOG_TRACE_ARGS ("Lock written : %lu\n" , jiffies);mod_timer (&osb->lock_timer, jiffies +OCFS_VOLCFG_LOCK_ITERATE ); }
@@ -400,7 +400,7 @@ lock_buf =NULL ;/* Set timer to reiterate lock every few jiffies */ -LOG_TRACE_ARGS ("Start Timer: %d\n" , jiffies); +LOG_TRACE_ARGS ("Start Timer: %lu\n" , jiffies); osb->lock_timer.expires = jiffies +OCFS_VOLCFG_LOCK_ITERATE ;/* we get_bh here because we brelse later in
hash.c +57 -60
288 lines not on this page · raw message
sem.c +1 -1
@@ -92,7 +92,7 @@ } } -LOG_EXIT_ULONG (ret); +LOG_EXIT_STATUS (ret);return ret; }/* ocfs_down_sem */
oin.c +7 -7
@@ -467,7 +467,7 @@int status =0 ;ocfs_inode *oin =NULL ; -LOG_ENTRY_ARGS ("(alloc_size = %u.%u)\n" ,HILO (alloc_size)); +LOG_ENTRY_ARGS ("(alloc_size = " U64_MODIFIER ")\n" , alloc_size);OCFS_ASSERT (osb);
@@ -650,7 +650,7 @@__u64 savedOffset = oin->file_disk_off;CLEAR_INODE_OIN (inode); -LOG_TRACE_ARGS ("inode oin cleared / flags: %d / offset: %u.%u\n" , +LOG_TRACE_ARGS ("inode oin cleared / flags: %d / offset: " U64_MODIFIER "\n" , inode->i_flags, savedOffset); }
@@ -696,7 +696,7 @@int status =0 ; -LOG_ENTRY_ARGS ("(oin = 0x%08x)\n" , oin); +LOG_ENTRY_ARGS ("(oin = %p)\n" , oin);if (oin ==NULL ) goto bail;
@@ -731,8 +731,8 @@ lockResource = (ocfs_lock_res *) oin->lock_res;if (lockResource ==NULL ) {LOG_ERROR_ARGS ("lockres=null, oin->file_disk_off " -"= %u.%u\n" , -HILO (oin->file_disk_off)); +"= " U64_MODIFIER "\n" , + oin->file_disk_off); goto bail; }
@@ -763,7 +763,7 @@if (val == lockResource)ocfs_remove_sector_node (osb, val);else -LOG_ERROR_ARGS ("(lres=0x%08x) != (val=0x%08x)" , +LOG_ERROR_ARGS ("(lres=%p) != (val=%p)" , lockResource, val);ocfs_put_lockres (val); }else {
@@ -773,7 +773,7 @@LOG_TRACE_ARGS ("hashtable already destroyed\n" ); goto bail; } -LOG_ERROR_ARGS ("lres=0x%08x is not in the hash!" , +LOG_ERROR_ARGS ("lres=%p is not in the hash!" , lockResource); }ocfs_put_lockres (oin->lock_res);
symlink.c +1 -1
@@ -121,7 +121,7 @@struct inode *inode = (struct inode *)data;ocfs_super *osb = (ocfs_super *)OCFS_GENERIC_SB_P (inode->i_sb); -sprintf (buf,"%ld" ,osb->node_num); +sprintf (buf,"%u" ,osb->node_num); l =strlen (buf);if (str) {
inc/ocfs.h +14 -7
@@ -96,6 +96,18 @@#include "journal.h" +#if defined(__ia64__) || defined(__ppc64__) +#define U64_MODIFIER "%lu" +#else +#define U64_MODIFIER "%Lu" +#endif + +#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,0 ) +#define SECTOR_MODIFIER U64_MODIFIER +#else +#define SECTOR_MODIFIER "%lu" +#endif +typedef enum { false =0 , true =1 }ocfs_bool ;/* This should be removed and all old code fixed to just use ocfs_bool */
@@ -1162,11 +1174,6 @@extern __u32 debug_level;extern __u32 debug_exclude; -#define HI (val) ((unsigned long)(((val) >> 16) >> 16)) -#define LO (val) ((unsigned long)((val) & 0x00000000FFFFFFFFUL)) - -#define HILO (val) HI(val), LO(val) -/* Tracing Levels */ #define OCFS_DEBUG_LEVEL_ERROR 0x00000001#define OCFS_DEBUG_LEVEL_TRACE 0x00000002
@@ -1399,8 +1406,8 @@#define LOG_EXIT () LOG_EXIT_ARGS(NULL)#define LOG_EXIT_STATUS (val) LOG_EXIT_ARGS("%d ", val)#define LOG_EXIT_LONG (val) LOG_EXIT_ARGS("%d ", val) -#define LOG_EXIT_ULONG (val) LOG_EXIT_ARGS("%u ", val) -#define LOG_EXIT_PTR (val) LOG_EXIT_ARGS("0x%08x ", val) +#define LOG_EXIT_ULONG (val) LOG_EXIT_ARGS("%lu ", val) +#define LOG_EXIT_PTR (val) LOG_EXIT_ARGS("%p ", val)/* TRACE macros */
inc/io.h +2 -2
@@ -278,13 +278,13 @@BUG (); }else if (bh->b_blocknr !=4720 ) {OCFS_DO_HEX_DUMP (bh); -printk ("uh oh! dirnode is being written at blocknr=%u!\n" , bh->b_blocknr); +printk ("uh oh! dirnode is being written at blocknr=%lu!\n" , 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 (%u)\n" , +printk ("uh oh! fe->this_sector (%u) != blocknr (%lu)\n" , (__u32)(fe->this_sector>>9 ), bh->b_blocknr);BUG (); }else if (fe->extents[0 ].disk_off >>9 ==4720 ) {
namei.c +25 -25
162 lines not on this page · raw message
alloc.c +36 -40
220 lines not on this page · raw message
Makefile +1 -1
@@ -2,7 +2,7 @@ include $(TOPDIR)/Preamble.make -WARNINGS = -Wall -Wstrict-prototypes -Wno-format +WARNINGS = -Wall -Wstrict-prototypes ifneq ($(OCFS_PROCESSOR),x86_64) WARNINGS += -Wmissing-prototypes -Wmissing-declarations