diff options
author | Youling Tang <tangyouling@kylinos.cn> | 2024-05-31 10:35:09 +0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-14 19:00:14 -0400 |
commit | 747d1d6c7efdfb4e59a93a129eaf434cb9325eb8 (patch) | |
tree | b383b5abd92388df7c60b96aa6e5c8474e1088a0 /fs/bcachefs/fs-io.c | |
parent | 8b0882505d012ef5f309a1b547fae53080a62f07 (diff) | |
download | lwn-747d1d6c7efdfb4e59a93a129eaf434cb9325eb8.tar.gz lwn-747d1d6c7efdfb4e59a93a129eaf434cb9325eb8.zip |
bcachefs: Add tracepoints for bch2_sync_fs() and bch2_fsync()
Add trace_bch2_sync_fs() and trace_bch2_fsync() implementations.
The output in trace is as follows:
sync-29779 [000] ..... 193.700935: bch2_sync_fs: dev 254,16 wait 1
<...>-40027 [002] ..... 342.535227: bch2_fsync: dev 254,32 ino 4099 parent 4096 datasync 1
Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r-- | fs/bcachefs/fs-io.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index 1b734fd4acd2..fead9ab10e4a 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -194,6 +194,8 @@ int bch2_fsync(struct file *file, loff_t start, loff_t end, int datasync) struct bch_fs *c = inode->v.i_sb->s_fs_info; int ret, err; + trace_bch2_fsync(file, datasync); + ret = file_write_and_wait_range(file, start, end); if (ret) goto out; |