segment.c (3cb88bc15937990177df1f7eac6f22ebbed19312) segment.c (9bf1dcbdfdc8892d9cfeaeab02519c0ecf17fe51)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * fs/f2fs/segment.c
4 *
5 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
6 * http://www.samsung.com/
7 */
8#include <linux/fs.h>

--- 421 unchanged lines hidden (view full) ---

430 struct f2fs_gc_control gc_control = {
431 .victim_segno = NULL_SEGNO,
432 .init_gc_type = BG_GC,
433 .no_bg_gc = true,
434 .should_migrate_blocks = false,
435 .err_gc_skipped = false,
436 .nr_free_secs = 1 };
437 f2fs_down_write(&sbi->gc_lock);
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * fs/f2fs/segment.c
4 *
5 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
6 * http://www.samsung.com/
7 */
8#include <linux/fs.h>

--- 421 unchanged lines hidden (view full) ---

430 struct f2fs_gc_control gc_control = {
431 .victim_segno = NULL_SEGNO,
432 .init_gc_type = BG_GC,
433 .no_bg_gc = true,
434 .should_migrate_blocks = false,
435 .err_gc_skipped = false,
436 .nr_free_secs = 1 };
437 f2fs_down_write(&sbi->gc_lock);
438 stat_inc_gc_call_count(sbi, FOREGROUND);
438 f2fs_gc(sbi, &gc_control);
439 }
440}
441
442static inline bool excess_dirty_threshold(struct f2fs_sb_info *sbi)
443{
444 int factor = f2fs_rwsem_is_locked(&sbi->cp_rwsem) ? 3 : 2;
445 unsigned int dents = get_pages(sbi, F2FS_DIRTY_DENTS);

--- 4998 unchanged lines hidden ---
439 f2fs_gc(sbi, &gc_control);
440 }
441}
442
443static inline bool excess_dirty_threshold(struct f2fs_sb_info *sbi)
444{
445 int factor = f2fs_rwsem_is_locked(&sbi->cp_rwsem) ? 3 : 2;
446 unsigned int dents = get_pages(sbi, F2FS_DIRTY_DENTS);

--- 4998 unchanged lines hidden ---