#include <linux/module.h>
#include <linux/pagemap.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/parser.h>
#include <linux/uio.h>
#include <linux/mman.h>
#include <linux/sched/mm.h>
#include <linux/task_io_accounting_ops.h>
#include "zonefs.h"
#include "trace.h"
static int zonefs_read_iomap_begin(struct inode *inode, loff_t offset,
loff_t length, unsigned int flags,
struct iomap *iomap, struct iomap *srcmap)
{ … }
static const struct iomap_ops zonefs_read_iomap_ops = …;
static int zonefs_write_iomap_begin(struct inode *inode, loff_t offset,
loff_t length, unsigned int flags,
struct iomap *iomap, struct iomap *srcmap)
{ … }
static const struct iomap_ops zonefs_write_iomap_ops = …;
static int zonefs_read_folio(struct file *unused, struct folio *folio)
{ … }
static void zonefs_readahead(struct readahead_control *rac)
{ … }
static int zonefs_write_map_blocks(struct iomap_writepage_ctx *wpc,
struct inode *inode, loff_t offset,
unsigned int len)
{ … }
static const struct iomap_writeback_ops zonefs_writeback_ops = …;
static int zonefs_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{ … }
static int zonefs_swap_activate(struct swap_info_struct *sis,
struct file *swap_file, sector_t *span)
{ … }
const struct address_space_operations zonefs_file_aops = …;
int zonefs_file_truncate(struct inode *inode, loff_t isize)
{ … }
static int zonefs_file_fsync(struct file *file, loff_t start, loff_t end,
int datasync)
{ … }
static vm_fault_t zonefs_filemap_page_mkwrite(struct vm_fault *vmf)
{ … }
static const struct vm_operations_struct zonefs_file_vm_ops = …;
static int zonefs_file_mmap(struct file *file, struct vm_area_struct *vma)
{ … }
static loff_t zonefs_file_llseek(struct file *file, loff_t offset, int whence)
{ … }
static int zonefs_file_write_dio_end_io(struct kiocb *iocb, ssize_t size,
int error, unsigned int flags)
{ … }
static const struct iomap_dio_ops zonefs_write_dio_ops = …;
static loff_t zonefs_write_check_limits(struct file *file, loff_t pos,
loff_t count)
{ … }
static ssize_t zonefs_write_checks(struct kiocb *iocb, struct iov_iter *from)
{ … }
static ssize_t zonefs_file_dio_write(struct kiocb *iocb, struct iov_iter *from)
{ … }
static ssize_t zonefs_file_buffered_write(struct kiocb *iocb,
struct iov_iter *from)
{ … }
static ssize_t zonefs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
{ … }
static int zonefs_file_read_dio_end_io(struct kiocb *iocb, ssize_t size,
int error, unsigned int flags)
{ … }
static const struct iomap_dio_ops zonefs_read_dio_ops = …;
static ssize_t zonefs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
{ … }
static ssize_t zonefs_file_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len, unsigned int flags)
{ … }
static inline bool zonefs_seq_file_need_wro(struct inode *inode,
struct file *file)
{ … }
static int zonefs_seq_file_write_open(struct inode *inode)
{ … }
static int zonefs_file_open(struct inode *inode, struct file *file)
{ … }
static void zonefs_seq_file_write_close(struct inode *inode)
{ … }
static int zonefs_file_release(struct inode *inode, struct file *file)
{ … }
const struct file_operations zonefs_file_operations = …;