Linux Trace Kernel
 help / color / mirror / Atom feed
* [PATCH v1 0/7] ntfs3: add tracepoints for core filesystem paths
@ 2026-07-17  3:22 Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 1/7] ntfs3: add mount and log replay tracepoints Baolin Liu
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Baolin Liu @ 2026-07-17  3:22 UTC (permalink / raw)
  To: almaz.alexandrovich, rostedt, mhiramat, mathieu.desnoyers
  Cc: linux-kernel, ntfs3, linux-trace-kernel, liubaolin12138,
	liubaolin12138, Baolin Liu

From: Baolin Liu <liubaolin@kylinos.cn>

This series adds an initial set of tracepoints for ntfs3 core paths.

The tracepoints cover:
  - mount and log replay
  - namei operations
  - directory index operations
  - allocation and block mapping
  - iomap operations
  - file I/O entry points

Baolin Liu (7):
  ntfs3: add mount and log replay tracepoints
  ntfs3: add namei tracepoints
  ntfs3: add create inode tracepoint
  ntfs3: add directory index tracepoints
  ntfs3: add allocation tracepoints
  ntfs3: add iomap tracepoints
  ntfs3: add file I/O tracepoints

 MAINTAINERS                  |   1 +
 fs/ntfs3/attrib.c            |   9 +
 fs/ntfs3/dir.c               |   3 +
 fs/ntfs3/file.c              |   5 +
 fs/ntfs3/fslog.c             |   3 +
 fs/ntfs3/index.c             |   8 +
 fs/ntfs3/inode.c             |   7 +
 fs/ntfs3/namei.c             |   5 +
 fs/ntfs3/super.c             |  11 +-
 include/trace/events/ntfs3.h | 395 +++++++++++++++++++++++++++++++++++
 10 files changed, 446 insertions(+), 1 deletion(-)
 create mode 100644 include/trace/events/ntfs3.h

-- 
2.51.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v1 v1 1/7] ntfs3: add mount and log replay tracepoints
  2026-07-17  3:22 [PATCH v1 0/7] ntfs3: add tracepoints for core filesystem paths Baolin Liu
