Re: [PATCH v2] hfs/hfsplus: rework debug output subsystem

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

 



On Fri, 2025-07-11 at 10:41 +0800, Yangtao Li wrote:
> Hi Slava,
> 
> 在 2025/7/11 06:16, Viacheslav Dubeyko 写道:
> > Currently, HFS/HFS+ has very obsolete and inconvenient
> > debug output subsystem. Also, the code is duplicated
> > in HFS and HFS+ driver. This patch introduces
> > linux/hfs_common.h for gathering common declarations,
> > inline functions, and common short methods. Currently,
> > this file contains only hfs_dbg() function that
> > employs pr_debug() with the goal to print a debug-level
> > messages conditionally.
> > 
> > So, now, it is possible to enable the debug output
> > by means of:
> > 
> > echo 'file extent.c +p' > /proc/dynamic_debug/control
> > echo 'func hfsplus_evict_inode +p' > /proc/dynamic_debug/control
> > 
> > And debug output looks like this:
> > 
> > hfs: pid 5831:fs/hfs/catalog.c:228 hfs_cat_delete(): delete_cat:
> > m00,48
> > hfs: pid 5831:fs/hfs/extent.c:484 hfs_file_truncate(): truncate:
> > 48, 409600 -> 0
> > hfs: pid 5831:fs/hfs/extent.c:212 hfs_dump_extent():
> > hfs: pid 5831:fs/hfs/extent.c:214 hfs_dump_extent():  78:4
> > hfs: pid 5831:fs/hfs/extent.c:214 hfs_dump_extent():  0:0
> > hfs: pid 5831:fs/hfs/extent.c:214 hfs_dump_extent():  0:0
> > 
> > Signed-off-by: Viacheslav Dubeyko <slava@xxxxxxxxxxx>
> > cc: John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>
> > cc: Yangtao Li <frank.li@xxxxxxxx>
> > cc: linux-fsdevel@xxxxxxxxxxxxxxx
> > cc: Johannes Thumshirn <Johannes.Thumshirn@xxxxxxx>
> > ---
> >   fs/hfs/bfind.c             |  4 ++--
> >   fs/hfs/bitmap.c            |  4 ++--
> >   fs/hfs/bnode.c             | 28 ++++++++++++++--------------
> >   fs/hfs/brec.c              |  8 ++++----
> >   fs/hfs/btree.c             |  2 +-
> >   fs/hfs/catalog.c           |  6 +++---
> >   fs/hfs/extent.c            | 18 +++++++++---------
> >   fs/hfs/hfs_fs.h            | 33 +--------------------------------
> >   fs/hfs/inode.c             |  4 ++--
> >   fs/hfsplus/attributes.c    |  8 ++++----
> >   fs/hfsplus/bfind.c         |  4 ++--
> >   fs/hfsplus/bitmap.c        | 10 +++++-----
> >   fs/hfsplus/bnode.c         | 28 ++++++++++++++--------------
> >   fs/hfsplus/brec.c          | 10 +++++-----
> >   fs/hfsplus/btree.c         |  4 ++--
> >   fs/hfsplus/catalog.c       |  6 +++---
> >   fs/hfsplus/extents.c       | 24 ++++++++++++------------
> >   fs/hfsplus/hfsplus_fs.h    | 35 +--------------------------------
> > --
> >   fs/hfsplus/super.c         |  8 ++++----
> >   fs/hfsplus/xattr.c         |  4 ++--
> >   include/linux/hfs_common.h | 20 ++++++++++++++++++++
> 
> For include/linux/hfs_common.h, it seems like to be a good start to 
> seperate common stuff for hfs&hfsplus.
> 
> Colud we rework msg to add value description?
> There're too much values to identify what it is.
> 

What do you mean by value description?

> You ignore those msg type, maybe we don't need it?

Could you please explain what do you mean here? :)

Thanks,
Slava.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux