#ifndef NO_BCACHEFS_FS
#include "bcachefs.h"
#include "acl.h"
#include "bkey_buf.h"
#include "btree_update.h"
#include "buckets.h"
#include "chardev.h"
#include "dirent.h"
#include "errcode.h"
#include "extents.h"
#include "fs.h"
#include "fs-common.h"
#include "fs-io.h"
#include "fs-ioctl.h"
#include "fs-io-buffered.h"
#include "fs-io-direct.h"
#include "fs-io-pagecache.h"
#include "fsck.h"
#include "inode.h"
#include "io_read.h"
#include "journal.h"
#include "keylist.h"
#include "quota.h"
#include "snapshot.h"
#include "super.h"
#include "xattr.h"
#include "trace.h"
#include <linux/aio.h>
#include <linux/backing-dev.h>
#include <linux/exportfs.h>
#include <linux/fiemap.h>
#include <linux/fs_context.h>
#include <linux/module.h>
#include <linux/pagemap.h>
#include <linux/posix_acl.h>
#include <linux/random.h>
#include <linux/seq_file.h>
#include <linux/statfs.h>
#include <linux/string.h>
#include <linux/xattr.h>
static struct kmem_cache *bch2_inode_cache;
static void bch2_vfs_inode_init(struct btree_trans *, subvol_inum,
struct bch_inode_info *,
struct bch_inode_unpacked *,
struct bch_subvolume *);
void bch2_inode_update_after_write(struct btree_trans *trans,
struct bch_inode_info *inode,
struct bch_inode_unpacked *bi,
unsigned fields)
{ … }
int __must_check bch2_write_inode(struct bch_fs *c,
struct bch_inode_info *inode,
inode_set_fn set,
void *p, unsigned fields)
{ … }
int bch2_fs_quota_transfer(struct bch_fs *c,
struct bch_inode_info *inode,
struct bch_qid new_qid,
unsigned qtypes,
enum quota_acct_mode mode)
{ … }
static int bch2_iget5_test(struct inode *vinode, void *p)
{ … }
static int bch2_iget5_set(struct inode *vinode, void *p)
{ … }
static unsigned bch2_inode_hash(subvol_inum inum)
{ … }
static struct bch_inode_info *bch2_inode_insert(struct bch_fs *c, struct bch_inode_info *inode)
{ … }
#define memalloc_flags_do(_flags, _do) …
static struct inode *bch2_alloc_inode(struct super_block *sb)
{ … }
static struct bch_inode_info *__bch2_new_inode(struct bch_fs *c)
{ … }
static struct bch_inode_info *bch2_new_inode(struct btree_trans *trans)
{ … }
struct inode *bch2_vfs_inode_get(struct bch_fs *c, subvol_inum inum)
{ … }
struct bch_inode_info *
__bch2_create(struct mnt_idmap *idmap,
struct bch_inode_info *dir, struct dentry *dentry,
umode_t mode, dev_t rdev, subvol_inum snapshot_src,
unsigned flags)
{ … }
static struct bch_inode_info *bch2_lookup_trans(struct btree_trans *trans,
subvol_inum dir, struct bch_hash_info *dir_hash_info,
const struct qstr *name)
{ … }
static struct dentry *bch2_lookup(struct inode *vdir, struct dentry *dentry,
unsigned int flags)
{ … }
static int bch2_mknod(struct mnt_idmap *idmap,
struct inode *vdir, struct dentry *dentry,
umode_t mode, dev_t rdev)
{ … }
static int bch2_create(struct mnt_idmap *idmap,
struct inode *vdir, struct dentry *dentry,
umode_t mode, bool excl)
{ … }
static int __bch2_link(struct bch_fs *c,
struct bch_inode_info *inode,
struct bch_inode_info *dir,
struct dentry *dentry)
{ … }
static int bch2_link(struct dentry *old_dentry, struct inode *vdir,
struct dentry *dentry)
{ … }
int __bch2_unlink(struct inode *vdir, struct dentry *dentry,
bool deleting_snapshot)
{ … }
static int bch2_unlink(struct inode *vdir, struct dentry *dentry)
{ … }
static int bch2_symlink(struct mnt_idmap *idmap,
struct inode *vdir, struct dentry *dentry,
const char *symname)
{ … }
static int bch2_mkdir(struct mnt_idmap *idmap,
struct inode *vdir, struct dentry *dentry, umode_t mode)
{ … }
static int bch2_rename2(struct mnt_idmap *idmap,
struct inode *src_vdir, struct dentry *src_dentry,
struct inode *dst_vdir, struct dentry *dst_dentry,
unsigned flags)
{ … }
static void bch2_setattr_copy(struct mnt_idmap *idmap,
struct bch_inode_info *inode,
struct bch_inode_unpacked *bi,
struct iattr *attr)
{ … }
int bch2_setattr_nonsize(struct mnt_idmap *idmap,
struct bch_inode_info *inode,
struct iattr *attr)
{ … }
static int bch2_getattr(struct mnt_idmap *idmap,
const struct path *path, struct kstat *stat,
u32 request_mask, unsigned query_flags)
{ … }
static int bch2_setattr(struct mnt_idmap *idmap,
struct dentry *dentry, struct iattr *iattr)
{ … }
static int bch2_tmpfile(struct mnt_idmap *idmap,
struct inode *vdir, struct file *file, umode_t mode)
{ … }
static int bch2_fill_extent(struct bch_fs *c,
struct fiemap_extent_info *info,
struct bkey_s_c k, unsigned flags)
{ … }
static int bch2_fiemap(struct inode *vinode, struct fiemap_extent_info *info,
u64 start, u64 len)
{ … }
static const struct vm_operations_struct bch_vm_ops = …;
static int bch2_mmap(struct file *file, struct vm_area_struct *vma)
{ … }
static loff_t bch2_dir_llseek(struct file *file, loff_t offset, int whence)
{ … }
static int bch2_vfs_readdir(struct file *file, struct dir_context *ctx)
{ … }
static int bch2_open(struct inode *vinode, struct file *file)
{ … }
static const struct file_operations bch_file_operations = …;
static const struct inode_operations bch_file_inode_operations = …;
static const struct inode_operations bch_dir_inode_operations = …;
static const struct file_operations bch_dir_file_operations = …;
static const struct inode_operations bch_symlink_inode_operations = …;
static const struct inode_operations bch_special_inode_operations = …;
static const struct address_space_operations bch_address_space_operations = …;
struct bcachefs_fid { … } __packed;
struct bcachefs_fid_with_parent { … } __packed;
static int bcachefs_fid_valid(int fh_len, int fh_type)
{ … }
static struct bcachefs_fid bch2_inode_to_fid(struct bch_inode_info *inode)
{ … }
static int bch2_encode_fh(struct inode *vinode, u32 *fh, int *len,
struct inode *vdir)
{ … }
static struct inode *bch2_nfs_get_inode(struct super_block *sb,
struct bcachefs_fid fid)
{ … }
static struct dentry *bch2_fh_to_dentry(struct super_block *sb, struct fid *_fid,
int fh_len, int fh_type)
{ … }
static struct dentry *bch2_fh_to_parent(struct super_block *sb, struct fid *_fid,
int fh_len, int fh_type)
{ … }
static struct dentry *bch2_get_parent(struct dentry *child)
{ … }
static int bch2_get_name(struct dentry *parent, char *name, struct dentry *child)
{ … }
static const struct export_operations bch_export_ops = …;
static void bch2_vfs_inode_init(struct btree_trans *trans, subvol_inum inum,
struct bch_inode_info *inode,
struct bch_inode_unpacked *bi,
struct bch_subvolume *subvol)
{ … }
static void bch2_free_inode(struct inode *vinode)
{ … }
static int inode_update_times_fn(struct btree_trans *trans,
struct bch_inode_info *inode,
struct bch_inode_unpacked *bi,
void *p)
{ … }
static int bch2_vfs_write_inode(struct inode *vinode,
struct writeback_control *wbc)
{ … }
static void bch2_evict_inode(struct inode *vinode)
{ … }
void bch2_evict_subvolume_inodes(struct bch_fs *c, snapshot_id_list *s)
{ … }
static int bch2_statfs(struct dentry *dentry, struct kstatfs *buf)
{ … }
static int bch2_sync_fs(struct super_block *sb, int wait)
{ … }
static struct bch_fs *bch2_path_to_fs(const char *path)
{ … }
static int bch2_remount(struct super_block *sb, int *flags,
struct bch_opts opts)
{ … }
static int bch2_show_devname(struct seq_file *seq, struct dentry *root)
{ … }
static int bch2_show_options(struct seq_file *seq, struct dentry *root)
{ … }
static void bch2_put_super(struct super_block *sb)
{ … }
static int bch2_freeze(struct super_block *sb)
{ … }
static int bch2_unfreeze(struct super_block *sb)
{ … }
static const struct super_operations bch_super_operations = …;
static int bch2_set_super(struct super_block *s, void *data)
{ … }
static int bch2_noset_super(struct super_block *s, void *data)
{ … }
darray_fs;
static int bch2_test_super(struct super_block *s, void *data)
{ … }
static int bch2_fs_get_tree(struct fs_context *fc)
{ … }
static void bch2_kill_sb(struct super_block *sb)
{ … }
static void bch2_fs_context_free(struct fs_context *fc)
{ … }
static int bch2_fs_parse_param(struct fs_context *fc,
struct fs_parameter *param)
{ … }
static int bch2_fs_reconfigure(struct fs_context *fc)
{ … }
static const struct fs_context_operations bch2_context_ops = …;
static int bch2_init_fs_context(struct fs_context *fc)
{ … }
static struct file_system_type bcache_fs_type = …;
MODULE_ALIAS_FS(…) …;
void bch2_vfs_exit(void)
{ … }
int __init bch2_vfs_init(void)
{ … }
#endif