@ 2026-07-17  3:22 ` Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 2/7] ntfs3: add namei tracepoints Baolin Liu
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Baolin Liu @ 2026-07-17  3:22 UTC (permalink / raw)
  To: almaz.alexandrovich, rostedt, mhiramat, mathieu.desnoyers
  Cc: linux-kernel, ntfs3, linux-trace-kernel, liubaolin12138,
	liubaolin12138, Baolin Liu

From: Baolin Liu <liubaolin@kylinos.cn>

Add ntfs3 tracepoints for mount and log replay paths.

This adds trace events for ntfs_fill_super(), ntfs_init_from_boot(),
and log_replay() to help observe mount setup, boot sector parsing,
and $LogFile replay results.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
---
 MAINTAINERS                  |  1 +
 fs/ntfs3/fslog.c             |  3 ++
 fs/ntfs3/super.c             | 11 ++++-
 include/trace/events/ntfs3.h | 85 ++++++++++++++++++++++++++++++++++++
 4 files changed, 99 insertions(+), 1 deletion(-)
 create mode 100644 include/trace/events/ntfs3.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 15011f5752a9..05d815243cb8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19293,6 +19293,7 @@ W:	http://www.paragon-software.com/
 T:	git https://github.com/Paragon-Software-Group/linux-ntfs3.git
 F:	Documentation/filesystems/ntfs3.rst
 F:	fs/ntfs3/
+F:	include/trace/events/ntfs3.h
 
 NTSYNC SYNCHRONIZATION PRIMITIVE DRIVER
 M:	Elizabeth Figura <zfigura@codeweavers.com>
diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c
index f038c799e7ac..5020da7e72f1 100644
--- a/fs/ntfs3/fslog.c
+++ b/fs/ntfs3/fslog.c
@@ -13,6 +13,7 @@
 #include "debug.h"
 #include "ntfs.h"
 #include "ntfs_fs.h"
+#include <trace/events/ntfs3.h>
 
 /*
  * LOG FILE structs
@@ -5362,6 +5363,8 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
 	else if (log->set_dirty)
 		ntfs_set_state(sbi, NTFS_DIRTY_ERROR);
 
+	trace_ntfs3_log_replay(&ni->vfs_inode, *initialized, err);
+
 	kfree(log);
 
 	return err;
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index 3305fe406cb2..7034ef257452 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -76,6 +76,9 @@
 #include "lib/lib.h"
 #endif
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/ntfs3.h>
+
 #ifdef CONFIG_PRINTK
 /*
  * ntfs_printk - Trace warnings/notices/errors.
@@ -956,7 +959,7 @@ static int ntfs_init_from_boot(struct super_block *sb, u32 sector_size,
 {
 	struct ntfs_sb_info *sbi = sb->s_fs_info;
 	int err;
-	u32 mb, gb, boot_sector_size, sct_per_clst, record_size;
+	u32 mb, gb, boot_sector_size = 0, sct_per_clst, record_size;
 	u64 sectors, clusters, mlcn, mlcn2, dev_size0;
 	struct NTFS_BOOT *boot;
 	struct buffer_head *bh;
@@ -1216,6 +1219,8 @@ static int ntfs_init_from_boot(struct super_block *sb, u32 sector_size,
 	}
 
 out:
+	trace_ntfs3_init_from_boot(sb, sector_size, boot_sector_size,
+				 !!boot_block, err);
 	brelse(bh);
 
 	if (err == -EINVAL && !boot_block && dev_size0 > PAGE_SHIFT) {
@@ -1731,12 +1736,16 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
 	}
 
 	ntfs_create_procdir(sb);
+	trace_ntfs3_fill_super(sb, ro, sbi->cluster_size, sbi->record_size,
+			      sbi->index_size, 0);
 
 	return 0;
 
 put_inode_out:
 	iput(inode);
 out:
+	trace_ntfs3_fill_super(sb, ro, sbi->cluster_size, sbi->record_size,
+			      sbi->index_size, err);
 	/* sbi->options == options */
 	if (options) {
 		put_mount_options(sbi->options);
diff --git a/include/trace/events/ntfs3.h b/include/trace/events/ntfs3.h
new file mode 100644
index 000000000000..d00f66e42ba8
--- /dev/null
+++ b/include/trace/events/ntfs3.h
@@ -0,0 +1,85 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM ntfs3
+
+#if !defined(_TRACE_NTFS3_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_NTFS3_H
+
+#include <linux/fs.h>
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(ntfs3_fill_super,
+	TP_PROTO(struct super_block *sb, bool ro, u32 cluster_size,
+		 u32 record_size, u32 index_size, int err),
+	TP_ARGS(sb, ro, cluster_size, record_size, index_size, err),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(bool, ro)
+		__field(u32, cluster_size)
+		__field(u32, record_size)
+		__field(u32, index_size)
+		__field(int, err)
+	),
+	TP_fast_assign(
+		__entry->dev = sb->s_bdev->bd_dev;
+		__entry->ro = ro;
+		__entry->cluster_size = cluster_size;
+		__entry->record_size = record_size;
+		__entry->index_size = index_size;
+		__entry->err = err;
+	),
+	TP_printk("dev=(%d,%d) ro=%d cluster=%u record=%u index=%u err=%d",
+		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ro,
+		  __entry->cluster_size, __entry->record_size,
+		  __entry->index_size, __entry->err)
+);
+
+TRACE_EVENT(ntfs3_init_from_boot,
+	TP_PROTO(struct super_block *sb, u32 media_sector_size,
+		 u32 boot_sector_size, bool used_alt_boot, int err),
+	TP_ARGS(sb, media_sector_size, boot_sector_size, used_alt_boot, err),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(u32, media_sector_size)
+		__field(u32, boot_sector_size)
+		__field(bool, used_alt_boot)
+		__field(int, err)
+	),
+	TP_fast_assign(
+		__entry->dev = sb->s_bdev->bd_dev;
+		__entry->media_sector_size = media_sector_size;
+		__entry->boot_sector_size = boot_sector_size;
+		__entry->used_alt_boot = used_alt_boot;
+		__entry->err = err;
+	),
+	TP_printk("dev=(%d,%d) media_sector=%u boot_sector=%u alt_boot=%d err=%d",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->media_sector_size, __entry->boot_sector_size,
+		  __entry->used_alt_boot, __entry->err)
+);
+
+TRACE_EVENT(ntfs3_log_replay,
+	TP_PROTO(struct inode *inode, bool initialized, int err),
+	TP_ARGS(inode, initialized, err),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, ino)
+		__field(loff_t, size)
+		__field(bool, initialized)
+		__field(int, err)
+	),
+	TP_fast_assign(
+		__entry->dev = inode->i_sb->s_dev;
+		__entry->ino = inode->i_ino;
+		__entry->size = i_size_read(inode);
+		__entry->initialized = initialized;
+		__entry->err = err;
+	),
+	TP_printk("dev=(%d,%d) ino=%lu size=%lld initialized=%d err=%d",
+		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
+		  __entry->size, __entry->initialized, __entry->err)
+);
+
+#endif /* _TRACE_NTFS3_H */
+
+#include <trace/define_trace.h>
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v1 v1 2/7] ntfs3: add namei tracepoints
  2026-07-17  3:22 [PATCH v1 0/7] ntfs3: add tracepoints for core filesystem paths Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 1/7] ntfs3: add mount and log replay tracepoints Baolin Liu
@ 2026-07-17  3:22 ` Baolin Liu
  2026-07-21 21:09   ` Steven Rostedt
  2026-07-17  3:22 ` [PATCH v1 v1 3/7] ntfs3: add create inode tracepoint Baolin Liu
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Baolin Liu @ 2026-07-17  3:22 UTC (permalink / raw)
  To: almaz.alexandrovich, rostedt, mhiramat, mathieu.desnoyers
  Cc: linux-kernel, ntfs3, linux-trace-kernel, liubaolin12138,
	liubaolin12138, Baolin Liu

From: Baolin Liu <liubaolin@kylinos.cn>

Add ntfs3 tracepoints for namei operations.

This adds trace events for ntfs_lookup() and ntfs_rename()
to help observe directory lookup and rename activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
---
 fs/ntfs3/namei.c             |  5 ++++
 include/trace/events/ntfs3.h | 47 ++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c
index c59de5f2fa97..c1523decee32 100644
--- a/fs/ntfs3/namei.c
+++ b/fs/ntfs3/namei.c
@@ -13,6 +13,7 @@
 #include "debug.h"
 #include "ntfs.h"
 #include "ntfs_fs.h"
