aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r--fs/f2fs/segment.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 890bb28d2082..d74cc330ae13 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -470,6 +470,10 @@ static inline bool need_SSR(struct f2fs_sb_info *sbi)
470{ 470{
471 int node_secs = get_blocktype_secs(sbi, F2FS_DIRTY_NODES); 471 int node_secs = get_blocktype_secs(sbi, F2FS_DIRTY_NODES);
472 int dent_secs = get_blocktype_secs(sbi, F2FS_DIRTY_DENTS); 472 int dent_secs = get_blocktype_secs(sbi, F2FS_DIRTY_DENTS);
473
474 if (test_opt(sbi, LFS))
475 return false;
476
473 return free_sections(sbi) <= (node_secs + 2 * dent_secs + 477 return free_sections(sbi) <= (node_secs + 2 * dent_secs +
474 reserved_sections(sbi) + 1); 478 reserved_sections(sbi) + 1);
475} 479}
@@ -533,6 +537,9 @@ static inline bool need_inplace_update(struct inode *inode)
533 if (S_ISDIR(inode->i_mode) || f2fs_is_atomic_file(inode)) 537 if (S_ISDIR(inode->i_mode) || f2fs_is_atomic_file(inode))
534 return false; 538 return false;
535 539
540 if (test_opt(sbi, LFS))
541 return false;
542
536 if (policy & (0x1 << F2FS_IPU_FORCE)) 543 if (policy & (0x1 << F2FS_IPU_FORCE))
537 return true; 544 return true;
538 if (policy & (0x1 << F2FS_IPU_SSR) && need_SSR(sbi)) 545 if (policy & (0x1 << F2FS_IPU_SSR) && need_SSR(sbi))