linux/fs/f2fs/gc.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * fs/f2fs/gc.h
 *
 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
 *             http://www.samsung.com/
 */
#define GC_THREAD_MIN_WB_PAGES
#define DEF_GC_THREAD_URGENT_SLEEP_TIME
#define DEF_GC_THREAD_MIN_SLEEP_TIME
#define DEF_GC_THREAD_MAX_SLEEP_TIME
#define DEF_GC_THREAD_NOGC_SLEEP_TIME

/* choose candidates from sections which has age of more than 7 days */
#define DEF_GC_THREAD_AGE_THRESHOLD
#define DEF_GC_THREAD_CANDIDATE_RATIO
#define DEF_GC_THREAD_MAX_CANDIDATE_COUNT
#define DEF_GC_THREAD_AGE_WEIGHT
#define DEFAULT_ACCURACY_CLASS

#define LIMIT_INVALID_BLOCK
#define LIMIT_FREE_BLOCK

#define DEF_GC_FAILED_PINNED_FILES
#define MAX_GC_FAILED_PINNED_FILES

/* Search max. number of dirty segments to select a victim segment */
#define DEF_MAX_VICTIM_SEARCH

#define NR_GC_CHECKPOINT_SECS

struct f2fs_gc_kthread {};

struct gc_inode_list {};

struct victim_entry {};

/*
 * inline functions
 */

/*
 * On a Zoned device zone-capacity can be less than zone-size and if
 * zone-capacity is not aligned to f2fs segment size(2MB), then the segment
 * starting just before zone-capacity has some blocks spanning across the
 * zone-capacity, these blocks are not usable.
 * Such spanning segments can be in free list so calculate the sum of usable
 * blocks in currently free segments including normal and spanning segments.
 */
static inline block_t free_segs_blk_count_zoned(struct f2fs_sb_info *sbi)
{}

static inline block_t free_segs_blk_count(struct f2fs_sb_info *sbi)
{}

static inline block_t free_user_blocks(struct f2fs_sb_info *sbi)
{}

static inline block_t limit_invalid_user_blocks(block_t user_block_count)
{}

static inline block_t limit_free_user_blocks(block_t reclaimable_user_blocks)
{}

static inline void increase_sleep_time(struct f2fs_gc_kthread *gc_th,
							unsigned int *wait)
{}

static inline void decrease_sleep_time(struct f2fs_gc_kthread *gc_th,
							unsigned int *wait)
{}

static inline bool has_enough_invalid_blocks(struct f2fs_sb_info *sbi)
{}