[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e87e0fce1391a34ccd3f62581f8dc62d03b5c022.camel@dubeyko.com>
Date: Fri, 09 May 2025 10:39:12 -0700
From: Viacheslav Dubeyko <slava@...eyko.com>
To: Yangtao Li <frank.li@...o.com>, glaubitz@...sik.fu-berlin.de
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hfs: export dbg_flags in debugfs
Hi Yangtao,
On Wed, 2025-05-07 at 08:55 -0600, Yangtao Li wrote:
> hfs currently has some function tracking points,
> which are helpful for problem analysis, but rely on
> modifying the DBG_MASK macro.
>
> Modifying the macro requires recompiling the kernel,
> and the control of the log is more troublesome.
>
> Let's export this debug facility to debugfs so that
> it can be easily controlled through the node.
>
> node:
> /sys/kernel/debug/hfs/dbg_flags
>
> for_each_bit:
>
> DBG_BNODE_REFS 0x00000001
> DBG_BNODE_MOD 0x00000002
> DBG_CAT_MOD 0x00000004
> DBG_INODE 0x00000008
> DBG_SUPER 0x00000010
> DBG_EXTENT 0x00000020
> DBG_BITMAP 0x00000040
>
Frankly speaking, if we would like to rework the debugging framework in
HFS/HFS+, then I prefer to switch on pr_debug() and to use dynamic
debug framework of Linux kernel [1]. It will provide the more flexible
solution.
Thanks,
Slava.
[1] https://www.kernel.org/doc/html/v4.14/admin-guide/dynamic-debug-howto.html
Powered by blists - more mailing lists