linux/fs/isofs/inode.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  linux/fs/isofs/inode.c
 *
 *  (C) 1991  Linus Torvalds - minix filesystem
 *      1992, 1993, 1994  Eric Youngdale Modified for ISO 9660 filesystem.
 *      1994  Eberhard Mönkeberg - multi session handling.
 *      1995  Mark Dobie - allow mounting of some weird VideoCDs and PhotoCDs.
 *	1997  Gordon Chaffee - Joliet CDs
 *	1998  Eric Lammerts - ISO 9660 Level 3
 *	2004  Paul Serice - Inode Support pushed out from 4GB to 128GB
 *	2004  Paul Serice - NFS Export Operations
 */

#include <linux/init.h>
#include <linux/module.h>

#include <linux/slab.h>
#include <linux/cred.h>
#include <linux/nls.h>
#include <linux/ctype.h>
#include <linux/statfs.h>
#include <linux/cdrom.h>
#include <linux/mpage.h>
#include <linux/user_namespace.h>
#include <linux/seq_file.h>
#include <linux/blkdev.h>
#include <linux/fs_context.h>
#include <linux/fs_parser.h>

#include "isofs.h"
#include "zisofs.h"

/* max tz offset is 13 hours */
#define MAX_TZ_OFFSET

#define BEQUIET

static int isofs_hashi(const struct dentry *parent, struct qstr *qstr);
static int isofs_dentry_cmpi(const struct dentry *dentry,
		unsigned int len, const char *str, const struct qstr *name);

#ifdef CONFIG_JOLIET
static int isofs_hashi_ms(const struct dentry *parent, struct qstr *qstr);
static int isofs_hash_ms(const struct dentry *parent, struct qstr *qstr);
static int isofs_dentry_cmpi_ms(const struct dentry *dentry,
		unsigned int len, const char *str, const struct qstr *name);
static int isofs_dentry_cmp_ms(const struct dentry *dentry,
		unsigned int len, const char *str, const struct qstr *name);
#endif

static void isofs_put_super(struct super_block *sb)
{}

static int isofs_read_inode(struct inode *, int relocated);
static int isofs_statfs (struct dentry *, struct kstatfs *);
static int isofs_show_options(struct seq_file *, struct dentry *);

static struct kmem_cache *isofs_inode_cachep;

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

static void isofs_free_inode(struct inode *inode)
{}

static void init_once(void *foo)
{}

static int __init init_inodecache(void)
{}

static void destroy_inodecache(void)
{}

static int isofs_reconfigure(struct fs_context *fc)
{}

static const struct super_operations isofs_sops =;


static const struct dentry_operations isofs_dentry_ops[] =;

struct isofs_options{};

/*
 * Compute the hash for the isofs name corresponding to the dentry.
 */
static int
isofs_hashi_common(const struct dentry *dentry, struct qstr *qstr, int ms)
{}

/*
 * Compare of two isofs names.
 */
static int isofs_dentry_cmp_common(
		unsigned int len, const char *str,
		const struct qstr *name, int ms, int ci)
{}

static int
isofs_hashi(const struct dentry *dentry, struct qstr *qstr)
{}

static int
isofs_dentry_cmpi(const struct dentry *dentry,
		unsigned int len, const char *str, const struct qstr *name)
{}

#ifdef CONFIG_JOLIET
/*
 * Compute the hash for the isofs name corresponding to the dentry.
 */
static int
isofs_hash_common(const struct dentry *dentry, struct qstr *qstr, int ms)
{}

static int
isofs_hash_ms(const struct dentry *dentry, struct qstr *qstr)
{}

static int
isofs_hashi_ms(const struct dentry *dentry, struct qstr *qstr)
{}

static int
isofs_dentry_cmp_ms(const struct dentry *dentry,
		unsigned int len, const char *str, const struct qstr *name)
{}

static int
isofs_dentry_cmpi_ms(const struct dentry *dentry,
		unsigned int len, const char *str, const struct qstr *name)
{}
#endif

enum {};

static const struct constant_table isofs_param_map[] =;

static const struct constant_table isofs_param_check[] =;

static const struct fs_parameter_spec isofs_param_spec[] =;

static int isofs_parse_param(struct fs_context *fc,
			       struct fs_parameter *param)
{}

/*
 * Display the mount options in /proc/mounts.
 */
static int isofs_show_options(struct seq_file *m, struct dentry *root)
{}

/*
 * look if the driver can tell the multi session redirection value
 *
 * don't change this if you don't know what you do, please!
 * Multisession is legal only with XA disks.
 * A non-XA disk with more than one volume descriptor may do it right, but
 * usually is written in a nowhere standardized "multi-partition" manner.
 * Multisession uses absolute addressing (solely the first frame of the whole
 * track is #0), multi-partition uses relative addressing (each first frame of
 * each track is #0), and a track is not a session.
 *
 * A broken CDwriter software or drive firmware does not set new standards,
 * at least not if conflicting with the existing ones.
 *
 * [email protected]
 */
#define WE_OBEY_THE_WRITTEN_STANDARDS

static unsigned int isofs_get_last_session(struct super_block *sb, s32 session)
{}

/*
 * Check if root directory is empty (has less than 3 files).
 *
 * Used to detect broken CDs where ISO root directory is empty but Joliet root
 * directory is OK. If such CD has Rock Ridge extensions, they will be disabled
 * (and Joliet used instead) or else no files would be visible.
 */
static bool rootdir_empty(struct super_block *sb, unsigned long block)
{}

/*
 * Initialize the superblock and read the root inode.
 */
static int isofs_fill_super(struct super_block *s, struct fs_context *fc)
{}

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

/*
 * Get a set of blocks; filling in buffer_heads if already allocated
 * or getblk() if they are not.  Returns the number of blocks inserted
 * (-ve == error.)
 */
int isofs_get_blocks(struct inode *inode, sector_t iblock,
		     struct buffer_head **bh, unsigned long nblocks)
{}

/*
 * Used by the standard interfaces.
 */
static int isofs_get_block(struct inode *inode, sector_t iblock,
		    struct buffer_head *bh_result, int create)
{}

static int isofs_bmap(struct inode *inode, sector_t block)
{}

struct buffer_head *isofs_bread(struct inode *inode, sector_t block)
{}

static int isofs_read_folio(struct file *file, struct folio *folio)
{}

static void isofs_readahead(struct readahead_control *rac)
{}

static sector_t _isofs_bmap(struct address_space *mapping, sector_t block)
{}

static const struct address_space_operations isofs_aops =;

static int isofs_read_level3_size(struct inode *inode)
{}

static int isofs_read_inode(struct inode *inode, int relocated)
{}

struct isofs_iget5_callback_data {};

static int isofs_iget5_test(struct inode *ino, void *data)
{}

static int isofs_iget5_set(struct inode *ino, void *data)
{}

/* Store, in the inode's containing structure, the block and block
 * offset that point to the underlying meta-data for the inode.  The
 * code below is otherwise similar to the iget() code in
 * include/linux/fs.h */
struct inode *__isofs_iget(struct super_block *sb,
			   unsigned long block,
			   unsigned long offset,
			   int relocated)
{}

static int isofs_get_tree(struct fs_context *fc)
{}

static void isofs_free_fc(struct fs_context *fc)
{}

static const struct fs_context_operations isofs_context_ops =;

static int isofs_init_fs_context(struct fs_context *fc)
{}

static struct file_system_type iso9660_fs_type =;
MODULE_ALIAS_FS();
MODULE_ALIAS();

static int __init init_iso9660_fs(void)
{}

static void __exit exit_iso9660_fs(void)
{}

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