public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Mingming Cao <cmm@us.ibm.com>
To: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] Fix EXT4FS_DEBUG build: use ext4_free_blks_count and %u instead of %lu
Date: Mon, 26 Jan 2009 17:06:22 -0800	[thread overview]
Message-ID: <1233018382.7240.8.camel@mingming-laptop> (raw)
In-Reply-To: <1232679163-4176-1-git-send-email-cascardo@holoscopio.com>


在 2009-01-23五的 00:52 -0200,Thadeu Lima de Souza Cascardo写道:
> When bg_free_blocks_count was renamed to bg_free_blocks_count_lo in
> 560671a0, its uses under EXT4FS_DEBUG were not changed to the helper
> ext4_free_blks_count.
> 
> Another commit, 498e5f24, also did not change everything needed under
> EXT4FS_DEBUG, thus making it spill some warnings related to printing
> format.
> 
> This commit fix both issues and make ext4 build again when EXT4FS_DEBUG
> is set.
> 

Reviewed-by: Mingming Cao <cmm@us.ibm.com>

> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> ---
>  fs/ext4/balloc.c  |    6 +++---
>  fs/ext4/extents.c |    2 +-
>  fs/ext4/mballoc.c |    2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
> index 6bba06b..9a50b80 100644
> --- a/fs/ext4/balloc.c
> +++ b/fs/ext4/balloc.c
> @@ -684,15 +684,15 @@ ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb)
>  		gdp = ext4_get_group_desc(sb, i, NULL);
>  		if (!gdp)
>  			continue;
> -		desc_count += le16_to_cpu(gdp->bg_free_blocks_count);
> +		desc_count += ext4_free_blks_count(sb, gdp);
>  		brelse(bitmap_bh);
>  		bitmap_bh = ext4_read_block_bitmap(sb, i);
>  		if (bitmap_bh == NULL)
>  			continue;
> 
>  		x = ext4_count_free(bitmap_bh, sb->s_blocksize);
> -		printk(KERN_DEBUG "group %lu: stored = %d, counted = %u\n",
> -			i, le16_to_cpu(gdp->bg_free_blocks_count), x);
> +		printk(KERN_DEBUG "group %u: stored = %d, counted = %u\n",
> +			i, ext4_free_blks_count(sb, gdp), x);
>  		bitmap_count += x;
>  	}
>  	brelse(bitmap_bh);
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 54bf062..e2eab19 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -3048,7 +3048,7 @@ retry:
>  			WARN_ON(ret <= 0);
>  			printk(KERN_ERR "%s: ext4_ext_get_blocks "
>  				    "returned error inode#%lu, block=%u, "
> -				    "max_blocks=%lu", __func__,
> +				    "max_blocks=%u", __func__,
>  				    inode->i_ino, block, max_blocks);
>  #endif
>  			ext4_mark_inode_dirty(handle, inode);
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index 918aec0..deba54f 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -3025,7 +3025,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac,
>  		goto out_err;
> 
>  	ext4_debug("using block group %u(%d)\n", ac->ac_b_ex.fe_group,
> -			gdp->bg_free_blocks_count);
> +			ext4_free_blks_count(sb, gdp));
> 
>  	err = ext4_journal_get_write_access(handle, gdp_bh);
>  	if (err)

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2009-01-27  1:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23  2:52 [PATCH] Fix EXT4FS_DEBUG build: use ext4_free_blks_count and %u instead of %lu Thadeu Lima de Souza Cascardo
2009-01-27  1:06 ` Mingming Cao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1233018382.7240.8.camel@mingming-laptop \
    --to=cmm@us.ibm.com \
    --cc=cascardo@holoscopio.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox