Skip to content

Commit

Permalink
f2fs: always assume that the device is idle under gc_urgent
Browse files Browse the repository at this point in the history
This allows more aggressive discards and balancing job to be done
under gc_urgent.

Signed-off-by: Park Ju Hyung <[email protected]>
Signed-off-by: Albert I <[email protected]>
  • Loading branch information
arter97 authored and krasCGQ committed May 17, 2019
1 parent 481ad40 commit b7c7212
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/f2fs/f2fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2279,6 +2279,9 @@ static inline struct bio *f2fs_bio_alloc(struct f2fs_sb_info *sbi,

static inline bool is_idle(struct f2fs_sb_info *sbi, int type)
{
if (unlikely(sbi->gc_mode == GC_URGENT))
return true;

if (get_pages(sbi, F2FS_RD_DATA) || get_pages(sbi, F2FS_RD_NODE) ||
get_pages(sbi, F2FS_RD_META) || get_pages(sbi, F2FS_WB_DATA) ||
get_pages(sbi, F2FS_WB_CP_DATA))
Expand Down

0 comments on commit b7c7212

Please sign in to comment.