+#include <trace/events/ntfs3.h>
 
 /*
  * fill_name_de - Format NTFS_DE in @buf.
@@ -72,6 +73,8 @@ static struct dentry *ntfs_lookup(struct inode *dir, struct dentry *dentry,
 	struct inode *inode;
 	int err;
 
+	trace_ntfs3_lookup(dir, dentry);
+
 	if (!uni)
 		inode = ERR_PTR(-ENOMEM);
 	else {
@@ -275,6 +278,8 @@ static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir,
 	if (unlikely(ntfs3_forced_shutdown(sb)))
 		return -EIO;
 
+	trace_ntfs3_rename(dir, dentry, new_dir, new_dentry);
+
 	if (flags & ~RENAME_NOREPLACE)
 		return -EINVAL;
 
diff --git a/include/trace/events/ntfs3.h b/include/trace/events/ntfs3.h
index d00f66e42ba8..ba27531d889e 100644
--- a/include/trace/events/ntfs3.h
+++ b/include/trace/events/ntfs3.h
@@ -80,6 +80,53 @@ TRACE_EVENT(ntfs3_log_replay,
 		  __entry->size, __entry->initialized, __entry->err)
 );
 
+TRACE_EVENT(ntfs3_lookup,
+	TP_PROTO(struct inode *dir, struct dentry *dentry),
+	TP_ARGS(dir, dentry),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, parent_ino)
+		__string(name, dentry->d_name.name)
+		__field(unsigned int, name_len)
+	),
+	TP_fast_assign(
+		__entry->dev = dir->i_sb->s_dev;
+		__entry->parent_ino = dir->i_ino;
+		__assign_str(name);
+		__entry->name_len = dentry->d_name.len;
+	),
+	TP_printk("dev=(%d,%d) parent=%lu name=%s len=%u",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->parent_ino, __get_str(name),
+		  __entry->name_len)
+);
+
+TRACE_EVENT(ntfs3_rename,
+	TP_PROTO(struct inode *dir, struct dentry *dentry,
+		 struct inode *new_dir, struct dentry *new_dentry),
+	TP_ARGS(dir, dentry, new_dir, new_dentry),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, dir_ino)
+		__field(unsigned long, new_dir_ino)
+		__field(unsigned long, ino)
+		__string(old_name, dentry->d_name.name)
+		__string(new_name, new_dentry->d_name.name)
+	),
+	TP_fast_assign(
+		__entry->dev = dir->i_sb->s_dev;
+		__entry->dir_ino = dir->i_ino;
+		__entry->new_dir_ino = new_dir->i_ino;
+		__entry->ino = d_inode(dentry)->i_ino;
+		__assign_str(old_name);
+		__assign_str(new_name);
+	),
+	TP_printk("dev=(%d,%d) dir=%lu new_dir=%lu ino=%lu old=%s new=%s",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->dir_ino, __entry->new_dir_ino, __entry->ino,
+		  __get_str(old_name), __get_str(new_name))
+);
+
 #endif /* _TRACE_NTFS3_H */
 
 #include <trace/define_trace.h>
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v1 v1 3/7] ntfs3: add create inode tracepoint
  2026-07-17  3:22 [PATCH v1 0/7] ntfs3: add tracepoints for core filesystem paths Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 1/7] ntfs3: add mount and log replay tracepoints Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 2/7] ntfs3: add namei tracepoints Baolin Liu
@ 2026-07-17  3:22 ` Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 4/7] ntfs3: add directory index tracepoints Baolin Liu
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Baolin Liu @ 2026-07-17  3:22 UTC (permalink / raw)
  To: almaz.alexandrovich, rostedt, mhiramat, mathieu.desnoyers
  Cc: linux-kernel, ntfs3, linux-trace-kernel, liubaolin12138,
	liubaolin12138, Baolin Liu

From: Baolin Liu <liubaolin@kylinos.cn>

Add an ntfs3 tracepoint for inode creation.

This adds a trace event for ntfs_create_inode() to help
observe inode creation activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
---
 fs/ntfs3/inode.c             |  3 +++
 include/trace/events/ntfs3.h | 21 +++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index c43101cc064d..2bc4ce2ee8d8 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -17,6 +17,7 @@
 #include "debug.h"
 #include "ntfs.h"
 #include "ntfs_fs.h"
+#include <trace/events/ntfs3.h>
 
 /*
  * ntfs_read_mft - Read record and parse MFT.
@@ -1206,6 +1207,8 @@ int ntfs_create_inode(struct mnt_idmap *idmap, struct inode *dir,
 	/* New file will be resident or non resident. */
 	const bool new_file_resident = 1;
 
+	trace_ntfs3_create_inode(dir, dentry);
+
 	if (!fnd)
 		ni_lock_dir(dir_ni);
 
diff --git a/include/trace/events/ntfs3.h b/include/trace/events/ntfs3.h
index ba27531d889e..cc9f4fee9ff8 100644
--- a/include/trace/events/ntfs3.h
+++ b/include/trace/events/ntfs3.h
@@ -127,6 +127,27 @@ TRACE_EVENT(ntfs3_rename,
 		  __get_str(old_name), __get_str(new_name))
 );
 
+TRACE_EVENT(ntfs3_create_inode,
+	TP_PROTO(struct inode *dir, struct dentry *dentry),
+	TP_ARGS(dir, dentry),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, parent_ino)
+		__string(name, dentry->d_name.name)
+		__field(unsigned int, name_len)
+	),
+	TP_fast_assign(
+		__entry->dev = dir->i_sb->s_dev;
+		__entry->parent_ino = dir->i_ino;
+		__assign_str(name);
+		__entry->name_len = dentry->d_name.len;
+	),
+	TP_printk("dev=(%d,%d) parent=%lu name=%s len=%u",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->parent_ino, __get_str(name),
+		  __entry->name_len)
+);
+
 #endif /* _TRACE_NTFS3_H */
 
 #include <trace/define_trace.h>
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v1 v1 4/7] ntfs3: add directory index tracepoints
  2026-07-17  3:22 [PATCH v1 0/7] ntfs3: add tracepoints for core filesystem paths Baolin Liu
                   ` (2 preceding siblings ...)
  2026-07-17  3:22 ` [PATCH v1 v1 3/7] ntfs3: add create inode tracepoint Baolin Liu
@ 2026-07-17  3:22 ` Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 5/7] ntfs3: add allocation tracepoints Baolin Liu
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Baolin Liu @ 2026-07-17  3:22 UTC (permalink / raw)
  To: almaz.alexandrovich, rostedt, mhiramat, mathieu.desnoyers
  Cc: linux-kernel, ntfs3, linux-trace-kernel, liubaolin12138,
	liubaolin12138, Baolin Liu

