From: Cen Zhang <zzzccc427@gmail.com>
To: mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com
Cc: heming.zhao@suse.com, ocfs2-devel@lists.linux.dev,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
baijiaju1990@gmail.com, jjzuming@gmail.com, zzzccc427@gmail.com
Subject: [PATCH v3 0/2] ocfs2: stabilize dentry names in file-operation trace events
Date: Tue, 20 Oct 2026 11:43:50 +0800 [thread overview]
Message-ID: <pm-ocfs2-objects-candidate-0088-v6-d3056754af7e660155d9-0@gmail.com> (raw)
All six users of ocfs2__file_ops pass a dentry name to its shared
__string field. A file reference keeps the dentry alive while rename
can still change the name being recorded.
Use name snapshots at all six call sites, as Joseph requested. The
first patch handles the five callers that take no inode spinlock
around their trace call. The second handles file release separately
to preserve its locked open-count sample while taking and releasing
the snapshot outside that critical section.
The patches are independent and leave the event class and trace format
unchanged.
Cen Zhang (2):
ocfs2: snapshot dentry names in file-operation traces
ocfs2: snapshot the dentry name while tracing file release
fs/ocfs2/file.c | 97 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 68 insertions(+), 29 deletions(-)
---
Changes in v3:
- Cover all six ocfs2__file_ops call sites with two patches, grouping open,
fsync, read, write and splice-read and handling release separately.
- For release, keep the trace and open-count sample under oi->ip_lock while
taking and releasing the snapshot outside that lock; cache the
event-enabled check.
Changes in v2:
- Replace d_lock around the tracepoint with a dentry name snapshot so trace
callbacks run without the caller holding the dentry lock.
- Pass both the name and its length from the snapshot; keep the event
enabled check and release the snapshot after the trace call.
Link to v1: https://lore.kernel.org/r/pm-ocfs2-objects-candidate-0088-v3-d628f98bfcb6784a0bfb@gmail.com
Link to v2: https://lore.kernel.org/r/pm-ocfs2-objects-candidate-0088-v4-a9a0df898afb4fc65fa0@gmail.com
next reply other threads:[~2026-10-20 3:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 3:43 Cen Zhang [this message]
2026-10-20 3:43 ` [PATCH v3 1/2] ocfs2: snapshot dentry names in file-operation traces Cen Zhang
2026-10-20 3:43 ` [PATCH v3 2/2] ocfs2: snapshot the dentry name while tracing file release Cen Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pm-ocfs2-objects-candidate-0088-v6-d3056754af7e660155d9-0@gmail.com \
--to=zzzccc427@gmail.com \
--cc=baijiaju1990@gmail.com \
--cc=heming.zhao@suse.com \
--cc=jjzuming@gmail.com \
--cc=jlbec@evilplan.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@lists.linux.dev \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®