UPSTREAM: f2fs: do not bother checkpoint by f2fs_get_node_info
This patch tries to mitigate lock contention between f2fs_write_checkpoint and f2fs_get_node_info along with nat_tree_lock. The idea is, if checkpoint is currently running, other threads that try to grab nat_tree_lock would be better to wait for checkpoint. Bug: 214413989 Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> (cherry picked from commit a9419b63bf414775e8aeee95d8c4a5e0df690748 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master) Change-Id: I7e253e8bf26012e451330ba6ce00bfc3839bdda3
This commit is contained in:
@@ -868,7 +868,7 @@ void f2fs_handle_failed_inode(struct inode *inode)
|
||||
* so we can prevent losing this orphan when encoutering checkpoint
|
||||
* and following suddenly power-off.
|
||||
*/
|
||||
err = f2fs_get_node_info(sbi, inode->i_ino, &ni);
|
||||
err = f2fs_get_node_info(sbi, inode->i_ino, &ni, false);
|
||||
if (err) {
|
||||
set_sbi_flag(sbi, SBI_NEED_FSCK);
|
||||
f2fs_warn(sbi, "May loss orphan inode, run fsck to fix.");
|
||||
|
Reference in New Issue
Block a user