Re: [RFC][PATCH] tracing: Deprecate auto-mounting tracefs in debugfs

Steven Rostedt <[email protected]> Tue, 17 Jun 2025 15:29:06 -0400
Newsgroups org.kernel.vger.linux-trace-users,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users,org.kernel.vger.linux-trace-kernel
Message-ID <[email protected]>
On Tue, 17 Jun 2025 13:36:14 -0400
Steven Rostedt <[email protected]> wrote:

> @@ -10311,6 +10313,8 @@ int tracing_init_dentry(void)
>  	if (WARN_ON(!tracefs_initialized()))
>  		return -ENODEV;
>  
> +#ifdef CONFIG_TRACEFS_AUTOMOUNT_DEPRECATED
> +	pr_warning("NOTICE: Automounting of tracing to debugfs is deprecated and will be removed in 2027\n");

I tested this with the config off but not on.

The above errors with pr_warning() undefined, "do you mean pr_warn?" :-p

-- Steve

>  	/*
>  	 * As there may still be users that expect the tracing
>  	 * files to exist in debugfs/tracing, we must automount
> @@ -10319,6 +10323,7 @@ int tracing_init_dentry(void)
>  	 */
>  	tr->dir = debugfs_create_automount("tracing", NULL,
>  					   trace_automount, NULL);
> +#endif
>  
>  	return 0;
>  }
> --