Patchwork [1/2] ext4: fix ext4_debug format

login
register
mail settings
Submitter Zheng Liu
Date Nov. 17, 2011, 7:19 a.m.
Message ID <1321514390-14903-1-git-send-email-wenqing.lz@taobao.com>
Download mbox | patch
Permalink /patch/126126/
State Superseded
Headers show

Comments

Zheng Liu - Nov. 17, 2011, 7:19 a.m.
Fix ext4_debug format in ext4_ext_handle_uninitialized_extents() and
ext4_end_io_dio().

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 fs/ext4/extents.c |    4 ++--
 fs/ext4/inode.c   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Yongqiang Yang - Nov. 17, 2011, 7:47 a.m.
Hi Zheng,

On Thu, Nov 17, 2011 at 3:19 PM, Zheng Liu <gnehzuil.liu@gmail.com> wrote:
> Fix ext4_debug format in ext4_ext_handle_uninitialized_extents() and
> ext4_end_io_dio().
>
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> ---
>  fs/ext4/extents.c |    4 ++--
>  fs/ext4/inode.c   |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 61fa9e1..8e2a57c 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -3454,8 +3454,8 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
>        int err = 0;
>        ext4_io_end_t *io = EXT4_I(inode)->cur_aio_dio;
>
> -       ext_debug("ext4_ext_handle_uninitialized_extents: inode %lu, logical"
> -                 "block %llu, max_blocks %u, flags %d, allocated %u",
> +       ext_debug("ext4_ext_handle_uninitialized_extents: inode %lu, logical "
> +                 "block %llu, max_blocks %u, flags %d, allocated %u\n",
>                  inode->i_ino, (unsigned long long)map->m_lblk, map->m_len,
>                  flags, allocated);
Could you format flags by %x instead of %d?  The output will be more readable.

Yongqiang.
>        ext4_ext_show_leaf(inode, path);
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 240f6e2..4c037f9 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -2775,7 +2775,7 @@ static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
>        if (!io_end || !size)
>                goto out;
>
> -       ext_debug("ext4_end_io_dio(): io_end 0x%p"
> +       ext_debug("ext4_end_io_dio(): io_end 0x%p "
>                  "for inode %lu, iocb 0x%p, offset %llu, size %llu\n",
>                  iocb->private, io_end->inode->i_ino, iocb, offset,
>                  size);
> --
> 1.7.4.1
>
> --
> 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
>

Patch

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 61fa9e1..8e2a57c 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3454,8 +3454,8 @@  ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
 	int err = 0;
 	ext4_io_end_t *io = EXT4_I(inode)->cur_aio_dio;
 
-	ext_debug("ext4_ext_handle_uninitialized_extents: inode %lu, logical"
-		  "block %llu, max_blocks %u, flags %d, allocated %u",
+	ext_debug("ext4_ext_handle_uninitialized_extents: inode %lu, logical "
+		  "block %llu, max_blocks %u, flags %d, allocated %u\n",
 		  inode->i_ino, (unsigned long long)map->m_lblk, map->m_len,
 		  flags, allocated);
 	ext4_ext_show_leaf(inode, path);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 240f6e2..4c037f9 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2775,7 +2775,7 @@  static void ext4_end_io_dio(struct kiocb *iocb, loff_t offset,
 	if (!io_end || !size)
 		goto out;
 
-	ext_debug("ext4_end_io_dio(): io_end 0x%p"
+	ext_debug("ext4_end_io_dio(): io_end 0x%p "
 		  "for inode %lu, iocb 0x%p, offset %llu, size %llu\n",
  		  iocb->private, io_end->inode->i_ino, iocb, offset,
 		  size);