#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/stat.h>
#include <linux/nls.h>
#include <linux/buffer_head.h>
#include <linux/vfs.h>
#include <linux/parser.h>
#include <linux/namei.h>
#include <linux/sched.h>
#include <linux/cred.h>
#include <linux/exportfs.h>
#include <linux/seq_file.h>
#include <linux/blkdev.h>
#include "befs.h"
#include "btree.h"
#include "inode.h"
#include "datastream.h"
#include "super.h"
#include "io.h"
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
#define VFS_BLOCK_SIZE …
static int befs_readdir(struct file *, struct dir_context *);
static int befs_get_block(struct inode *, sector_t, struct buffer_head *, int);
static int befs_read_folio(struct file *file, struct folio *folio);
static sector_t befs_bmap(struct address_space *mapping, sector_t block);
static struct dentry *befs_lookup(struct inode *, struct dentry *,
unsigned int);
static struct inode *befs_iget(struct super_block *, unsigned long);
static struct inode *befs_alloc_inode(struct super_block *sb);
static void befs_free_inode(struct inode *inode);
static void befs_destroy_inodecache(void);
static int befs_symlink_read_folio(struct file *, struct folio *);
static int befs_utf2nls(struct super_block *sb, const char *in, int in_len,
char **out, int *out_len);
static int befs_nls2utf(struct super_block *sb, const char *in, int in_len,
char **out, int *out_len);
static void befs_put_super(struct super_block *);
static int befs_remount(struct super_block *, int *, char *);
static int befs_statfs(struct dentry *, struct kstatfs *);
static int befs_show_options(struct seq_file *, struct dentry *);
static int parse_options(char *, struct befs_mount_options *);
static struct dentry *befs_fh_to_dentry(struct super_block *sb,
struct fid *fid, int fh_len, int fh_type);
static struct dentry *befs_fh_to_parent(struct super_block *sb,
struct fid *fid, int fh_len, int fh_type);
static struct dentry *befs_get_parent(struct dentry *child);
static const struct super_operations befs_sops = …;
static struct kmem_cache *befs_inode_cachep;
static const struct file_operations befs_dir_operations = …;
static const struct inode_operations befs_dir_inode_operations = …;
static const struct address_space_operations befs_aops = …;
static const struct address_space_operations befs_symlink_aops = …;
static const struct export_operations befs_export_operations = …;
static int befs_read_folio(struct file *file, struct folio *folio)
{ … }
static sector_t
befs_bmap(struct address_space *mapping, sector_t block)
{ … }
static int
befs_get_block(struct inode *inode, sector_t block,
struct buffer_head *bh_result, int create)
{ … }
static struct dentry *
befs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
{ … }
static int
befs_readdir(struct file *file, struct dir_context *ctx)
{ … }
static struct inode *
befs_alloc_inode(struct super_block *sb)
{ … }
static void befs_free_inode(struct inode *inode)
{ … }
static void init_once(void *foo)
{ … }
static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
{ … }
static int __init
befs_init_inodecache(void)
{ … }
static void
befs_destroy_inodecache(void)
{ … }
static int befs_symlink_read_folio(struct file *unused, struct folio *folio)
{ … }
static int
befs_utf2nls(struct super_block *sb, const char *in,
int in_len, char **out, int *out_len)
{ … }
static int
befs_nls2utf(struct super_block *sb, const char *in,
int in_len, char **out, int *out_len)
{ … }
static struct inode *befs_nfs_get_inode(struct super_block *sb, uint64_t ino,
uint32_t generation)
{ … }
static struct dentry *befs_fh_to_dentry(struct super_block *sb,
struct fid *fid, int fh_len, int fh_type)
{ … }
static struct dentry *befs_fh_to_parent(struct super_block *sb,
struct fid *fid, int fh_len, int fh_type)
{ … }
static struct dentry *befs_get_parent(struct dentry *child)
{ … }
enum { … };
static const match_table_t befs_tokens = …;
static int
parse_options(char *options, struct befs_mount_options *opts)
{ … }
static int befs_show_options(struct seq_file *m, struct dentry *root)
{ … }
static void
befs_put_super(struct super_block *sb)
{ … }
static int
befs_fill_super(struct super_block *sb, void *data, int silent)
{ … }
static int
befs_remount(struct super_block *sb, int *flags, char *data)
{ … }
static int
befs_statfs(struct dentry *dentry, struct kstatfs *buf)
{ … }
static struct dentry *
befs_mount(struct file_system_type *fs_type, int flags, const char *dev_name,
void *data)
{ … }
static struct file_system_type befs_fs_type = …;
MODULE_ALIAS_FS(…) …;
static int __init
init_befs_fs(void)
{ … }
static void __exit
exit_befs_fs(void)
{ … }
module_init(…) …
module_exit(…)