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.