From: Baolin Liu <liubaolin@kylinos.cn>

Add ntfs3 tracepoints for directory index operations.

This adds trace events for dir_search_u(), indx_find(),
indx_insert_entry(), and indx_delete_entry() to help observe
directory index lookup, insert, and delete activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
---
 fs/ntfs3/dir.c               |  3 ++
 fs/ntfs3/index.c             |  8 ++++
 include/trace/events/ntfs3.h | 81 ++++++++++++++++++++++++++++++++++++
 3 files changed, 92 insertions(+)

diff --git a/fs/ntfs3/dir.c b/fs/ntfs3/dir.c
index 873d52233003..eb10e7ff45bc 100644
--- a/fs/ntfs3/dir.c
+++ b/fs/ntfs3/dir.c
@@ -14,6 +14,7 @@
 #include "debug.h"
 #include "ntfs.h"
 #include "ntfs_fs.h"
+#include <trace/events/ntfs3.h>
 
 /* Convert little endian UTF-16 to NLS string. */
 int ntfs_utf16_to_nls(struct ntfs_sb_info *sbi, const __le16 *name, u32 len,
@@ -243,6 +244,8 @@ struct inode *dir_search_u(struct inode *dir, const struct cpu_str *uni,
 	struct inode *inode = NULL;
 	struct ntfs_fnd *fnd_a = NULL;
 
+	trace_ntfs3_dir_search_u(dir, uni ? uni->len : 0);
+
 	if (!fnd) {
 		fnd_a = fnd_get();
 		if (!fnd_a) {
diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c
index 2b439ac04356..d4ca7b1bb524 100644
--- a/fs/ntfs3/index.c
+++ b/fs/ntfs3/index.c
@@ -13,6 +13,7 @@
 #include "debug.h"
 #include "ntfs.h"
 #include "ntfs_fs.h"
+#include <trace/events/ntfs3.h>
 
 static const struct INDEX_NAMES {
 	const __le16 *name;
@@ -1179,6 +1180,8 @@ int indx_find(struct ntfs_index *indx, struct ntfs_inode *ni,
 	if (!root)
 		root = indx_get_root(&ni->dir, ni, NULL, NULL);
 
+	trace_ntfs3_indx_find(&ni->vfs_inode, indx->type, key_len);
+
 	if (!root) {
 		/* Should not happen. */
 		return -EINVAL;
@@ -2051,6 +2054,9 @@ int indx_insert_entry(struct ntfs_index *indx, struct ntfs_inode *ni,
 		return -EINVAL;
 	}
 
+	trace_ntfs3_indx_insert_entry(&ni->vfs_inode, indx->type,
+				      le16_to_cpu(new_de->key_size), undo);
+
 	if (fnd_is_empty(fnd)) {
 		/*
 		 * Find the spot the tree where we want to
@@ -2409,6 +2415,8 @@ int indx_delete_entry(struct ntfs_index *indx, struct ntfs_inode *ni,
 		return -EINVAL;
 	}
 
+	trace_ntfs3_indx_delete_entry(&ni->vfs_inode, indx->type, key_len);
+
 	/* Locate the entry to remove. */
 	err = indx_find(indx, ni, root, key, key_len, ctx, &diff, &e, fnd);
 	if (err)
diff --git a/include/trace/events/ntfs3.h b/include/trace/events/ntfs3.h
index cc9f4fee9ff8..f9d7051cd14b 100644
--- a/include/trace/events/ntfs3.h
+++ b/include/trace/events/ntfs3.h
@@ -148,6 +148,87 @@ TRACE_EVENT(ntfs3_create_inode,
 		  __entry->name_len)
 );
 
+TRACE_EVENT(ntfs3_dir_search_u,
+	TP_PROTO(struct inode *dir, unsigned int name_len),
+	TP_ARGS(dir, name_len),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, dir_ino)
+		__field(unsigned int, name_len)
+	),
+	TP_fast_assign(
+		__entry->dev = dir->i_sb->s_dev;
+		__entry->dir_ino = dir->i_ino;
+		__entry->name_len = name_len;
+	),
+	TP_printk("dev=(%d,%d) dir=%lu name_len=%u",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->dir_ino, __entry->name_len)
+);
+
+TRACE_EVENT(ntfs3_indx_find,
+	TP_PROTO(struct inode *inode, u8 type, size_t key_len),
+	TP_ARGS(inode, type, key_len),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, ino)
+		__field(u8, type)
+		__field(size_t, key_len)
+	),
+	TP_fast_assign(
+		__entry->dev = inode->i_sb->s_dev;
+		__entry->ino = inode->i_ino;
+		__entry->type = type;
+		__entry->key_len = key_len;
+	),
+	TP_printk("dev=(%d,%d) ino=%lu type=%u key_len=%zu",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->ino, __entry->type, __entry->key_len)
+);
+
+TRACE_EVENT(ntfs3_indx_insert_entry,
+	TP_PROTO(struct inode *inode, u8 type, u16 key_len, bool undo),
+	TP_ARGS(inode, type, key_len, undo),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, ino)
+		__field(u8, type)
+		__field(u16, key_len)
+		__field(bool, undo)
+	),
+	TP_fast_assign(
+		__entry->dev = inode->i_sb->s_dev;
+		__entry->ino = inode->i_ino;
+		__entry->type = type;
+		__entry->key_len = key_len;
+		__entry->undo = undo;
+	),
+	TP_printk("dev=(%d,%d) ino=%lu type=%u key_len=%u undo=%d",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->ino, __entry->type, __entry->key_len,
+		  __entry->undo)
+);
+
+TRACE_EVENT(ntfs3_indx_delete_entry,
+	TP_PROTO(struct inode *inode, u8 type, u32 key_len),
+	TP_ARGS(inode, type, key_len),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, ino)
+		__field(u8, type)
+		__field(u32, key_len)
+	),
+	TP_fast_assign(
+		__entry->dev = inode->i_sb->s_dev;
+		__entry->ino = inode->i_ino;
+		__entry->type = type;
+		__entry->key_len = key_len;
+	),
+	TP_printk("dev=(%d,%d) ino=%lu type=%u key_len=%u",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->ino, __entry->type, __entry->key_len)
+);
+
 #endif /* _TRACE_NTFS3_H */
 
 #include <trace/define_trace.h>
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v1 v1 5/7] ntfs3: add allocation tracepoints
  2026-07-17  3:22 [PATCH v1 0/7] ntfs3: add tracepoints for core filesystem paths Baolin Liu
                   ` (3 preceding siblings ...)
  2026-07-17  3:22 ` [PATCH v1 v1 4/7] ntfs3: add directory index tracepoints Baolin Liu
