mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user