Re: [PATCH 1/2] netfs: Revert "netfs: Switch debug logging to pr_debug()"

Uwe Kleine-König
2024-08-06T15:35:37Z

Hello David,

On 7/18/24 22:07, David Howells wrote:
>
> Revert commit 163eae0fb0d4c610c59a8de38040f8e12f89fd43 to get back the
> original operation of the debugging macros.
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Uwe Kleine-König <ukleinek@kernel.org>
> cc: Christian Brauner <brauner@kernel.org>
> cc: Jeff Layton <jlayton@kernel.org>
> cc: netfs@lists.linux.dev
> cc: linux-fsdevel@vger.kernel.org
> Link: https://lore.kernel.org/r/20240608151352.22860-2-ukleinek@kernel.org
> ---
> fs/netfs/buffered_read.c | 14 +++++++-------
> fs/netfs/buffered_write.c | 12 ++++++------
> fs/netfs/direct_read.c | 2 +-
> fs/netfs/direct_write.c | 8 ++++----
> fs/netfs/fscache_cache.c | 4 ++--
> fs/netfs/fscache_cookie.c | 28 ++++++++++++++--------------
> fs/netfs/fscache_io.c | 12 ++++++------
> fs/netfs/fscache_main.c | 2 +-
> fs/netfs/fscache_volume.c | 4 ++--
> fs/netfs/internal.h | 33 ++++++++++++++++++++++++++++++++-
> fs/netfs/io.c | 12 ++++++------
> fs/netfs/main.c | 4 ++++
> fs/netfs/misc.c | 4 ++--
> fs/netfs/write_collect.c | 16 ++++++++--------
> fs/netfs/write_issue.c | 36 ++++++++++++++++++------------------
> 15 files changed, 113 insertions(+), 78 deletions(-)

I just found this patch as commit
a9d47a50cf257ff1019a4e30d573777882fd785c in mainline, missed the mail
earlier, so I'm replying just now.

In my eyes the commit log is poor and it should better highlight what
the advantage of the original debugging macros are.

After some more digging (which the commit log should ideally highlight)
I found the next commit that addresses parts of the concerns mentioned
in the reverted commit's description, by introducing CONFIG_NETFS_DEBUG.

I still don't get the advantage of reimplementing stuff that pr_debug()
already does. Am I missing something? Isn't a generic deubg mechanism
that most people know better than something invented for a specific driver?

Best regards
Uwe