From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 03/12] btrfs: Make ordered extent tracepoint take btrfs_inode
Date: Mon, 31 Aug 2020 14:42:40 +0300 [thread overview]
Message-ID: <20200831114249.8360-4-nborisov@suse.com> (raw)
In-Reply-To: <20200831114249.8360-1-nborisov@suse.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
fs/btrfs/ordered-data.c | 8 ++++----
include/trace/events/btrfs.h | 17 ++++++++---------
2 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index 5a7e9c5872d3..369ddad30d9c 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -217,7 +217,7 @@ static int __btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset
INIT_LIST_HEAD(&entry->work_list);
init_completion(&entry->completion);
- trace_btrfs_ordered_extent_add(&inode->vfs_inode, entry);
+ trace_btrfs_ordered_extent_add(inode, entry);
spin_lock_irq(&tree->lock);
node = tree_insert(&tree->tree, file_offset,
@@ -442,7 +442,7 @@ void btrfs_put_ordered_extent(struct btrfs_ordered_extent *entry)
struct list_head *cur;
struct btrfs_ordered_sum *sum;
- trace_btrfs_ordered_extent_put(entry->inode, entry);
+ trace_btrfs_ordered_extent_put(BTRFS_I(entry->inode), entry);
if (refcount_dec_and_test(&entry->refs)) {
ASSERT(list_empty(&entry->root_extent_list));
@@ -528,7 +528,7 @@ void btrfs_remove_ordered_extent(struct inode *inode,
list_del_init(&entry->root_extent_list);
root->nr_ordered_extents--;
- trace_btrfs_ordered_extent_remove(inode, entry);
+ trace_btrfs_ordered_extent_remove(BTRFS_I(inode), entry);
if (!root->nr_ordered_extents) {
spin_lock(&fs_info->ordered_root_lock);
@@ -658,7 +658,7 @@ void btrfs_start_ordered_extent(struct inode *inode,
u64 start = entry->file_offset;
u64 end = start + entry->num_bytes - 1;
- trace_btrfs_ordered_extent_start(inode, entry);
+ trace_btrfs_ordered_extent_start(BTRFS_I(inode), entry);
/*
* pages in the range can be dirty, clean or writeback. We
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 34baf3290b89..fec0a5bcf481 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -510,7 +510,7 @@ DEFINE_EVENT(
DECLARE_EVENT_CLASS(btrfs__ordered_extent,
- TP_PROTO(const struct inode *inode,
+ TP_PROTO(const struct btrfs_inode *inode,
const struct btrfs_ordered_extent *ordered),
TP_ARGS(inode, ordered),
@@ -529,8 +529,8 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
__field( u64, truncated_len )
),
- TP_fast_assign_btrfs(btrfs_sb(inode->i_sb),
- __entry->ino = btrfs_ino(BTRFS_I(inode));
+ TP_fast_assign_btrfs(inode->root->fs_info,
+ __entry->ino = btrfs_ino(inode);
__entry->file_offset = ordered->file_offset;
__entry->start = ordered->disk_bytenr;
__entry->len = ordered->num_bytes;
@@ -539,8 +539,7 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
__entry->flags = ordered->flags;
__entry->compress_type = ordered->compress_type;
__entry->refs = refcount_read(&ordered->refs);
- __entry->root_objectid =
- BTRFS_I(inode)->root->root_key.objectid;
+ __entry->root_objectid = inode->root->root_key.objectid;
__entry->truncated_len = ordered->truncated_len;
),
@@ -563,7 +562,7 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_add,
- TP_PROTO(const struct inode *inode,
+ TP_PROTO(const struct btrfs_inode *inode,
const struct btrfs_ordered_extent *ordered),
TP_ARGS(inode, ordered)
@@ -571,7 +570,7 @@ DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_add,
DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_remove,
- TP_PROTO(const struct inode *inode,
+ TP_PROTO(const struct btrfs_inode *inode,
const struct btrfs_ordered_extent *ordered),
TP_ARGS(inode, ordered)
@@ -579,7 +578,7 @@ DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_remove,
DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_start,
- TP_PROTO(const struct inode *inode,
+ TP_PROTO(const struct btrfs_inode *inode,
const struct btrfs_ordered_extent *ordered),
TP_ARGS(inode, ordered)
@@ -587,7 +586,7 @@ DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_start,
DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_put,
- TP_PROTO(const struct inode *inode,
+ TP_PROTO(const struct btrfs_inode *inode,
const struct btrfs_ordered_extent *ordered),
TP_ARGS(inode, ordered)
--
2.17.1
next prev parent reply other threads:[~2020-08-31 11:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 11:42 [PATCH 00/12] Another batch of inode vs btrfs_inode cleanups Nikolay Borisov
2020-08-31 11:42 ` [PATCH 01/12] btrfs: Make inode_tree_del take btrfs_inode Nikolay Borisov
2020-08-31 12:03 ` Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 02/12] btrfs: Make btrfs_lookup_first_ordered_extent " Nikolay Borisov
2020-08-31 12:09 ` Johannes Thumshirn
2020-08-31 11:42 ` Nikolay Borisov [this message]
2020-08-31 12:14 ` [PATCH 03/12] btrfs: Make ordered extent tracepoint " Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 04/12] btrfs: Make btrfs_dec_test_ordered_pending " Nikolay Borisov
2020-08-31 12:19 ` Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 05/12] btrfs: Convert btrfs_inode_sectorsize to " Nikolay Borisov
2020-08-31 12:20 ` Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 06/12] btrfs: Make btrfs_invalidatepage work on btrfs_inode Nikolay Borisov
2020-08-31 13:24 ` Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 07/12] btrfs: Make btrfs_writepage_endio_finish_ordered btrfs_inode-centric Nikolay Borisov
2020-08-31 12:23 ` Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 08/12] btrfs: Make get_extent_skip_holes take btrfs_inode Nikolay Borisov
2020-08-31 12:26 ` Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 09/12] btrfs: Make btrfs_find_ordered_sum " Nikolay Borisov
2020-08-31 13:14 ` Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 10/12] btrfs: Make copy_inline_to_page " Nikolay Borisov
2020-08-31 13:18 ` Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 11/12] btrfs: Make btrfs_zero_range_check_range_boundary " Nikolay Borisov
2020-08-31 13:20 ` Johannes Thumshirn
2020-08-31 11:42 ` [PATCH 12/12] btrfs: Make extent_fiemap take btrfs_iode Nikolay Borisov
2020-08-31 13:21 ` Johannes Thumshirn
2020-08-31 15:43 ` [PATCH 00/12] Another batch of inode vs btrfs_inode cleanups Josef Bacik
2020-09-01 14:13 ` David Sterba
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=20200831114249.8360-4-nborisov@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@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