linux/fs/ext2/super.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  linux/fs/ext2/super.c
 *
 * Copyright (C) 1992, 1993, 1994, 1995
 * Remy Card ([email protected])
 * Laboratoire MASI - Institut Blaise Pascal
 * Universite Pierre et Marie Curie (Paris VI)
 *
 *  from
 *
 *  linux/fs/minix/inode.c
 *
 *  Copyright (C) 1991, 1992  Linus Torvalds
 *
 *  Big-endian to little-endian byte-swapping/bitmaps by
 *        David S. Miller ([email protected]), 1995
 */

#include <linux/module.h>
#include <linux/string.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/blkdev.h>
#include <linux/parser.h>
#include <linux/random.h>
#include <linux/buffer_head.h>
#include <linux/exportfs.h>
#include <linux/vfs.h>
#include <linux/seq_file.h>
#include <linux/mount.h>
#include <linux/log2.h>
#include <linux/quotaops.h>
#include <linux/uaccess.h>
#include <linux/dax.h>
#include <linux/iversion.h>
#include "ext2.h"
#include "xattr.h"
#include "acl.h"

static void ext2_write_super(struct super_block *sb);
static int ext2_remount (struct super_block * sb, int * flags, char * data);
static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf);
static int ext2_sync_fs(struct super_block *sb, int wait);
static int ext2_freeze(struct super_block *sb);
static int ext2_unfreeze(struct super_block *sb);

void ext2_error(struct super_block *sb, const char *function,
		const char *fmt, ...)
{}

void ext2_msg(struct super_block *sb, const char *prefix,
		const char *fmt, ...)
{}

/*
 * This must be called with sbi->s_lock held.
 */
void ext2_update_dynamic_rev(struct super_block *sb)
{}

#ifdef CONFIG_QUOTA
static int ext2_quota_off(struct super_block *sb, int type);

static void ext2_quota_off_umount(struct super_block *sb)
{}
#else
static inline void ext2_quota_off_umount(struct super_block *sb)
{
}
#endif

static void ext2_put_super (struct super_block * sb)
{}

static struct kmem_cache * ext2_inode_cachep;

static struct inode *ext2_alloc_inode(struct super_block *sb)
{}

static void ext2_free_in_core_inode(struct inode *inode)
{}

static void init_once(void *foo)
{}

static int __init init_inodecache(void)
{}

static void destroy_inodecache(void)
{}

static int ext2_show_options(struct seq_file *seq, struct dentry *root)
{}

#ifdef CONFIG_QUOTA
static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data, size_t len, loff_t off);
static ssize_t ext2_quota_write(struct super_block *sb, int type, const char *data, size_t len, loff_t off);
static int ext2_quota_on(struct super_block *sb, int type, int format_id,
			 const struct path *path);
static struct dquot __rcu **ext2_get_dquots(struct inode *inode)
{}

static const struct quotactl_ops ext2_quotactl_ops =;
#endif

static const struct super_operations ext2_sops =;

static struct inode *ext2_nfs_get_inode(struct super_block *sb,
		u64 ino, u32 generation)
{}

static struct dentry *ext2_fh_to_dentry(struct super_block *sb, struct fid *fid,
		int fh_len, int fh_type)
{}

static struct dentry *ext2_fh_to_parent(struct super_block *sb, struct fid *fid,
		int fh_len, int fh_type)
{}

static const struct export_operations ext2_export_ops =;

static unsigned long get_sb_block(void **data)
{}

enum {};

static const match_table_t tokens =;

static int parse_options(char *options, struct super_block *sb,
			 struct ext2_mount_options *opts)
{}

static int ext2_setup_super (struct super_block * sb,
			      struct ext2_super_block * es,
			      int read_only)
{}

static int ext2_check_descriptors(struct super_block *sb)
{}

/*
 * Maximal file size.  There is a direct, and {,double-,triple-}indirect
 * block limit, and also a limit of (2^32 - 1) 512-byte sectors in i_blocks.
 * We need to be 1 filesystem block less than the 2^32 sector limit.
 */
static loff_t ext2_max_size(int bits)
{}

static unsigned long descriptor_loc(struct super_block *sb,
				    unsigned long logic_sb_block,
				    int nr)
{}

static int ext2_fill_super(struct super_block *sb, void *data, int silent)
{}

static void ext2_clear_super_error(struct super_block *sb)
{}

void ext2_sync_super(struct super_block *sb, struct ext2_super_block *es,
		     int wait)
{}

/*
 * In the second extended file system, it is not necessary to
 * write the super block since we use a mapping of the
 * disk super block in a buffer.
 *
 * However, this function is still used to set the fs valid
 * flags to 0.  We need to set this flag to 0 since the fs
 * may have been checked while mounted and e2fsck may have
 * set s_state to EXT2_VALID_FS after some corrections.
 */
static int ext2_sync_fs(struct super_block *sb, int wait)
{}

static int ext2_freeze(struct super_block *sb)
{}

static int ext2_unfreeze(struct super_block *sb)
{}

static void ext2_write_super(struct super_block *sb)
{}

static int ext2_remount (struct super_block * sb, int * flags, char * data)
{}

static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
{}

static struct dentry *ext2_mount(struct file_system_type *fs_type,
	int flags, const char *dev_name, void *data)
{}

#ifdef CONFIG_QUOTA

/* Read data from quotafile - avoid pagecache and such because we cannot afford
 * acquiring the locks... As quota files are never truncated and quota code
 * itself serializes the operations (and no one else should touch the files)
 * we don't have to be afraid of races */
static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data,
			       size_t len, loff_t off)
{}

/* Write to quotafile */
static ssize_t ext2_quota_write(struct super_block *sb, int type,
				const char *data, size_t len, loff_t off)
{}

static int ext2_quota_on(struct super_block *sb, int type, int format_id,
			 const struct path *path)
{}

static int ext2_quota_off(struct super_block *sb, int type)
{}

#endif

static struct file_system_type ext2_fs_type =;
MODULE_ALIAS_FS();

static int __init init_ext2_fs(void)
{}

static void __exit exit_ext2_fs(void)
{}

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
module_init()
module_exit()