@ 2026-07-17  3:22 ` Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 6/7] ntfs3: add iomap tracepoints Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 7/7] ntfs3: add file I/O tracepoints Baolin Liu
  6 siblings, 0 replies; 11+ messages in thread
From: Baolin Liu @ 2026-07-17  3:22 UTC (permalink / raw)
  To: almaz.alexandrovich, rostedt, mhiramat, mathieu.desnoyers
  Cc: linux-kernel, ntfs3, linux-trace-kernel, liubaolin12138,
	liubaolin12138, Baolin Liu

From: Baolin Liu <liubaolin@kylinos.cn>

Add ntfs3 tracepoints for allocation operations.

This adds trace events for attr_allocate_clusters(),
attr_set_size_ex(), and attr_data_get_block() to help
observe cluster allocation, size changes, and block
mapping activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
---
 fs/ntfs3/attrib.c            |  9 +++++
 include/trace/events/ntfs3.h | 78 ++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
index c621a4c582f9..a793f17b6bb4 100644
--- a/fs/ntfs3/attrib.c
+++ b/fs/ntfs3/attrib.c
@@ -13,6 +13,7 @@
 #include "debug.h"
 #include "ntfs.h"
 #include "ntfs_fs.h"
+#include <trace/events/ntfs3.h>
 
 /*
  * You can set external NTFS_MIN_LOG2_OF_CLUMP/NTFS_MAX_LOG2_OF_CLUMP to manage
@@ -167,6 +168,8 @@ int attr_allocate_clusters(struct ntfs_sb_info *sbi, struct runs_tree *run,
 	CLST flen, vcn0 = vcn, pre = pre_alloc ? *pre_alloc : 0;
 	size_t cnt = run->count;
 
+	trace_ntfs3_attr_allocate_clusters(sbi->sb, vcn, lcn, len, opt);
+
 	for (;;) {
 		err = ntfs_look_for_free_space(sbi, lcn, len + pre, &lcn, &flen,
 					       opt);
@@ -452,6 +455,9 @@ int attr_set_size_ex(struct ntfs_inode *ni, enum ATTR_TYPE type,
 	u32 align;
 	struct MFT_REC *rec;
 
+	trace_ntfs3_attr_set_size_ex(&ni->vfs_inode, le32_to_cpu(type), new_size,
+				    keep_prealloc, no_da);
+
 again:
 	alen = 0;
 	le_b = NULL;
@@ -960,6 +966,9 @@ int attr_data_get_block(struct ntfs_inode *ni, CLST vcn, CLST clen, CLST *lcn,
 	if (res)
 		*res = NULL;
 
+	trace_ntfs3_attr_data_get_block(&ni->vfs_inode, vcn, clen,
+					 new != NULL, zero, no_da);
+
 	/* Try to find in cache. */
 	down_read(&ni->file.run_lock);
 	if (run_lookup_entry_da(&ni->file.run, !no_da ? &ni->file.run_da : NULL,
diff --git a/include/trace/events/ntfs3.h b/include/trace/events/ntfs3.h
index f9d7051cd14b..552f991b5257 100644
--- a/include/trace/events/ntfs3.h
+++ b/include/trace/events/ntfs3.h
@@ -229,6 +229,84 @@ TRACE_EVENT(ntfs3_indx_delete_entry,
 		  __entry->ino, __entry->type, __entry->key_len)
 );
 
+TRACE_EVENT(ntfs3_attr_allocate_clusters,
+	TP_PROTO(struct super_block *sb, u64 vcn, u64 lcn, u64 len, u32 opt),
+	TP_ARGS(sb, vcn, lcn, len, opt),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(u64, vcn)
+		__field(u64, lcn)
+		__field(u64, len)
+		__field(u32, opt)
+	),
+	TP_fast_assign(
+		__entry->dev = sb->s_dev;
+		__entry->vcn = vcn;
+		__entry->lcn = lcn;
+		__entry->len = len;
+		__entry->opt = opt;
+	),
+	TP_printk("dev=(%d,%d) vcn=%llu lcn=%llu len=%llu opt=0x%x",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->vcn, __entry->lcn, __entry->len, __entry->opt)
+);
+
+TRACE_EVENT(ntfs3_attr_set_size_ex,
+	TP_PROTO(struct inode *inode, u32 type, u64 new_size, bool keep_prealloc,
+		 bool no_da),
+	TP_ARGS(inode, type, new_size, keep_prealloc, no_da),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, ino)
+		__field(u32, type)
+		__field(loff_t, old_size)
+		__field(u64, new_size)
+		__field(bool, keep_prealloc)
+		__field(bool, no_da)
+	),
+	TP_fast_assign(
+		__entry->dev = inode->i_sb->s_dev;
+		__entry->ino = inode->i_ino;
+		__entry->type = type;
+		__entry->old_size = i_size_read(inode);
+		__entry->new_size = new_size;
+		__entry->keep_prealloc = keep_prealloc;
+		__entry->no_da = no_da;
+	),
+	TP_printk("dev=(%d,%d) ino=%lu type=0x%x old_size=%lld new_size=%llu keep_prealloc=%d no_da=%d",
+		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
+		  __entry->type, __entry->old_size, __entry->new_size,
+		  __entry->keep_prealloc, __entry->no_da)
+);
+
+TRACE_EVENT(ntfs3_attr_data_get_block,
+	TP_PROTO(struct inode *inode, u64 vcn, u64 clen, bool create,
+		 bool zero, bool no_da),
+	TP_ARGS(inode, vcn, clen, create, zero, no_da),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, ino)
+		__field(u64, vcn)
+		__field(u64, clen)
+		__field(bool, create)
+		__field(bool, zero)
+		__field(bool, no_da)
+	),
+	TP_fast_assign(
+		__entry->dev = inode->i_sb->s_dev;
+		__entry->ino = inode->i_ino;
+		__entry->vcn = vcn;
+		__entry->clen = clen;
+		__entry->create = create;
+		__entry->zero = zero;
+		__entry->no_da = no_da;
+	),
+	TP_printk("dev=(%d,%d) ino=%lu vcn=%llu clen=%llu create=%d zero=%d no_da=%d",
+		  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
+		  __entry->vcn, __entry->clen, __entry->create,
+		  __entry->zero, __entry->no_da)
+);
+
 #endif /* _TRACE_NTFS3_H */
 
 #include <trace/define_trace.h>
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v1 v1 6/7] ntfs3: add iomap tracepoints
  2026-07-17  3:22 [PATCH v1 0/7] ntfs3: add tracepoints for core filesystem paths Baolin Liu
                   ` (4 preceding siblings ...)
  2026-07-17  3:22 ` [PATCH v1 v1 5/7] ntfs3: add allocation tracepoints Baolin Liu
@ 2026-07-17  3:22 ` Baolin Liu
  2026-07-17  3:22 ` [PATCH v1 v1 7/7] ntfs3: add file I/O tracepoints Baolin Liu
  6 siblings, 0 replies; 11+ messages in thread
From: Baolin Liu @ 2026-07-17  3:22 UTC (permalink / raw)
  To: almaz.alexandrovich, rostedt, mhiramat, mathieu.desnoyers
  Cc: linux-kernel, ntfs3, linux-trace-kernel, liubaolin12138,
	liubaolin12138, Baolin Liu

From: Baolin Liu <liubaolin@kylinos.cn>

Add ntfs3 tracepoints for iomap operations.

This adds trace events for ntfs_iomap_begin() and
ntfs_iomap_end() to help observe iomap mapping activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
---
 fs/ntfs3/inode.c             |  4 +++
 include/trace/events/ntfs3.h | 50 ++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index 2bc4ce2ee8d8..bccb3feb5f3b 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -744,6 +744,8 @@ static int ntfs_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
 	bool new_clst = false;
 	bool no_da;
 	bool zero = false;
+
+	trace_ntfs3_iomap_begin(inode, offset, length, flags);
 	if (unlikely(ntfs3_forced_shutdown(sbi->sb)))
 		return -EIO;
 
@@ -882,6 +884,8 @@ static int ntfs_iomap_end(struct inode *inode, loff_t pos, loff_t length,
 	struct ntfs_inode *ni = ntfs_i(inode);
 	loff_t endbyte = pos + written;
 
+	trace_ntfs3_iomap_end(inode, pos, length, written, flags);
+
 	if ((flags & IOMAP_WRITE) || (flags & IOMAP_ZERO)) {
 		if (iomap->type == IOMAP_INLINE) {
 			u32 data_size;
diff --git a/include/trace/events/ntfs3.h b/include/trace/events/ntfs3.h
index 552f991b5257..a846aa61153c 100644
--- a/include/trace/events/ntfs3.h
+++ b/include/trace/events/ntfs3.h
@@ -307,6 +307,56 @@ TRACE_EVENT(ntfs3_attr_data_get_block,
 		  __entry->zero, __entry->no_da)
 );
 
+TRACE_EVENT(ntfs3_iomap_begin,
+	TP_PROTO(struct inode *inode, loff_t offset, loff_t length,
+		 unsigned int flags),
+	TP_ARGS(inode, offset, length, flags),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, ino)
+		__field(loff_t, offset)
+		__field(loff_t, length)
+		__field(unsigned int, flags)
+	),
+	TP_fast_assign(
+		__entry->dev = inode->i_sb->s_dev;
+		__entry->ino = inode->i_ino;
+		__entry->offset = offset;
+		__entry->length = length;
+		__entry->flags = flags;
+	),
+	TP_printk("dev=(%d,%d) ino=%lu offset=%lld length=%lld flags=0x%x",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->ino, __entry->offset, __entry->length,
+		  __entry->flags)
+);
+
+TRACE_EVENT(ntfs3_iomap_end,
+	TP_PROTO(struct inode *inode, loff_t pos, loff_t length,
+		 ssize_t written, unsigned int flags),
+	TP_ARGS(inode, pos, length, written, flags),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, ino)
+		__field(loff_t, pos)
+		__field(loff_t, length)
+		__field(ssize_t, written)
+		__field(unsigned int, flags)
+	),
+	TP_fast_assign(
+		__entry->dev = inode->i_sb->s_dev;
+		__entry->ino = inode->i_ino;
+		__entry->pos = pos;
+		__entry->length = length;
+		__entry->written = written;
+		__entry->flags = flags;
+	),
+	TP_printk("dev=(%d,%d) ino=%lu pos=%lld length=%lld written=%zd flags=0x%x",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->ino, __entry->pos, __entry->length,
+		  __entry->written, __entry->flags)
+);
+
 #endif /* _TRACE_NTFS3_H */
 
 #include <trace/define_trace.h>
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v1 v1 7/7] ntfs3: add file I/O tracepoints
  2026-07-17  3:22 [PATCH v1 0/7] ntfs3: add tracepoints for core filesystem paths Baolin Liu
                   ` (5 preceding siblings ...)
  2026-07-17  3:22 ` [PATCH v1 v1 6/7] ntfs3: add iomap tracepoints Baolin Liu
@ 2026-07-17  3:22 ` Baolin Liu
  6 siblings, 0 replies; 11+ messages in thread
