linux/fs/ext4/page-io.c

// SPDX-License-Identifier: GPL-2.0
/*
 * linux/fs/ext4/page-io.c
 *
 * This contains the new page_io functions for ext4
 *
 * Written by Theodore Ts'o, 2010.
 */

#include <linux/fs.h>
#include <linux/time.h>
#include <linux/highuid.h>
#include <linux/pagemap.h>
#include <linux/quotaops.h>
#include <linux/string.h>
#include <linux/buffer_head.h>
#include <linux/writeback.h>
#include <linux/pagevec.h>
#include <linux/mpage.h>
#include <linux/namei.h>
#include <linux/uio.h>
#include <linux/bio.h>
#include <linux/workqueue.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/sched/mm.h>

#include "ext4_jbd2.h"
#include "xattr.h"
#include "acl.h"

static struct kmem_cache *io_end_cachep;
static struct kmem_cache *io_end_vec_cachep;

int __init ext4_init_pageio(void)
{}

void ext4_exit_pageio(void)
{}

struct ext4_io_end_vec *ext4_alloc_io_end_vec(ext4_io_end_t *io_end)
{}

static void ext4_free_io_end_vec(ext4_io_end_t *io_end)
{}

struct ext4_io_end_vec *ext4_last_io_end_vec(ext4_io_end_t *io_end)
{}

/*
 * Print an buffer I/O error compatible with the fs/buffer.c.  This
 * provides compatibility with dmesg scrapers that look for a specific
 * buffer I/O error message.  We really need a unified error reporting
 * structure to userspace ala Digital Unix's uerf system, but it's
 * probably not going to happen in my lifetime, due to LKML politics...
 */
static void buffer_io_error(struct buffer_head *bh)
{}

static void ext4_finish_bio(struct bio *bio)
{}

static void ext4_release_io_end(ext4_io_end_t *io_end)
{}

/*
 * Check a range of space and convert unwritten extents to written. Note that
 * we are protected from truncate touching same part of extent tree by the
 * fact that truncate code waits for all DIO to finish (thus exclusion from
 * direct IO is achieved) and also waits for PageWriteback bits. Thus we
 * cannot get to ext4_ext_truncate() before all IOs overlapping that range are
 * completed (happens from ext4_free_ioend()).
 */
static int ext4_end_io_end(ext4_io_end_t *io_end)
{}

static void dump_completed_IO(struct inode *inode, struct list_head *head)
{}

/* Add the io_end to per-inode completed end_io list. */
static void ext4_add_complete_io(ext4_io_end_t *io_end)
{}

static int ext4_do_flush_completed_IO(struct inode *inode,
				      struct list_head *head)
{}

/*
 * work on completed IO, to convert unwritten extents to extents
 */
void ext4_end_io_rsv_work(struct work_struct *work)
{}

ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags)
{}

void ext4_put_io_end_defer(ext4_io_end_t *io_end)
{}

int ext4_put_io_end(ext4_io_end_t *io_end)
{}

ext4_io_end_t *ext4_get_io_end(ext4_io_end_t *io_end)
{}

/* BIO completion function for page writeback */
static void ext4_end_bio(struct bio *bio)
{}

void ext4_io_submit(struct ext4_io_submit *io)
{}

void ext4_io_submit_init(struct ext4_io_submit *io,
			 struct writeback_control *wbc)
{}

static void io_submit_init_bio(struct ext4_io_submit *io,
			       struct buffer_head *bh)
{}

static void io_submit_add_bh(struct ext4_io_submit *io,
			     struct inode *inode,
			     struct folio *folio,
			     struct folio *io_folio,
			     struct buffer_head *bh)
{}

int ext4_bio_write_folio(struct ext4_io_submit *io, struct folio *folio,
		size_t len)
{}