[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180510171714.nrviwybgj54hwnk4@US-160370MP2.local>
Date: Fri, 11 May 2018 01:17:14 +0800
From: Liu Bo <bo.liu@...ux.alibaba.com>
To: "Theodore Y. Ts'o" <tytso@....edu>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH] Ext4: tracepoint: fix broken print due to 0%o format
On Thu, May 10, 2018 at 12:33:41PM -0400, Theodore Y. Ts'o wrote:
> On Mon, Apr 30, 2018 at 01:04:26AM +0800, Liu Bo wrote:
> > All the tracepoints in ext4 are printing i_mode with 0%o, and it ends up
> > with
> >
> > xfs_io-12320 [001] 10048.329506: ext4_da_reserve_space: dev 8,80 ino 17 mode 0>o< i_blocks 33152 reserved_data_blocks 0
> > xfs_io-12320 [001] 10048.329610: ext4_da_update_reserve_space: dev 8,80 ino 17 mode 0>o< i_blocks 33152 used_blocks 0 reserved_data_blocks 2 quota_claim 2
> >
> > '0%o' huas overridden the sibling field and shifted the output, note that
> > the last @quota_claim should be 1 instead of 2.
> >
> > This switches to print i_mode with 0x%x.
>
> I'm not sure I understand the problem. The tracecpoints are printing
> octal correctly:
>
> <...>-396 [001] ...1 1569.646481: ext4_free_inode: dev 254,32 ino 12 mode 0100644 uid 0 gid 0 blocks 0
>
> Permissions are traditionally printed in octal and "mode 0100644" is
> doing the right thing here.
>
> What tool are you using to print the tracing output? I'm just using
> "cat /sys/kernel/debug/tracing/trace_pipe".
>
> - Ted
Hmm, please ignore the patch.
I think it's a problem of trace-cmd record, with trace-cmd start, it
parses mode in octal correctly. Should be a trivial thing to fix.
thanks,
-liubo
Powered by blists - more mailing lists