#include <linux/blkdev.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/time.h>
#include <linux/init.h>
#include <linux/seq_file.h>
#include <linux/string.h>
#include <linux/backing-dev.h>
#include <linux/mount.h>
#include <linux/writeback.h>
#include <linux/statfs.h>
#include <linux/compat.h>
#include <linux/parser.h>
#include <linux/ctype.h>
#include <linux/namei.h>
#include <linux/miscdevice.h>
#include <linux/magic.h>
#include <linux/slab.h>
#include <linux/ratelimit.h>
#include <linux/crc32c.h>
#include <linux/btrfs.h>
#include <linux/security.h>
#include <linux/fs_parser.h>
#include "messages.h"
#include "delayed-inode.h"
#include "ctree.h"
#include "disk-io.h"
#include "transaction.h"
#include "btrfs_inode.h"
#include "direct-io.h"
#include "props.h"
#include "xattr.h"
#include "bio.h"
#include "export.h"
#include "compression.h"
#include "dev-replace.h"
#include "free-space-cache.h"
#include "backref.h"
#include "space-info.h"
#include "sysfs.h"
#include "zoned.h"
#include "tests/btrfs-tests.h"
#include "block-group.h"
#include "discard.h"
#include "qgroup.h"
#include "raid56.h"
#include "fs.h"
#include "accessors.h"
#include "defrag.h"
#include "dir-item.h"
#include "ioctl.h"
#include "scrub.h"
#include "verity.h"
#include "super.h"
#include "extent-tree.h"
#define CREATE_TRACE_POINTS
#include <trace/events/btrfs.h>
static const struct super_operations btrfs_super_ops;
static struct file_system_type btrfs_fs_type;
static void btrfs_put_super(struct super_block *sb)
{ … }
struct btrfs_fs_context { … };
enum { … };
enum { … };
static const struct constant_table btrfs_parameter_fatal_errors[] = …;
enum { … };
static const struct constant_table btrfs_parameter_discard[] = …;
enum { … };
static const struct constant_table btrfs_parameter_space_cache[] = …;
enum { … };
static const struct constant_table btrfs_parameter_rescue[] = …;
#ifdef CONFIG_BTRFS_DEBUG
enum { … };
static const struct constant_table btrfs_parameter_fragment[] = …;
#endif
static const struct fs_parameter_spec btrfs_fs_parameters[] = …;
static inline blk_mode_t btrfs_open_mode(struct fs_context *fc)
{ … }
static int btrfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
{ … }
static void btrfs_clear_oneshot_options(struct btrfs_fs_info *fs_info)
{ … }
static bool check_ro_option(const struct btrfs_fs_info *fs_info,
unsigned long long mount_opt, unsigned long long opt,
const char *opt_name)
{ … }
bool btrfs_check_options(const struct btrfs_fs_info *info,
unsigned long long *mount_opt,
unsigned long flags)
{ … }
void btrfs_set_free_space_cache_settings(struct btrfs_fs_info *fs_info)
{ … }
static void set_device_specific_options(struct btrfs_fs_info *fs_info)
{ … }
char *btrfs_get_subvol_name_from_objectid(struct btrfs_fs_info *fs_info,
u64 subvol_objectid)
{ … }
static int get_default_subvol_objectid(struct btrfs_fs_info *fs_info, u64 *objectid)
{ … }
static int btrfs_fill_super(struct super_block *sb,
struct btrfs_fs_devices *fs_devices,
void *data)
{ … }
int btrfs_sync_fs(struct super_block *sb, int wait)
{ … }
static void print_rescue_option(struct seq_file *seq, const char *s, bool *printed)
{ … }
static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
{ … }
static inline int is_subvolume_inode(struct inode *inode)
{ … }
static struct dentry *mount_subvol(const char *subvol_name, u64 subvol_objectid,
struct vfsmount *mnt)
{ … }
static void btrfs_resize_thread_pool(struct btrfs_fs_info *fs_info,
u32 new_pool_size, u32 old_pool_size)
{ … }
static inline void btrfs_remount_begin(struct btrfs_fs_info *fs_info,
unsigned long long old_opts, int flags)
{ … }
static inline void btrfs_remount_cleanup(struct btrfs_fs_info *fs_info,
unsigned long long old_opts)
{ … }
static int btrfs_remount_rw(struct btrfs_fs_info *fs_info)
{ … }
static int btrfs_remount_ro(struct btrfs_fs_info *fs_info)
{ … }
static void btrfs_ctx_to_info(struct btrfs_fs_info *fs_info, struct btrfs_fs_context *ctx)
{ … }
static void btrfs_info_to_ctx(struct btrfs_fs_info *fs_info, struct btrfs_fs_context *ctx)
{ … }
#define btrfs_info_if_set(fs_info, old_ctx, opt, fmt, args...) …
#define btrfs_info_if_unset(fs_info, old_ctx, opt, fmt, args...) …
static void btrfs_emit_options(struct btrfs_fs_info *info,
struct btrfs_fs_context *old)
{ … }
static int btrfs_reconfigure(struct fs_context *fc)
{ … }
static int btrfs_cmp_device_free_bytes(const void *a, const void *b)
{ … }
static inline void btrfs_descending_sort_devices(
struct btrfs_device_info *devices,
size_t nr_devices)
{ … }
static inline int btrfs_calc_avail_data_space(struct btrfs_fs_info *fs_info,
u64 *free_bytes)
{ … }
static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{ … }
static int btrfs_fc_test_super(struct super_block *sb, struct fs_context *fc)
{ … }
static int btrfs_get_tree_super(struct fs_context *fc)
{ … }
static struct vfsmount *btrfs_reconfigure_for_mount(struct fs_context *fc)
{ … }
static int btrfs_get_tree_subvol(struct fs_context *fc)
{ … }
static int btrfs_get_tree(struct fs_context *fc)
{ … }
static void btrfs_kill_super(struct super_block *sb)
{ … }
static void btrfs_free_fs_context(struct fs_context *fc)
{ … }
static int btrfs_dup_fs_context(struct fs_context *fc, struct fs_context *src_fc)
{ … }
static const struct fs_context_operations btrfs_fs_context_ops = …;
static int btrfs_init_fs_context(struct fs_context *fc)
{ … }
static struct file_system_type btrfs_fs_type = …;
MODULE_ALIAS_FS(…) …;
static int btrfs_control_open(struct inode *inode, struct file *file)
{ … }
static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{ … }
static int btrfs_freeze(struct super_block *sb)
{ … }
static int check_dev_super(struct btrfs_device *dev)
{ … }
static int btrfs_unfreeze(struct super_block *sb)
{ … }
static int btrfs_show_devname(struct seq_file *m, struct dentry *root)
{ … }
static long btrfs_nr_cached_objects(struct super_block *sb, struct shrink_control *sc)
{ … }
static long btrfs_free_cached_objects(struct super_block *sb, struct shrink_control *sc)
{ … }
static const struct super_operations btrfs_super_ops = …;
static const struct file_operations btrfs_ctl_fops = …;
static struct miscdevice btrfs_misc = …;
MODULE_ALIAS_MISCDEV(…);
MODULE_ALIAS(…) …;
static int __init btrfs_interface_init(void)
{ … }
static __cold void btrfs_interface_exit(void)
{ … }
static int __init btrfs_print_mod_info(void)
{ … }
static int register_btrfs(void)
{ … }
static void unregister_btrfs(void)
{ … }
struct init_sequence { … };
static const struct init_sequence mod_init_seq[] = …;
static bool mod_init_result[ARRAY_SIZE(mod_init_seq)];
static __always_inline void btrfs_exit_btrfs_fs(void)
{ … }
static void __exit exit_btrfs_fs(void)
{ … }
static int __init init_btrfs_fs(void)
{ … }
late_initcall(init_btrfs_fs);
module_exit(…)
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;
MODULE_SOFTDEP(…) …;