diff options
| author | Baolin Liu <liubaolin@kylinos.cn> | 2026-08-20 17:05:02 +0800 |
|---|---|---|
| committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2026-10-28 08:09:19 +0100 |
| commit | 3bd6d6540dc62121a978f783a7e73d61ea00a007 (patch) | |
| tree | 327d256c5215563dc34c93ffcf783044240d2e86 /fs | |
| parent | 4feafef66a0f7b071e8aea653ca441b94769296f (diff) | |
| download | linux-3bd6d6540dc62121a978f783a7e73d61ea00a007.tar.gz linux-3bd6d6540dc62121a978f783a7e73d61ea00a007.zip | |
ntfs3: add allocation tracepoints
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>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ntfs3/attrib.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c index a44c387a3085..805acc3ed869 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 @@ -172,6 +173,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); @@ -470,6 +473,12 @@ again: goto bad_inode; } + trace_ntfs3_attr_set_size_ex(&ni->vfs_inode, le32_to_cpu(type), + attr_b->non_res ? + le64_to_cpu(attr_b->nres.data_size) : + le32_to_cpu(attr_b->res.data_size), + new_size, keep_prealloc, no_da); + if (!attr_b->non_res) { err = attr_set_size_res(ni, attr_b, le_b, mi_b, new_size, run, &attr_b); @@ -971,6 +980,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, 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, |
