#include "internal.h"
struct z_erofs_gbuf { … };
static struct z_erofs_gbuf *z_erofs_gbufpool, *z_erofs_rsvbuf;
static unsigned int z_erofs_gbuf_count, z_erofs_gbuf_nrpages,
z_erofs_rsv_nrpages;
module_param_named(global_buffers, z_erofs_gbuf_count, uint, 0444);
module_param_named(reserved_pages, z_erofs_rsv_nrpages, uint, 0444);
static atomic_long_t erofs_global_shrink_cnt;
static unsigned int shrinker_run_no;
static DEFINE_SPINLOCK(erofs_sb_list_lock);
static LIST_HEAD(erofs_sb_list);
static struct shrinker *erofs_shrinker_info;
static unsigned int z_erofs_gbuf_id(void)
{ … }
void *z_erofs_get_gbuf(unsigned int requiredpages)
__acquires(gbuf->lock)
{ … }
void z_erofs_put_gbuf(void *ptr) __releases(gbuf->lock)
{ … }
int z_erofs_gbuf_growsize(unsigned int nrpages)
{ … }
int __init z_erofs_gbuf_init(void)
{ … }
void z_erofs_gbuf_exit(void)
{ … }
struct page *__erofs_allocpage(struct page **pagepool, gfp_t gfp, bool tryrsv)
{ … }
void erofs_release_pages(struct page **pagepool)
{ … }
static bool erofs_workgroup_get(struct erofs_workgroup *grp)
{ … }
struct erofs_workgroup *erofs_find_workgroup(struct super_block *sb,
pgoff_t index)
{ … }
struct erofs_workgroup *erofs_insert_workgroup(struct super_block *sb,
struct erofs_workgroup *grp)
{ … }
static void __erofs_workgroup_free(struct erofs_workgroup *grp)
{ … }
void erofs_workgroup_put(struct erofs_workgroup *grp)
{ … }
static bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi,
struct erofs_workgroup *grp)
{ … }
static unsigned long erofs_shrink_workstation(struct erofs_sb_info *sbi,
unsigned long nr_shrink)
{ … }
void erofs_shrinker_register(struct super_block *sb)
{ … }
void erofs_shrinker_unregister(struct super_block *sb)
{ … }
static unsigned long erofs_shrink_count(struct shrinker *shrink,
struct shrink_control *sc)
{ … }
static unsigned long erofs_shrink_scan(struct shrinker *shrink,
struct shrink_control *sc)
{ … }
int __init erofs_init_shrinker(void)
{ … }
void erofs_exit_shrinker(void)
{ … }