f2fs: trace elapsed time for cp_rwsem lock

Use f2fs_{down,up}_read_trace for cp_rwsem to trace lock elapsed time.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu
2026-01-04 10:07:18 +08:00
committed by Jaegeuk Kim
parent e4b75621fc
commit 66e9e0d55d
13 changed files with 173 additions and 126 deletions

View File

@@ -910,9 +910,11 @@ retry:
err = -EIO;
if (!err) {
f2fs_lock_op(sbi);
struct f2fs_lock_context lc;
f2fs_lock_op(sbi, &lc);
err = f2fs_remove_inode_page(inode);
f2fs_unlock_op(sbi);
f2fs_unlock_op(sbi, &lc);
if (err == -ENOENT) {
err = 0;
@@ -1009,7 +1011,7 @@ out_clear:
}
/* caller should call f2fs_lock_op() */
void f2fs_handle_failed_inode(struct inode *inode)
void f2fs_handle_failed_inode(struct inode *inode, struct f2fs_lock_context *lc)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
struct node_info ni;
@@ -1058,7 +1060,7 @@ void f2fs_handle_failed_inode(struct inode *inode)
}
out:
f2fs_unlock_op(sbi);
f2fs_unlock_op(sbi, lc);
/* iput will drop the inode object */
iput(inode);