From: Baolin Liu @ 2026-07-17  3:22 UTC (permalink / raw)
  To: almaz.alexandrovich, rostedt, mhiramat, mathieu.desnoyers
  Cc: linux-kernel, ntfs3, linux-trace-kernel, liubaolin12138,
	liubaolin12138, Baolin Liu

From: Baolin Liu <liubaolin@kylinos.cn>

Add ntfs3 tracepoints for file I/O operations.

This adds trace events for ntfs_file_read_iter() and
ntfs_file_write_iter() to help observe file read and
write activity.

Signed-off-by: Baolin Liu <liubaolin@kylinos.cn>
---
 fs/ntfs3/file.c              |  5 +++++
 include/trace/events/ntfs3.h | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/fs/ntfs3/file.c b/fs/ntfs3/file.c
index d601f088618c..a260a57ebd65 100644
--- a/fs/ntfs3/file.c
+++ b/fs/ntfs3/file.c
@@ -20,6 +20,7 @@
 #include "debug.h"
 #include "ntfs.h"
 #include "ntfs_fs.h"
+#include <trace/events/ntfs3.h>
 
 /*
  * cifx, btrfs, exfat, ext4, f2fs use this constant.
@@ -822,6 +823,8 @@ static ssize_t ntfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
 	unsigned int dio_flags;
 	ssize_t err;
 
+	trace_ntfs3_file_read_iter(iocb, iter);
+
 	err = check_read_restriction(inode);
 	if (err)
 		return err;
@@ -1225,6 +1228,8 @@ static ssize_t ntfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
 	loff_t vbo, endbyte;
 	ssize_t ret, err;
 
+	trace_ntfs3_file_write_iter(iocb, from);
+
 	if (!inode_trylock(inode)) {
 		if (iocb->ki_flags & IOCB_NOWAIT)
 			return -EAGAIN;
diff --git a/include/trace/events/ntfs3.h b/include/trace/events/ntfs3.h
index a846aa61153c..595314c09e43 100644
--- a/include/trace/events/ntfs3.h
+++ b/include/trace/events/ntfs3.h
@@ -357,6 +357,39 @@ TRACE_EVENT(ntfs3_iomap_end,
 		  __entry->written, __entry->flags)
 );
 
+DECLARE_EVENT_CLASS(ntfs3_file_class,
+	TP_PROTO(struct kiocb *iocb, struct iov_iter *iter),
+	TP_ARGS(iocb, iter),
+	TP_STRUCT__entry(
+		__field(dev_t, dev)
+		__field(unsigned long, ino)
+		__field(loff_t, size)
+		__field(loff_t, offset)
+		__field(size_t, count)
+	),
+	TP_fast_assign(
+		__entry->dev = file_inode(iocb->ki_filp)->i_sb->s_dev;
+		__entry->ino = file_inode(iocb->ki_filp)->i_ino;
+		__entry->size = i_size_read(file_inode(iocb->ki_filp));
+		__entry->offset = iocb->ki_pos;
+		__entry->count = iov_iter_count(iter);
+	),
+	TP_printk("dev=(%d,%d) ino=%lu size=%lld pos=%lld bytecount=%zu",
+		  MAJOR(__entry->dev), MINOR(__entry->dev),
+		  __entry->ino, __entry->size, __entry->offset,
+		  __entry->count)
+);
+
+DEFINE_EVENT(ntfs3_file_class, ntfs3_file_read_iter,
+	TP_PROTO(struct kiocb *iocb, struct iov_iter *iter),
+	TP_ARGS(iocb, iter)
+);
+
+DEFINE_EVENT(ntfs3_file_class, ntfs3_file_write_iter,
+	TP_PROTO(struct kiocb *iocb, struct iov_iter *iter),
+	TP_ARGS(iocb, iter)
+);
+
 #endif /* _TRACE_NTFS3_H */
 
 #include <trace/define_trace.h>
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 v1 2/7] ntfs3: add namei tracepoints
  2026-07-17  3:22 ` [PATCH v1 v1 2/7] ntfs3: add namei tracepoints Baolin Liu
@ 2026-07-21 21:09   ` Steven Rostedt
  2026-07-23  9:30     ` liubaolin
  0 siblings, 1 reply; 11+ messages in thread
From: Steven Rostedt @ 2026-07-21 21:09 UTC (permalink / raw)
  To: Baolin Liu
  Cc: almaz.alexandrovich, mhiramat, mathieu.desnoyers, linux-kernel,
	ntfs3, linux-trace-kernel, liubaolin12138, Baolin Liu

On Fri, 17 Jul 2026 11:22:43 +0800
Baolin Liu <liubaolin12138@163.com> wrote:

> +TRACE_EVENT(ntfs3_lookup,
> +	TP_PROTO(struct inode *dir, struct dentry *dentry),
> +	TP_ARGS(dir, dentry),
> +	TP_STRUCT__entry(
> +		__field(dev_t, dev)
> +		__field(unsigned long, parent_ino)
> +		__string(name, dentry->d_name.name)
> +		__field(unsigned int, name_len)
> +	),
> +	TP_fast_assign(
> +		__entry->dev = dir->i_sb->s_dev;
> +		__entry->parent_ino = dir->i_ino;
> +		__assign_str(name);
> +		__entry->name_len = dentry->d_name.len;

Is dentry->d_name.len not equal to strlen(dentry->d_name.name) + 1 ?

-- Steve


> +	),
> +	TP_printk("dev=(%d,%d) parent=%lu name=%s len=%u",
> +		  MAJOR(__entry->dev), MINOR(__entry->dev),
> +		  __entry->parent_ino, __get_str(name),
> +		  __entry->name_len)
> +);

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 v1 2/7] ntfs3: add namei tracepoints
  2026-07-21 21:09   ` Steven Rostedt
