[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c24fc95fa184fdd799d9d3d32b3227f790ba772f.1712126039.git.sweettea-kernel@dorminy.me>
Date: Wed, 3 Apr 2024 03:22:49 -0400
From: Sweet Tea Dorminy <sweettea-kernel@...miny.me>
To: Jonathan Corbet <corbet@....net>,
Kent Overstreet <kent.overstreet@...ux.dev>,
Brian Foster <bfoster@...hat.com>,
Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Chao Yu <chao@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Jan Kara <jack@...e.cz>,
Mickaël Salaün <mic@...ikod.net>,
Sweet Tea Dorminy <sweettea-kernel@...miny.me>,
linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-bcachefs@...r.kernel.org,
linux-btrfs@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
linux-fsdevel@...r.kernel.org,
kernel-team@...a.com
Subject: [PATCH v3 08/13] f2fs: fiemap: add physical length to trace_f2fs_fiemap
Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@...miny.me>
---
fs/f2fs/data.c | 6 +++---
fs/f2fs/inline.c | 2 +-
include/trace/events/f2fs.h | 10 +++++++---
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 87f8d828e038..34af1673461b 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1836,7 +1836,7 @@ static int f2fs_xattr_fiemap(struct inode *inode,
err = fiemap_fill_next_extent(
fieinfo, 0, phys, len, 0, flags);
- trace_f2fs_fiemap(inode, 0, phys, len, flags, err);
+ trace_f2fs_fiemap(inode, 0, phys, len, 0, flags, err);
if (err)
return err;
}
@@ -1863,7 +1863,7 @@ static int f2fs_xattr_fiemap(struct inode *inode,
if (phys) {
err = fiemap_fill_next_extent(
fieinfo, 0, phys, len, 0, flags);
- trace_f2fs_fiemap(inode, 0, phys, len, flags, err);
+ trace_f2fs_fiemap(inode, 0, phys, len, 0, flags, err);
}
return (err < 0 ? err : 0);
@@ -1982,7 +1982,7 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
ret = fiemap_fill_next_extent(fieinfo, logical,
phys, size, 0, flags);
- trace_f2fs_fiemap(inode, logical, phys, size, flags, ret);
+ trace_f2fs_fiemap(inode, logical, phys, size, 0, flags, ret);
if (ret)
goto out;
size = 0;
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 49d2f87fe048..235b0d72f6fc 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -808,7 +808,7 @@ int f2fs_inline_data_fiemap(struct inode *inode,
(char *)F2FS_INODE(ipage);
err = fiemap_fill_next_extent(
fieinfo, start, byteaddr, ilen, 0, flags);
- trace_f2fs_fiemap(inode, start, byteaddr, ilen, flags, err);
+ trace_f2fs_fiemap(inode, start, byteaddr, ilen, 0, flags, err);
out:
f2fs_put_page(ipage, 1);
return err;
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 7ed0fc430dc6..63706eb3a5db 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -2276,9 +2276,10 @@ TRACE_EVENT(f2fs_bmap,
TRACE_EVENT(f2fs_fiemap,
TP_PROTO(struct inode *inode, sector_t lblock, sector_t pblock,
- unsigned long long len, unsigned int flags, int ret),
+ unsigned long long len, unsigned long long phys_len,
+ unsigned int flags, int ret),
- TP_ARGS(inode, lblock, pblock, len, flags, ret),
+ TP_ARGS(inode, lblock, pblock, len, phys_len, flags, ret),
TP_STRUCT__entry(
__field(dev_t, dev)
@@ -2286,6 +2287,7 @@ TRACE_EVENT(f2fs_fiemap,
__field(sector_t, lblock)
__field(sector_t, pblock)
__field(unsigned long long, len)
+ __field(unsigned long long, phys_len)
__field(unsigned int, flags)
__field(int, ret)
),
@@ -2296,16 +2298,18 @@ TRACE_EVENT(f2fs_fiemap,
__entry->lblock = lblock;
__entry->pblock = pblock;
__entry->len = len;
+ __entry->phys_len = phys_len;
__entry->flags = flags;
__entry->ret = ret;
),
TP_printk("dev = (%d,%d), ino = %lu, lblock:%lld, pblock:%lld, "
- "len:%llu, flags:%u, ret:%d",
+ "len:%llu, plen:%llu, flags:%u, ret:%d",
show_dev_ino(__entry),
(unsigned long long)__entry->lblock,
(unsigned long long)__entry->pblock,
__entry->len,
+ __entry->phys_len,
__entry->flags,
__entry->ret)
);
--
2.43.0
Powered by blists - more mailing lists