Skip to content

Commit

Permalink
f2fs: deprecate f2fs_trace_io
Browse files Browse the repository at this point in the history
This patch deprecates f2fs_trace_io, since f2fs uses page->private more broadly,
resulting in more buggy cases.

Acked-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Jaegeuk Kim committed Jan 27, 2021
1 parent 12699fb commit d5f7bc0
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 239 deletions.
10 changes: 0 additions & 10 deletions fs/f2fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@ config F2FS_CHECK_FS

If you want to improve the performance, say N.

config F2FS_IO_TRACE
bool "F2FS IO tracer"
depends on F2FS_FS
depends on FUNCTION_TRACER
help
F2FS IO trace is based on a function trace, which gathers process
information and block IO patterns in the filesystem level.

If unsure, say N.

config F2FS_FAULT_INJECTION
bool "F2FS fault injection facility"
depends on F2FS_FS
Expand Down
1 change: 0 additions & 1 deletion fs/f2fs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ f2fs-y += shrinker.o extent_cache.o sysfs.o
f2fs-$(CONFIG_F2FS_STAT_FS) += debug.o
f2fs-$(CONFIG_F2FS_FS_XATTR) += xattr.o
f2fs-$(CONFIG_F2FS_FS_POSIX_ACL) += acl.o
f2fs-$(CONFIG_F2FS_IO_TRACE) += trace.o
f2fs-$(CONFIG_FS_VERITY) += verity.o
f2fs-$(CONFIG_F2FS_FS_COMPRESSION) += compress.o
3 changes: 0 additions & 3 deletions fs/f2fs/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "f2fs.h"
#include "node.h"
#include "segment.h"
#include "trace.h"
#include <trace/events/f2fs.h>

static struct kmem_cache *ino_entry_slab;
Expand Down Expand Up @@ -443,7 +442,6 @@ static int f2fs_set_meta_page_dirty(struct page *page)
__set_page_dirty_nobuffers(page);
inc_page_count(F2FS_P_SB(page), F2FS_DIRTY_META);
f2fs_set_page_private(page, 0);
f2fs_trace_pid(page);
return 1;
}
return 0;
Expand Down Expand Up @@ -1017,7 +1015,6 @@ void f2fs_update_dirty_page(struct inode *inode, struct page *page)
spin_unlock(&sbi->inode_lock[type]);

f2fs_set_page_private(page, 0);
f2fs_trace_pid(page);
}

void f2fs_remove_dirty_inode(struct inode *inode)
Expand Down
4 changes: 0 additions & 4 deletions fs/f2fs/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "f2fs.h"
#include "node.h"
#include "segment.h"
#include "trace.h"
#include <trace/events/f2fs.h>

#define NUM_PREALLOC_POST_READ_CTXS 128
Expand Down Expand Up @@ -679,7 +678,6 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio)
return -EFSCORRUPTED;

trace_f2fs_submit_page_bio(page, fio);
f2fs_trace_ios(fio, 0);

/* Allocate a new bio */
bio = __bio_alloc(fio, 1);
Expand Down Expand Up @@ -884,7 +882,6 @@ int f2fs_merge_page_bio(struct f2fs_io_info *fio)
return -EFSCORRUPTED;

trace_f2fs_submit_page_bio(page, fio);
f2fs_trace_ios(fio, 0);

if (bio && !page_is_mergeable(fio->sbi, bio, *fio->last_block,
fio->new_blkaddr))
Expand Down Expand Up @@ -981,7 +978,6 @@ void f2fs_submit_page_write(struct f2fs_io_info *fio)
wbc_account_cgroup_owner(fio->io_wbc, bio_page, PAGE_SIZE);

io->last_block_in_bio = fio->new_blkaddr;
f2fs_trace_ios(fio, 0);

trace_f2fs_submit_page_write(fio->page, fio);
skip:
Expand Down
2 changes: 0 additions & 2 deletions fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "xattr.h"
#include "acl.h"
#include "gc.h"
#include "trace.h"
#include <trace/events/f2fs.h>
#include <uapi/linux/f2fs.h>

Expand Down Expand Up @@ -369,7 +368,6 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
f2fs_update_time(sbi, REQ_TIME);
out:
trace_f2fs_sync_file_exit(inode, cp_reason, datasync, ret);
f2fs_trace_ios(NULL, 1);
return ret;
}

Expand Down
2 changes: 0 additions & 2 deletions fs/f2fs/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "node.h"
#include "segment.h"
#include "xattr.h"
#include "trace.h"
#include <trace/events/f2fs.h>

#define on_f2fs_build_free_nids(nmi) mutex_is_locked(&(nm_i)->build_lock)
Expand Down Expand Up @@ -2089,7 +2088,6 @@ static int f2fs_set_node_page_dirty(struct page *page)
__set_page_dirty_nobuffers(page);
inc_page_count(F2FS_P_SB(page), F2FS_DIRTY_NODES);
f2fs_set_page_private(page, 0);
f2fs_trace_pid(page);
return 1;
}
return 0;
Expand Down
3 changes: 0 additions & 3 deletions fs/f2fs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "segment.h"
#include "node.h"
#include "gc.h"
#include "trace.h"
#include <trace/events/f2fs.h>

#define __reverse_ffz(x) __reverse_ffs(~(x))
Expand Down Expand Up @@ -187,8 +186,6 @@ void f2fs_register_inmem_page(struct inode *inode, struct page *page)
{
struct inmem_pages *new;

f2fs_trace_pid(page);

f2fs_set_page_private(page, ATOMIC_WRITTEN_PAGE);

new = f2fs_kmem_cache_alloc(inmem_entry_slab, GFP_NOFS);
Expand Down
6 changes: 0 additions & 6 deletions fs/f2fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "segment.h"
#include "xattr.h"
#include "gc.h"
#include "trace.h"

#define CREATE_TRACE_POINTS
#include <trace/events/f2fs.h>
Expand Down Expand Up @@ -1448,8 +1447,6 @@ int f2fs_sync_fs(struct super_block *sb, int sync)
err = f2fs_write_checkpoint(sbi, &cpc);
up_write(&sbi->gc_lock);
}
f2fs_trace_ios(NULL, 1);

return err;
}

Expand Down Expand Up @@ -4127,8 +4124,6 @@ static int __init init_f2fs_fs(void)
return -EINVAL;
}

f2fs_build_trace_ios();

err = init_inodecache();
if (err)
goto fail;
Expand Down Expand Up @@ -4221,7 +4216,6 @@ static void __exit exit_f2fs_fs(void)
f2fs_destroy_segment_manager_caches();
f2fs_destroy_node_manager_caches();
destroy_inodecache();
f2fs_destroy_trace_ios();
}

module_init(init_f2fs_fs)
Expand Down
165 changes: 0 additions & 165 deletions fs/f2fs/trace.c

This file was deleted.

43 changes: 0 additions & 43 deletions fs/f2fs/trace.h

This file was deleted.

0 comments on commit d5f7bc0

Please sign in to comment.