@ 2026-07-23  9:30     ` liubaolin
  2026-07-23 14:17       ` Steven Rostedt
  0 siblings, 1 reply; 11+ messages in thread
From: liubaolin @ 2026-07-23  9:30 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: almaz.alexandrovich, mhiramat, mathieu.desnoyers, linux-kernel,
	ntfs3, linux-trace-kernel, liubaolin12138, Baolin Liu,
	liubaolin12138

Dear Steve,
    dentry->d_name.len is the qstr length and does not include the 
trailing NUL, so it corresponds to strlen(dentry->d_name.name), rather 
than strlen(dentry->d_name.name) + 1.
If you think the extra name_len field here is unnecessary, I can submit 
a v2 patch to drop it. Looking forward to your feedback.

Best regards,
Baolin


在 2026/7/22 05:09, Steven Rostedt 写道:
> On Fri, 17 Jul 2026 11:22:43 +0800
> Baolin Liu <liubaolin12138@163.com> wrote:
> 
>> +TRACE_EVENT(ntfs3_lookup,
>> +	TP_PROTO(struct inode *dir, struct dentry *dentry),
>> +	TP_ARGS(dir, dentry),
>> +	TP_STRUCT__entry(
>> +		__field(dev_t, dev)
>> +		__field(unsigned long, parent_ino)
>> +		__string(name, dentry->d_name.name)
>> +		__field(unsigned int, name_len)
>> +	),
>> +	TP_fast_assign(
>> +		__entry->dev = dir->i_sb->s_dev;
>> +		__entry->parent_ino = dir->i_ino;
>> +		__assign_str(name);
>> +		__entry->name_len = dentry->d_name.len;
> 
> Is dentry->d_name.len not equal to strlen(dentry->d_name.name) + 1 ?
> 
> -- Steve
> 
> 
>> +	),
>> +	TP_printk("dev=(%d,%d) parent=%lu name=%s len=%u",
>> +		  MAJOR(__entry->dev), MINOR(__entry->dev),
>> +		  __entry->parent_ino, __get_str(name),
>> +		  __entry->name_len)
>> +);


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 v1 2/7] ntfs3: add namei tracepoints
  2026-07-23  9:30     ` liubaolin
@ 2026-07-23 14:17       ` Steven Rostedt
  0 siblings, 0 replies; 11+ messages in thread
