From 382066da251132f768380f4852ed5afb72d88f80 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Wed, 24 May 2006 10:22:09 -0400 Subject: [GFS2] Casts for printing 64bit numbers Signed-off-by: Steven Whitehouse --- fs/gfs2/glock.c | 5 +++-- fs/gfs2/meta_io.c | 7 ++++--- fs/gfs2/ondisk.c | 24 ++++++++++++------------ fs/gfs2/rgrp.c | 4 ++-- fs/gfs2/util.c | 11 ++++++----- 5 files changed, 27 insertions(+), 24 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 2ef8accf1cb..0603a6de52c 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -2196,7 +2196,8 @@ static int dump_inode(struct gfs2_inode *ip) printk(KERN_INFO " Inode:\n"); printk(KERN_INFO " num = %llu %llu\n", - ip->i_num.no_formal_ino, ip->i_num.no_addr); + (unsigned long long)ip->i_num.no_formal_ino, + (unsigned long long)ip->i_num.no_addr); printk(KERN_INFO " type = %u\n", IF2DT(ip->i_di.di_mode)); printk(KERN_INFO " i_count = %d\n", atomic_read(&ip->i_count)); printk(KERN_INFO " i_flags ="); @@ -2228,7 +2229,7 @@ static int dump_glock(struct gfs2_glock *gl) spin_lock(&gl->gl_spin); printk(KERN_INFO "Glock (%u, %llu)\n", gl->gl_name.ln_type, - gl->gl_name.ln_number); + (unsigned long long)gl->gl_name.ln_number); printk(KERN_INFO " gl_flags ="); for (x = 0; x < 32; x++) if (test_bit(x, &gl->gl_flags)) diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index b9895bbd5fe..c78517225f6 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c @@ -65,7 +65,7 @@ static void stuck_releasepage(struct buffer_head *bh) fs_warn(sdp, "stuck in gfs2_releasepage() %p\n", inode); fs_warn(sdp, "blkno = %llu, bh->b_count = %d\n", - (uint64_t)bh->b_blocknr, atomic_read(&bh->b_count)); + (unsigned long long)bh->b_blocknr, atomic_read(&bh->b_count)); fs_warn(sdp, "pinned = %u\n", buffer_pinned(bh)); fs_warn(sdp, "bh->b_private = %s\n", (bd) ? "!NULL" : "NULL"); @@ -75,7 +75,7 @@ static void stuck_releasepage(struct buffer_head *bh) gl = bd->bd_gl; fs_warn(sdp, "gl = (%u, %llu)\n", - gl->gl_name.ln_type, gl->gl_name.ln_number); + gl->gl_name.ln_type, (unsigned long long)gl->gl_name.ln_number); fs_warn(sdp, "bd_list_tr = %s, bd_le.le_list = %s\n", (list_empty(&bd->bd_list_tr)) ? "no" : "yes", @@ -89,7 +89,8 @@ static void stuck_releasepage(struct buffer_head *bh) return; fs_warn(sdp, "ip = %llu %llu\n", - ip->i_num.no_formal_ino, ip->i_num.no_addr); + (unsigned long long)ip->i_num.no_formal_ino, + (unsigned long long)ip->i_num.no_addr); fs_warn(sdp, "ip->i_count = %d, ip->i_vnode = %s\n", atomic_read(&ip->i_count), (ip->i_vnode) ? "!NULL" : "NULL"); diff --git a/fs/gfs2/ondisk.c b/fs/gfs2/ondisk.c index b3bc21a6ba0..be5c86e5787 100644 --- a/fs/gfs2/ondisk.c +++ b/fs/gfs2/ondisk.c @@ -50,8 +50,8 @@ void gfs2_inum_out(const struct gfs2_inum *no, char *buf) static void gfs2_inum_print(struct gfs2_inum *no) { - pv(no, no_formal_ino, "%llu"); - pv(no, no_addr, "%llu"); + printk(KERN_INFO " no_formal_ino = %llu\n", (unsigned long long)no->no_formal_ino); + printk(KERN_INFO " no_addr = %llu\n", (unsigned long long)no->no_addr); } static void gfs2_meta_header_in(struct gfs2_meta_header *mh, char *buf) @@ -111,10 +111,10 @@ void gfs2_rindex_in(struct gfs2_rindex *ri, char *buf) void gfs2_rindex_print(struct gfs2_rindex *ri) { - pv(ri, ri_addr, "%llu"); + printk(KERN_INFO " ri_addr = %llu\n", (unsigned long long)ri->ri_addr); pv(ri, ri_length, "%u"); - pv(ri, ri_data0, "%llu"); + printk(KERN_INFO " ri_data0 = %llu\n", (unsigned long long)ri->ri_data0); pv(ri, ri_data, "%u"); pv(ri, ri_bitbytes, "%u"); @@ -226,16 +226,16 @@ void gfs2_dinode_print(struct gfs2_dinode *di) pv(di, di_uid, "%u"); pv(di, di_gid, "%u"); pv(di, di_nlink, "%u"); - pv(di, di_size, "%llu"); - pv(di, di_blocks, "%llu"); - pv(di, di_atime, "%lld"); - pv(di, di_mtime, "%lld"); - pv(di, di_ctime, "%lld"); + printk(KERN_INFO " di_size = %llu\n", (unsigned long long)di->di_size); + printk(KERN_INFO " di_blocks = %llu\n", (unsigned long long)di->di_blocks); + printk(KERN_INFO " di_atime = %lld\n", (long long)di->di_atime); + printk(KERN_INFO " di_mtime = %lld\n", (long long)di->di_mtime); + printk(KERN_INFO " di_ctime = %lld\n", (long long)di->di_ctime); pv(di, di_major, "%u"); pv(di, di_minor, "%u"); - pv(di, di_goal_meta, "%llu"); - pv(di, di_goal_data, "%llu"); + printk(KERN_INFO " di_goal_meta = %llu\n", (unsigned long long)di->di_goal_meta); + printk(KERN_INFO " di_goal_data = %llu\n", (unsigned long long)di->di_goal_data); pv(di, di_flags, "0x%.8X"); pv(di, di_payload_format, "%u"); @@ -244,7 +244,7 @@ void gfs2_dinode_print(struct gfs2_dinode *di) pv(di, di_depth, "%u"); pv(di, di_entries, "%u"); - pv(di, di_eattr, "%llu"); + printk(KERN_INFO " di_eattr = %llu\n", (unsigned long long)di->di_eattr); } void gfs2_log_header_in(struct gfs2_log_header *lh, char *buf) diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index c1c6fa9c0e4..691e6f3ce43 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -1165,7 +1165,7 @@ static struct gfs2_rgrpd *rgblk_free(struct gfs2_sbd *sdp, uint64_t bstart, rgd = gfs2_blk2rgrpd(sdp, bstart); if (!rgd) { if (gfs2_consist(sdp)) - fs_err(sdp, "block = %llu\n", bstart); + fs_err(sdp, "block = %llu\n", (unsigned long long)bstart); return NULL; } @@ -1452,7 +1452,7 @@ void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist, rgd = gfs2_blk2rgrpd(sdp, block); if (!rgd) { if (gfs2_consist(sdp)) - fs_err(sdp, "block = %llu\n", block); + fs_err(sdp, "block = %llu\n", (unsigned long long)block); return; } diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c index 0b37d6bcc36..88974e9824f 100644 --- a/fs/gfs2/util.c +++ b/fs/gfs2/util.c @@ -116,7 +116,8 @@ int gfs2_consist_inode_i(struct gfs2_inode *ip, int cluster_wide, "GFS2: fsid=%s: inode = %llu %llu\n" "GFS2: fsid=%s: function = %s, file = %s, line = %u\n", sdp->sd_fsname, - sdp->sd_fsname, ip->i_num.no_formal_ino, ip->i_num.no_addr, + sdp->sd_fsname, (unsigned long long)ip->i_num.no_formal_ino, + (unsigned long long)ip->i_num.no_addr, sdp->sd_fsname, function, file, line); return rv; } @@ -137,7 +138,7 @@ int gfs2_consist_rgrpd_i(struct gfs2_rgrpd *rgd, int cluster_wide, "GFS2: fsid=%s: RG = %llu\n" "GFS2: fsid=%s: function = %s, file = %s, line = %u\n", sdp->sd_fsname, - sdp->sd_fsname, rgd->rd_ri.ri_addr, + sdp->sd_fsname, (unsigned long long)rgd->rd_ri.ri_addr, sdp->sd_fsname, function, file, line); return rv; } @@ -158,7 +159,7 @@ int gfs2_meta_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh, "GFS2: fsid=%s: bh = %llu (%s)\n" "GFS2: fsid=%s: function = %s, file = %s, line = %u\n", sdp->sd_fsname, - sdp->sd_fsname, (uint64_t)bh->b_blocknr, type, + sdp->sd_fsname, (unsigned long long)bh->b_blocknr, type, sdp->sd_fsname, function, file, line); return (me) ? -1 : -2; } @@ -179,7 +180,7 @@ int gfs2_metatype_check_ii(struct gfs2_sbd *sdp, struct buffer_head *bh, "GFS2: fsid=%s: bh = %llu (type: exp=%u, found=%u)\n" "GFS2: fsid=%s: function = %s, file = %s, line = %u\n", sdp->sd_fsname, - sdp->sd_fsname, (uint64_t)bh->b_blocknr, type, t, + sdp->sd_fsname, (unsigned long long)bh->b_blocknr, type, t, sdp->sd_fsname, function, file, line); return (me) ? -1 : -2; } @@ -217,7 +218,7 @@ int gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh, "GFS2: fsid=%s: block = %llu\n" "GFS2: fsid=%s: function = %s, file = %s, line = %u\n", sdp->sd_fsname, - sdp->sd_fsname, (uint64_t)bh->b_blocknr, + sdp->sd_fsname, (unsigned long long)bh->b_blocknr, sdp->sd_fsname, function, file, line); return rv; } -- cgit v1.2.3