linux/fs/hfsplus
Viacheslav Dubeyko f32a26fab3 hfs/hfsplus: rework debug output subsystem
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: 00,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

v4
Debug messages have been reworked and information about
new HFS/HFS+ shared declarations file has been added
to MAINTAINERS file.

v5
Yangtao Li suggested to clean up debug output and
fix several typos.

Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
cc: Yangtao Li <frank.li@vivo.com>
cc: linux-fsdevel@vger.kernel.org
cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
2025-09-24 16:30:34 -07:00
..
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile
attributes.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
bfind.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
bitmap.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
bnode.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
brec.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
btree.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
catalog.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
dir.c hfsplus: fix slab-out-of-bounds read in hfsplus_uni2asc() 2025-09-09 11:44:38 -07:00
extents.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
hfsplus_fs.h hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
hfsplus_raw.h
inode.c hfs/hfsplus updates for v6.17 2025-07-28 16:17:44 -07:00
ioctl.c vfs: rename parent_ino to d_parent_ino and make it use RCU 2024-06-27 18:34:21 +02:00
options.c hfsplus: convert hfsplus to use the new mount api 2024-10-08 14:41:50 +02:00
part_tbl.c fs/hfsplus: Use the enum req_op and blk_opf_t types 2022-07-14 12:14:32 -06:00
super.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
tables.c
unicode.c hfsplus: fix slab-out-of-bounds read in hfsplus_strcasecmp() 2025-09-22 15:11:33 -07:00
wrapper.c hfsplus: use bdev_rw_virt in hfsplus_submit_bio 2025-05-07 07:31:08 -06:00
xattr.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
xattr.h hfsplus: move hfsplus_xattr_handlers to .rodata 2023-10-09 16:24:19 +02:00
xattr_security.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_trusted.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00
xattr_user.c fs: port xattr to mnt_idmap 2023-01-19 09:24:28 +01:00