From: Steven Rostedt @ 2026-07-23 14:17 UTC (permalink / raw)
  To: liubaolin
  Cc: almaz.alexandrovich, mhiramat, mathieu.desnoyers, linux-kernel,
	ntfs3, linux-trace-kernel, liubaolin12138, Baolin Liu

On Thu, 23 Jul 2026 17:30:33 +0800
liubaolin <liubaolin12138@163.com> wrote:

> Dear Steve,
>     dentry->d_name.len is the qstr length and does not include the 
> trailing NUL, so it corresponds to strlen(dentry->d_name.name), rather 
> than strlen(dentry->d_name.name) + 1.

But it is still tightly coupled with the actual length of the name.

> If you think the extra name_len field here is unnecessary, I can submit 
> a v2 patch to drop it. Looking forward to your feedback.

I'm wondering what the purpose of it is for. The length of the string is
also stored in part of the meta data of the event which can be retrieved
via:

  __get_dynnamic_array_len(name)

Although that will be strlen(name) + 1.

-- Steve

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-07-23 14:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17  3:22 [PATCH v1 0/7] ntfs3: add tracepoints for core filesystem paths Baolin Liu
2026-07-17  3:22 ` [PATCH v1 v1 1/7] ntfs3: add mount and log replay tracepoints Baolin Liu
2026-07-17  3:22 ` [PATCH v1 v1 2/7] ntfs3: add namei tracepoints Baolin Liu
2026-07-21 21:09   ` Steven Rostedt
2026-07-23  9:30     ` liubaolin
2026-07-23 14:17       ` Steven Rostedt
2026-07-17  3:22 ` [PATCH v1 v1 3/7] ntfs3: add create inode tracepoint Baolin Liu
2026-07-17  3:22 ` [PATCH v1 v1 4/7] ntfs3: add directory index tracepoints Baolin Liu
2026-07-17  3:22 ` [PATCH v1 v1 5/7] ntfs3: add allocation tracepoints Baolin Liu
2026-07-17  3:22 ` [PATCH v1 v1 6/7] ntfs3: add iomap tracepoints Baolin Liu
2026-07-17  3:22 ` [PATCH v1 v1 7/7] ntfs3: add file I/O tracepoints Baolin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox