Re: [PATCH] Ext4: tracepoint: fix broken print due to 0%o format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux