btrfs: update the writepage tracepoint to take a folio

Willy is wanting to get rid of page->index, convert the writepage
tracepoint to take a folio so we can do folio->index instead of
page->index.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik 2024-07-23 17:12:15 -04:00 committed by David Sterba
parent 56a24a30a4
commit 9e97e8b277
2 changed files with 6 additions and 6 deletions

View File

@ -1531,7 +1531,7 @@ static int __extent_writepage(struct page *page, struct btrfs_bio_ctrl *bio_ctrl
loff_t i_size = i_size_read(inode);
unsigned long end_index = i_size >> PAGE_SHIFT;
trace___extent_writepage(page, inode, bio_ctrl->wbc);
trace___extent_writepage(folio, inode, bio_ctrl->wbc);
WARN_ON(!PageLocked(page));

View File

@ -674,10 +674,10 @@ TRACE_EVENT(btrfs_finish_ordered_extent,
DECLARE_EVENT_CLASS(btrfs__writepage,
TP_PROTO(const struct page *page, const struct inode *inode,
TP_PROTO(const struct folio *folio, const struct inode *inode,
const struct writeback_control *wbc),
TP_ARGS(page, inode, wbc),
TP_ARGS(folio, inode, wbc),
TP_STRUCT__entry_btrfs(
__field( u64, ino )
@ -695,7 +695,7 @@ DECLARE_EVENT_CLASS(btrfs__writepage,
TP_fast_assign_btrfs(btrfs_sb(inode->i_sb),
__entry->ino = btrfs_ino(BTRFS_I(inode));
__entry->index = page->index;
__entry->index = folio->index;
__entry->nr_to_write = wbc->nr_to_write;
__entry->pages_skipped = wbc->pages_skipped;
__entry->range_start = wbc->range_start;
@ -723,10 +723,10 @@ DECLARE_EVENT_CLASS(btrfs__writepage,
DEFINE_EVENT(btrfs__writepage, __extent_writepage,
TP_PROTO(const struct page *page, const struct inode *inode,
TP_PROTO(const struct folio *folio, const struct inode *inode,
const struct writeback_control *wbc),
TP_ARGS(page, inode, wbc)
TP_ARGS(folio, inode, wbc)
);
TRACE_EVENT(btrfs_writepage_end_io_hook,