#include <linux/module.h>
#include <linux/pagemap.h>
#include <linux/magic.h>
#include <linux/iomap.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/blkdev.h>
#include <linux/statfs.h>
#include <linux/writeback.h>
#include <linux/quotaops.h>
#include <linux/seq_file.h>
#include <linux/uio.h>
#include <linux/mman.h>
#include <linux/sched/mm.h>
#include <linux/crc32.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/fs_parser.h>
#include <linux/fs_context.h>
#include "zonefs.h"
#define CREATE_TRACE_POINTS
#include "trace.h"
static const char *zonefs_zgroup_name(enum zonefs_ztype ztype)
{ … }
static void zonefs_account_active(struct super_block *sb,
struct zonefs_zone *z)
{ … }
void zonefs_inode_account_active(struct inode *inode)
{ … }
static int zonefs_zone_mgmt(struct super_block *sb,
struct zonefs_zone *z, enum req_op op)
{ … }
int zonefs_inode_zone_mgmt(struct inode *inode, enum req_op op)
{ … }
void zonefs_i_size_write(struct inode *inode, loff_t isize)
{ … }
void zonefs_update_stats(struct inode *inode, loff_t new_isize)
{ … }
static loff_t zonefs_check_zone_condition(struct super_block *sb,
struct zonefs_zone *z,
struct blk_zone *zone)
{ … }
static void zonefs_inode_update_mode(struct inode *inode)
{ … }
static int zonefs_io_error_cb(struct blk_zone *zone, unsigned int idx,
void *data)
{ … }
static void zonefs_handle_io_error(struct inode *inode, struct blk_zone *zone,
bool write)
{ … }
void __zonefs_io_error(struct inode *inode, bool write)
{ … }
static struct kmem_cache *zonefs_inode_cachep;
static struct inode *zonefs_alloc_inode(struct super_block *sb)
{ … }
static void zonefs_free_inode(struct inode *inode)
{ … }
static int zonefs_statfs(struct dentry *dentry, struct kstatfs *buf)
{ … }
enum { … };
struct zonefs_context { … };
static const struct constant_table zonefs_param_errors[] = …;
static const struct fs_parameter_spec zonefs_param_spec[] = …;
static int zonefs_parse_param(struct fs_context *fc, struct fs_parameter *param)
{ … }
static int zonefs_show_options(struct seq_file *seq, struct dentry *root)
{ … }
static int zonefs_inode_setattr(struct mnt_idmap *idmap,
struct dentry *dentry, struct iattr *iattr)
{ … }
static const struct inode_operations zonefs_file_inode_operations = …;
static long zonefs_fname_to_fno(const struct qstr *fname)
{ … }
static struct inode *zonefs_get_file_inode(struct inode *dir,
struct dentry *dentry)
{ … }
static struct inode *zonefs_get_zgroup_inode(struct super_block *sb,
enum zonefs_ztype ztype)
{ … }
static struct inode *zonefs_get_dir_inode(struct inode *dir,
struct dentry *dentry)
{ … }
static struct dentry *zonefs_lookup(struct inode *dir, struct dentry *dentry,
unsigned int flags)
{ … }
static int zonefs_readdir_root(struct file *file, struct dir_context *ctx)
{ … }
static int zonefs_readdir_zgroup(struct file *file,
struct dir_context *ctx)
{ … }
static int zonefs_readdir(struct file *file, struct dir_context *ctx)
{ … }
const struct inode_operations zonefs_dir_inode_operations = …;
const struct file_operations zonefs_dir_operations = …;
struct zonefs_zone_data { … };
static int zonefs_get_zone_info_cb(struct blk_zone *zone, unsigned int idx,
void *data)
{ … }
static int zonefs_get_zone_info(struct zonefs_zone_data *zd)
{ … }
static inline void zonefs_free_zone_info(struct zonefs_zone_data *zd)
{ … }
static int zonefs_init_zgroup(struct super_block *sb,
struct zonefs_zone_data *zd,
enum zonefs_ztype ztype)
{ … }
static void zonefs_free_zgroups(struct super_block *sb)
{ … }
static int zonefs_init_zgroups(struct super_block *sb)
{ … }
static int zonefs_read_super(struct super_block *sb)
{ … }
static const struct super_operations zonefs_sops = …;
static int zonefs_get_zgroup_inodes(struct super_block *sb)
{ … }
static void zonefs_release_zgroup_inodes(struct super_block *sb)
{ … }
static int zonefs_fill_super(struct super_block *sb, struct fs_context *fc)
{ … }
static void zonefs_kill_super(struct super_block *sb)
{ … }
static void zonefs_free_fc(struct fs_context *fc)
{ … }
static int zonefs_get_tree(struct fs_context *fc)
{ … }
static int zonefs_reconfigure(struct fs_context *fc)
{ … }
static const struct fs_context_operations zonefs_context_ops = …;
static int zonefs_init_fs_context(struct fs_context *fc)
{ … }
static struct file_system_type zonefs_type = …;
static int __init zonefs_init_inodecache(void)
{ … }
static void zonefs_destroy_inodecache(void)
{ … }
static int __init zonefs_init(void)
{ … }
static void __exit zonefs_exit(void)
{ … }
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS_FS(…) …;
module_init(…) …;
module_exit(zonefs_exit);