mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 05:02:31 +00:00
f2fs: convert f2fs__page tracepoint class to use folio
Convert f2fs__page tracepoint class() and its instances to use folio and related functionality, and rename it to f2fs__folio(). Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
96ea46f30b
commit
92f750d847
@ -345,7 +345,7 @@ static int __f2fs_write_meta_page(struct page *page,
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_P_SB(page);
|
||||
|
||||
trace_f2fs_writepage(page, META);
|
||||
trace_f2fs_writepage(page_folio(page), META);
|
||||
|
||||
if (unlikely(f2fs_cp_error(sbi))) {
|
||||
if (is_sbi_flag_set(sbi, SBI_IS_CLOSE)) {
|
||||
@ -492,7 +492,7 @@ long f2fs_sync_meta_pages(struct f2fs_sb_info *sbi, enum page_type type,
|
||||
static bool f2fs_dirty_meta_folio(struct address_space *mapping,
|
||||
struct folio *folio)
|
||||
{
|
||||
trace_f2fs_set_page_dirty(&folio->page, META);
|
||||
trace_f2fs_set_page_dirty(folio, META);
|
||||
|
||||
if (!folio_test_uptodate(folio))
|
||||
folio_mark_uptodate(folio);
|
||||
|
@ -2461,7 +2461,7 @@ static int f2fs_read_data_folio(struct file *file, struct folio *folio)
|
||||
struct inode *inode = folio_file_mapping(folio)->host;
|
||||
int ret = -EAGAIN;
|
||||
|
||||
trace_f2fs_readpage(&folio->page, DATA);
|
||||
trace_f2fs_readpage(folio, DATA);
|
||||
|
||||
if (!f2fs_is_compress_backend_ready(inode)) {
|
||||
folio_unlock(folio);
|
||||
@ -2710,7 +2710,7 @@ int f2fs_do_write_data_page(struct f2fs_io_info *fio)
|
||||
} else {
|
||||
set_inode_flag(inode, FI_UPDATE_WRITE);
|
||||
}
|
||||
trace_f2fs_do_write_data_page(fio->page, IPU);
|
||||
trace_f2fs_do_write_data_page(page_folio(page), IPU);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -2739,7 +2739,7 @@ int f2fs_do_write_data_page(struct f2fs_io_info *fio)
|
||||
|
||||
/* LFS mode write path */
|
||||
f2fs_outplace_write_data(&dn, fio);
|
||||
trace_f2fs_do_write_data_page(page, OPU);
|
||||
trace_f2fs_do_write_data_page(page_folio(page), OPU);
|
||||
set_inode_flag(inode, FI_APPEND_WRITE);
|
||||
out_writepage:
|
||||
f2fs_put_dnode(&dn);
|
||||
@ -2786,7 +2786,7 @@ int f2fs_write_single_data_page(struct page *page, int *submitted,
|
||||
.last_block = last_block,
|
||||
};
|
||||
|
||||
trace_f2fs_writepage(page, DATA);
|
||||
trace_f2fs_writepage(page_folio(page), DATA);
|
||||
|
||||
/* we should bypass data pages to proceed the kworker jobs */
|
||||
if (unlikely(f2fs_cp_error(sbi))) {
|
||||
@ -3760,7 +3760,7 @@ static bool f2fs_dirty_data_folio(struct address_space *mapping,
|
||||
{
|
||||
struct inode *inode = mapping->host;
|
||||
|
||||
trace_f2fs_set_page_dirty(&folio->page, DATA);
|
||||
trace_f2fs_set_page_dirty(folio, DATA);
|
||||
|
||||
if (!folio_test_uptodate(folio))
|
||||
folio_mark_uptodate(folio);
|
||||
|
@ -1624,7 +1624,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
|
||||
};
|
||||
unsigned int seq;
|
||||
|
||||
trace_f2fs_writepage(page, NODE);
|
||||
trace_f2fs_writepage(page_folio(page), NODE);
|
||||
|
||||
if (unlikely(f2fs_cp_error(sbi))) {
|
||||
/* keep node pages in remount-ro mode */
|
||||
@ -2171,7 +2171,7 @@ static int f2fs_write_node_pages(struct address_space *mapping,
|
||||
static bool f2fs_dirty_node_folio(struct address_space *mapping,
|
||||
struct folio *folio)
|
||||
{
|
||||
trace_f2fs_set_page_dirty(&folio->page, NODE);
|
||||
trace_f2fs_set_page_dirty(folio, NODE);
|
||||
|
||||
if (!folio_test_uptodate(folio))
|
||||
folio_mark_uptodate(folio);
|
||||
|
@ -1304,11 +1304,11 @@ TRACE_EVENT(f2fs_write_end,
|
||||
__entry->copied)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(f2fs__page,
|
||||
DECLARE_EVENT_CLASS(f2fs__folio,
|
||||
|
||||
TP_PROTO(struct page *page, int type),
|
||||
TP_PROTO(struct folio *folio, int type),
|
||||
|
||||
TP_ARGS(page, type),
|
||||
TP_ARGS(folio, type),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(dev_t, dev)
|
||||
@ -1321,14 +1321,14 @@ DECLARE_EVENT_CLASS(f2fs__page,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->dev = page_file_mapping(page)->host->i_sb->s_dev;
|
||||
__entry->ino = page_file_mapping(page)->host->i_ino;
|
||||
__entry->dev = folio_file_mapping(folio)->host->i_sb->s_dev;
|
||||
__entry->ino = folio_file_mapping(folio)->host->i_ino;
|
||||
__entry->type = type;
|
||||
__entry->dir =
|
||||
S_ISDIR(page_file_mapping(page)->host->i_mode);
|
||||
__entry->index = page->index;
|
||||
__entry->dirty = PageDirty(page);
|
||||
__entry->uptodate = PageUptodate(page);
|
||||
S_ISDIR(folio_file_mapping(folio)->host->i_mode);
|
||||
__entry->index = folio_index(folio);
|
||||
__entry->dirty = folio_test_dirty(folio);
|
||||
__entry->uptodate = folio_test_uptodate(folio);
|
||||
),
|
||||
|
||||
TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
|
||||
@ -1341,32 +1341,32 @@ DECLARE_EVENT_CLASS(f2fs__page,
|
||||
__entry->uptodate)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(f2fs__page, f2fs_writepage,
|
||||
DEFINE_EVENT(f2fs__folio, f2fs_writepage,
|
||||
|
||||
TP_PROTO(struct page *page, int type),
|
||||
TP_PROTO(struct folio *folio, int type),
|
||||
|
||||
TP_ARGS(page, type)
|
||||
TP_ARGS(folio, type)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(f2fs__page, f2fs_do_write_data_page,
|
||||
DEFINE_EVENT(f2fs__folio, f2fs_do_write_data_page,
|
||||
|
||||
TP_PROTO(struct page *page, int type),
|
||||
TP_PROTO(struct folio *folio, int type),
|
||||
|
||||
TP_ARGS(page, type)
|
||||
TP_ARGS(folio, type)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(f2fs__page, f2fs_readpage,
|
||||
DEFINE_EVENT(f2fs__folio, f2fs_readpage,
|
||||
|
||||
TP_PROTO(struct page *page, int type),
|
||||
TP_PROTO(struct folio *folio, int type),
|
||||
|
||||
TP_ARGS(page, type)
|
||||
TP_ARGS(folio, type)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty,
|
||||
DEFINE_EVENT(f2fs__folio, f2fs_set_page_dirty,
|
||||
|
||||
TP_PROTO(struct page *page, int type),
|
||||
TP_PROTO(struct folio *folio, int type),
|
||||
|
||||
TP_ARGS(page, type)
|
||||
TP_ARGS(folio, type)
|
||||
);
|
||||
|
||||
TRACE_EVENT(f2fs_replace_atomic_write_block,
|
||||
|
Loading…
Reference in New Issue
Block a user