[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240131182354.6815a2fa@gandalf.local.home>
Date: Wed, 31 Jan 2024 18:23:54 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] eventfs: clean up dentry ops and add revalidate
function
On Thu, 1 Feb 2024 08:07:15 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:
> > Then tracefs could be nicely converted over to kernfs, and eventfs would be
> > its own entity.
>
> If so, maybe we can just make symlinks to the 'id' and 'format' from events
> under tracefs? :)
I don't think that will save anything. The files currently do not allocate
any memory. If we make symlinks, we need to allocate a path, to them. I
think that would be rather difficult to do. Not to mention, that could
cause a lot of breakage. What do you do if the other filesystem isn't
mounted?
I could possibly make a light way handle to pass back to the callbacks.
struct trace_event_light {
unsigned long flags
struct trace_event_call *event_call;
};
struct trace_event_file {
struct trace_event_light call;
[..]
// Remove he flags and event_call and have it above
};
if the callback data has:
callback(..., void **data)
{
struct trace_event_light *call = *data;
struct trace_event_file *file;
If (strcmp(name, "id") == 0 || strcmp(name, "format") == 0) {
*data = call->event_call;
return 1;
}
/* Return if this is just a light data entry */
if (!(data->flags & TRACE_EVENT_FULL))
return 0;
file = container_of(data, struct trace_event_file, call);
// continue processing the full data
}
This way the lonely eventfs could still share a lot of the code.
-- Steve
Powered by blists - more mailing lists