[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230619154432.2205654-1-heyunlei@oppo.com>
Date: Mon, 19 Jun 2023 23:44:32 +0800
From: Yunlei He <heyunlei@...o.com>
To: jaegeuk@...nel.org, chao@...nel.org
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, Yunlei He <heyunlei@...o.com>
Subject: [f2fs-dev][PATCH v2] f2fs: count mmap write io more accurately
This patch count mmap write io more accurately.
Signed-off-by: Yunlei He <heyunlei@...o.com>
---
fs/f2fs/file.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index f05209a62370..cb42d8464ad9 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -150,11 +150,13 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf)
}
set_page_dirty(page);
- f2fs_update_iostat(sbi, inode, APP_MAPPED_IO, F2FS_BLKSIZE);
- f2fs_update_time(sbi, REQ_TIME);
-
- trace_f2fs_vm_page_mkwrite(page, DATA);
out_sem:
+ if (!err) {
+ f2fs_update_iostat(sbi, inode, APP_MAPPED_IO, F2FS_BLKSIZE);
+ f2fs_update_time(sbi, REQ_TIME);
+
+ trace_f2fs_vm_page_mkwrite(page, DATA);
+ }
filemap_invalidate_unlock_shared(inode->i_mapping);
sb_end_pagefault(inode->i_sb);
--
2.40.1
Powered by blists - more mailing lists