diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-11-06 20:23:08 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-11-10 09:51:38 -0500 |
commit | 510184c89f21f40634e1585790714be060cd49c5 (patch) | |
tree | d339f95ef6bceda4f6ee2fb1b6c16ac3c00ecee9 /fs/f2fs/segment.h | |
parent | 2f97c326bf05ca2feeb95688da50c68671638b69 (diff) |
f2fs: do not skip any writes under memory pressure
Under memory pressure, let's avoid skipping data writes.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
-rw-r--r-- | fs/f2fs/segment.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index 6723ccc17585..7f327c0ba4e3 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h | |||
@@ -711,6 +711,9 @@ static inline unsigned int max_hw_blocks(struct f2fs_sb_info *sbi) | |||
711 | */ | 711 | */ |
712 | static inline int nr_pages_to_skip(struct f2fs_sb_info *sbi, int type) | 712 | static inline int nr_pages_to_skip(struct f2fs_sb_info *sbi, int type) |
713 | { | 713 | { |
714 | if (sbi->sb->s_bdi->dirty_exceeded) | ||
715 | return 0; | ||
716 | |||
714 | if (type == DATA) | 717 | if (type == DATA) |
715 | return sbi->blocks_per_seg; | 718 | return sbi->blocks_per_seg; |
716 | else if (type == NODE) | 719 | else if (type == NODE) |