#include <uapi/linux/magic.h>
#include <linux/fs.h>
#include <linux/namei.h>
#include <linux/xattr.h>
#include <linux/mount.h>
#include <linux/parser.h>
#include <linux/module.h>
#include <linux/statfs.h>
#include <linux/seq_file.h>
#include <linux/posix_acl_xattr.h>
#include <linux/exportfs.h>
#include <linux/file.h>
#include <linux/fs_context.h>
#include <linux/fs_parser.h>
#include "overlayfs.h"
#include "params.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
struct ovl_dir_cache;
static struct dentry *ovl_d_real(struct dentry *dentry, enum d_real_type type)
{ … }
static int ovl_revalidate_real(struct dentry *d, unsigned int flags, bool weak)
{ … }
static int ovl_dentry_revalidate_common(struct dentry *dentry,
unsigned int flags, bool weak)
{ … }
static int ovl_dentry_revalidate(struct dentry *dentry, unsigned int flags)
{ … }
static int ovl_dentry_weak_revalidate(struct dentry *dentry, unsigned int flags)
{ … }
static const struct dentry_operations ovl_dentry_operations = …;
static struct kmem_cache *ovl_inode_cachep;
static struct inode *ovl_alloc_inode(struct super_block *sb)
{ … }
static void ovl_free_inode(struct inode *inode)
{ … }
static void ovl_destroy_inode(struct inode *inode)
{ … }
static void ovl_put_super(struct super_block *sb)
{ … }
static int ovl_sync_fs(struct super_block *sb, int wait)
{ … }
static int ovl_statfs(struct dentry *dentry, struct kstatfs *buf)
{ … }
static const struct super_operations ovl_super_operations = …;
#define OVL_WORKDIR_NAME …
#define OVL_INDEXDIR_NAME …
static struct dentry *ovl_workdir_create(struct ovl_fs *ofs,
const char *name, bool persist)
{ … }
static int ovl_check_namelen(const struct path *path, struct ovl_fs *ofs,
const char *name)
{ … }
static int ovl_lower_dir(const char *name, struct path *path,
struct ovl_fs *ofs, int *stack_depth)
{ … }
static bool ovl_workdir_ok(struct dentry *workdir, struct dentry *upperdir)
{ … }
static int ovl_setup_trap(struct super_block *sb, struct dentry *dir,
struct inode **ptrap, const char *name)
{ … }
static int ovl_report_in_use(struct ovl_fs *ofs, const char *name)
{ … }
static int ovl_get_upper(struct super_block *sb, struct ovl_fs *ofs,
struct ovl_layer *upper_layer,
const struct path *upperpath)
{ … }
static int ovl_check_rename_whiteout(struct ovl_fs *ofs)
{ … }
static struct dentry *ovl_lookup_or_create(struct ovl_fs *ofs,
struct dentry *parent,
const char *name, umode_t mode)
{ … }
static int ovl_create_volatile_dirty(struct ovl_fs *ofs)
{ … }
static int ovl_make_workdir(struct super_block *sb, struct ovl_fs *ofs,
const struct path *workpath)
{ … }
static int ovl_get_workdir(struct super_block *sb, struct ovl_fs *ofs,
const struct path *upperpath,
const struct path *workpath)
{ … }
static int ovl_get_indexdir(struct super_block *sb, struct ovl_fs *ofs,
struct ovl_entry *oe, const struct path *upperpath)
{ … }
static bool ovl_lower_uuid_ok(struct ovl_fs *ofs, const uuid_t *uuid)
{ … }
static int ovl_get_fsid(struct ovl_fs *ofs, const struct path *path)
{ … }
static int ovl_get_data_fsid(struct ovl_fs *ofs)
{ … }
static int ovl_get_layers(struct super_block *sb, struct ovl_fs *ofs,
struct ovl_fs_context *ctx, struct ovl_layer *layers)
{ … }
static struct ovl_entry *ovl_get_lowerstack(struct super_block *sb,
struct ovl_fs_context *ctx,
struct ovl_fs *ofs,
struct ovl_layer *layers)
{ … }
static int ovl_check_layer(struct super_block *sb, struct ovl_fs *ofs,
struct dentry *dentry, const char *name,
bool is_lower)
{ … }
static int ovl_check_overlapping_layers(struct super_block *sb,
struct ovl_fs *ofs)
{ … }
static struct dentry *ovl_get_root(struct super_block *sb,
struct dentry *upperdentry,
struct ovl_entry *oe)
{ … }
int ovl_fill_super(struct super_block *sb, struct fs_context *fc)
{ … }
struct file_system_type ovl_fs_type = …;
MODULE_ALIAS_FS(…) …;
static void ovl_inode_init_once(void *foo)
{ … }
static int __init ovl_init(void)
{ … }
static void __exit ovl_exit(void)
{ … }
module_init(…) …;
module_exit(ovl_exit);