linux/fs/btrfs/sysfs.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2007 Oracle.  All rights reserved.
 */

#include <linux/sched.h>
#include <linux/sched/mm.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/completion.h>
#include <linux/bug.h>
#include <linux/list.h>
#include <crypto/hash.h>
#include "messages.h"
#include "ctree.h"
#include "discard.h"
#include "disk-io.h"
#include "send.h"
#include "transaction.h"
#include "sysfs.h"
#include "volumes.h"
#include "space-info.h"
#include "block-group.h"
#include "qgroup.h"
#include "misc.h"
#include "fs.h"
#include "accessors.h"

/*
 * Structure name                       Path
 * --------------------------------------------------------------------------
 * btrfs_supported_static_feature_attrs /sys/fs/btrfs/features
 * btrfs_supported_feature_attrs	/sys/fs/btrfs/features and
 *					/sys/fs/btrfs/<uuid>/features
 * btrfs_attrs				/sys/fs/btrfs/<uuid>
 * devid_attrs				/sys/fs/btrfs/<uuid>/devinfo/<devid>
 * allocation_attrs			/sys/fs/btrfs/<uuid>/allocation
 * qgroup_attrs				/sys/fs/btrfs/<uuid>/qgroups/<level>_<qgroupid>
 * space_info_attrs			/sys/fs/btrfs/<uuid>/allocation/<bg-type>
 * raid_attrs				/sys/fs/btrfs/<uuid>/allocation/<bg-type>/<bg-profile>
 * discard_attrs			/sys/fs/btrfs/<uuid>/discard
 *
 * When built with BTRFS_CONFIG_DEBUG:
 *
 * btrfs_debug_feature_attrs		/sys/fs/btrfs/debug
 * btrfs_debug_mount_attrs		/sys/fs/btrfs/<uuid>/debug
 */

struct btrfs_feature_attr {};

/* For raid type sysfs entries */
struct raid_kobject {};

#define __INIT_KOBJ_ATTR(_name, _mode, _show, _store)

#define BTRFS_ATTR_W(_prefix, _name, _store)

#define BTRFS_ATTR_RW(_prefix, _name, _show, _store)

#define BTRFS_ATTR(_prefix, _name, _show)

#define BTRFS_ATTR_PTR(_prefix, _name)

#define BTRFS_FEAT_ATTR(_name, _feature_set, _feature_prefix, _feature_bit)
#define BTRFS_FEAT_ATTR_PTR(_name)

#define BTRFS_FEAT_ATTR_COMPAT(name, feature)
#define BTRFS_FEAT_ATTR_COMPAT_RO(name, feature)
#define BTRFS_FEAT_ATTR_INCOMPAT(name, feature)

static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj);
static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj);
static struct kobject *get_btrfs_kobj(struct kobject *kobj);

static struct btrfs_feature_attr *to_btrfs_feature_attr(struct kobj_attribute *a)
{}

static struct kobj_attribute *attr_to_btrfs_attr(struct attribute *attr)
{}

static struct btrfs_feature_attr *attr_to_btrfs_feature_attr(
		struct attribute *attr)
{}

static u64 get_features(struct btrfs_fs_info *fs_info,
			enum btrfs_feature_set set)
{}

static void set_features(struct btrfs_fs_info *fs_info,
			 enum btrfs_feature_set set, u64 features)
{}

static int can_modify_feature(struct btrfs_feature_attr *fa)
{}

static ssize_t btrfs_feature_attr_show(struct kobject *kobj,
				       struct kobj_attribute *a, char *buf)
{}

static ssize_t btrfs_feature_attr_store(struct kobject *kobj,
					struct kobj_attribute *a,
					const char *buf, size_t count)
{}

static umode_t btrfs_feature_visible(struct kobject *kobj,
				     struct attribute *attr, int unused)
{}

BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_COMPAT_RO();
BTRFS_FEAT_ATTR_COMPAT_RO();
BTRFS_FEAT_ATTR_INCOMPAT();
BTRFS_FEAT_ATTR_INCOMPAT();
#ifdef CONFIG_BLK_DEV_ZONED
BTRFS_FEAT_ATTR_INCOMPAT();
#endif
#ifdef CONFIG_BTRFS_DEBUG
/* Remove once support for extent tree v2 is feature complete */
BTRFS_FEAT_ATTR_INCOMPAT();
/* Remove once support for raid stripe tree is feature complete. */
BTRFS_FEAT_ATTR_INCOMPAT();
#endif
#ifdef CONFIG_FS_VERITY
BTRFS_FEAT_ATTR_COMPAT_RO();
#endif

/*
 * Features which depend on feature bits and may differ between each fs.
 *
 * /sys/fs/btrfs/features      - all available features implemented by this version
 * /sys/fs/btrfs/UUID/features - features of the fs which are enabled or
 *                               can be changed on a mounted filesystem.
 */
static struct attribute *btrfs_supported_feature_attrs[] =;

static const struct attribute_group btrfs_feature_attr_group =;

static ssize_t rmdir_subvol_show(struct kobject *kobj,
				 struct kobj_attribute *ka, char *buf)
{}
BTRFS_ATTR();

static ssize_t supported_checksums_show(struct kobject *kobj,
					struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

static ssize_t send_stream_version_show(struct kobject *kobj,
					struct kobj_attribute *ka, char *buf)
{}
BTRFS_ATTR();

static const char *rescue_opts[] =;

static ssize_t supported_rescue_options_show(struct kobject *kobj,
					     struct kobj_attribute *a,
					     char *buf)
{}
BTRFS_ATTR();

static ssize_t supported_sectorsizes_show(struct kobject *kobj,
					  struct kobj_attribute *a,
					  char *buf)
{}
BTRFS_ATTR();

static ssize_t acl_show(struct kobject *kobj, struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

static ssize_t temp_fsid_supported_show(struct kobject *kobj,
					struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

/*
 * Features which only depend on kernel version.
 *
 * These are listed in /sys/fs/btrfs/features along with
 * btrfs_supported_feature_attrs.
 */
static struct attribute *btrfs_supported_static_feature_attrs[] =;

static const struct attribute_group btrfs_static_feature_attr_group =;

/*
 * Discard statistics and tunables
 */
#define discard_to_fs_info(_kobj)

static ssize_t btrfs_discardable_bytes_show(struct kobject *kobj,
					    struct kobj_attribute *a,
					    char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_discardable_extents_show(struct kobject *kobj,
					      struct kobj_attribute *a,
					      char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_discard_bitmap_bytes_show(struct kobject *kobj,
					       struct kobj_attribute *a,
					       char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_discard_bytes_saved_show(struct kobject *kobj,
					      struct kobj_attribute *a,
					      char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_discard_extent_bytes_show(struct kobject *kobj,
					       struct kobj_attribute *a,
					       char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_discard_iops_limit_show(struct kobject *kobj,
					     struct kobj_attribute *a,
					     char *buf)
{}

static ssize_t btrfs_discard_iops_limit_store(struct kobject *kobj,
					      struct kobj_attribute *a,
					      const char *buf, size_t len)
{}
BTRFS_ATTR_RW();

static ssize_t btrfs_discard_kbps_limit_show(struct kobject *kobj,
					     struct kobj_attribute *a,
					     char *buf)
{}

static ssize_t btrfs_discard_kbps_limit_store(struct kobject *kobj,
					      struct kobj_attribute *a,
					      const char *buf, size_t len)
{}
BTRFS_ATTR_RW();

static ssize_t btrfs_discard_max_discard_size_show(struct kobject *kobj,
						   struct kobj_attribute *a,
						   char *buf)
{}

static ssize_t btrfs_discard_max_discard_size_store(struct kobject *kobj,
						    struct kobj_attribute *a,
						    const char *buf, size_t len)
{}
BTRFS_ATTR_RW();

/*
 * Per-filesystem stats for discard (when mounted with discard=async).
 *
 * Path: /sys/fs/btrfs/<uuid>/discard/
 */
static const struct attribute *discard_attrs[] =;

#ifdef CONFIG_BTRFS_DEBUG

/*
 * Per-filesystem runtime debugging exported via sysfs.
 *
 * Path: /sys/fs/btrfs/UUID/debug/
 */
static const struct attribute *btrfs_debug_mount_attrs[] =;

/*
 * Runtime debugging exported via sysfs, applies to all mounted filesystems.
 *
 * Path: /sys/fs/btrfs/debug
 */
static struct attribute *btrfs_debug_feature_attrs[] =;

static const struct attribute_group btrfs_debug_feature_attr_group =;

#endif

static ssize_t btrfs_show_u64(u64 *value_ptr, spinlock_t *lock, char *buf)
{}

static ssize_t global_rsv_size_show(struct kobject *kobj,
				    struct kobj_attribute *ka, char *buf)
{}
BTRFS_ATTR();

static ssize_t global_rsv_reserved_show(struct kobject *kobj,
					struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

#define to_space_info(_kobj)
#define to_raid_kobj(_kobj)

static ssize_t raid_bytes_show(struct kobject *kobj,
			       struct kobj_attribute *attr, char *buf);
BTRFS_ATTR();
BTRFS_ATTR();

static ssize_t raid_bytes_show(struct kobject *kobj,
			       struct kobj_attribute *attr, char *buf)

{}

/*
 * Allocation information about block group profiles.
 *
 * Path: /sys/fs/btrfs/<uuid>/allocation/<bg-type>/<bg-profile>/
 */
static struct attribute *raid_attrs[] =;
ATTRIBUTE_GROUPS();

static void release_raid_kobj(struct kobject *kobj)
{}

static const struct kobj_type btrfs_raid_ktype =;

#define SPACE_INFO_ATTR(field)

static ssize_t btrfs_chunk_size_show(struct kobject *kobj,
				     struct kobj_attribute *a, char *buf)
{}

/*
 * Store new chunk size in space info. Can be called on a read-only filesystem.
 *
 * If the new chunk size value is larger than 10% of free space it is reduced
 * to match that limit. Alignment must be to 256M and the system chunk size
 * cannot be set.
 */
static ssize_t btrfs_chunk_size_store(struct kobject *kobj,
				      struct kobj_attribute *a,
				      const char *buf, size_t len)
{}

static ssize_t btrfs_size_classes_show(struct kobject *kobj,
				       struct kobj_attribute *a, char *buf)
{}

#ifdef CONFIG_BTRFS_DEBUG
/*
 * Request chunk allocation with current chunk size.
 */
static ssize_t btrfs_force_chunk_alloc_store(struct kobject *kobj,
					     struct kobj_attribute *a,
					     const char *buf, size_t len)
{}
BTRFS_ATTR_W();

#endif

SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
SPACE_INFO_ATTR();
BTRFS_ATTR_RW();
BTRFS_ATTR();

static ssize_t btrfs_sinfo_bg_reclaim_threshold_show(struct kobject *kobj,
						     struct kobj_attribute *a,
						     char *buf)
{}

static ssize_t btrfs_sinfo_bg_reclaim_threshold_store(struct kobject *kobj,
						      struct kobj_attribute *a,
						      const char *buf, size_t len)
{}

BTRFS_ATTR_RW();

static ssize_t btrfs_sinfo_dynamic_reclaim_show(struct kobject *kobj,
						struct kobj_attribute *a,
						char *buf)
{}

static ssize_t btrfs_sinfo_dynamic_reclaim_store(struct kobject *kobj,
						 struct kobj_attribute *a,
						 const char *buf, size_t len)
{}

BTRFS_ATTR_RW();

static ssize_t btrfs_sinfo_periodic_reclaim_show(struct kobject *kobj,
						struct kobj_attribute *a,
						char *buf)
{}

static ssize_t btrfs_sinfo_periodic_reclaim_store(struct kobject *kobj,
						 struct kobj_attribute *a,
						 const char *buf, size_t len)
{}

BTRFS_ATTR_RW();

/*
 * Allocation information about block group types.
 *
 * Path: /sys/fs/btrfs/<uuid>/allocation/<bg-type>/
 */
static struct attribute *space_info_attrs[] =;
ATTRIBUTE_GROUPS();

static void space_info_release(struct kobject *kobj)
{}

static const struct kobj_type space_info_ktype =;

/*
 * Allocation information about block groups.
 *
 * Path: /sys/fs/btrfs/<uuid>/allocation/
 */
static const struct attribute *allocation_attrs[] =;

static ssize_t btrfs_label_show(struct kobject *kobj,
				struct kobj_attribute *a, char *buf)
{}

static ssize_t btrfs_label_store(struct kobject *kobj,
				 struct kobj_attribute *a,
				 const char *buf, size_t len)
{}
BTRFS_ATTR_RW();

static ssize_t btrfs_nodesize_show(struct kobject *kobj,
				struct kobj_attribute *a, char *buf)
{}

BTRFS_ATTR();

static ssize_t btrfs_sectorsize_show(struct kobject *kobj,
				struct kobj_attribute *a, char *buf)
{}

BTRFS_ATTR();

static ssize_t btrfs_commit_stats_show(struct kobject *kobj,
				       struct kobj_attribute *a, char *buf)
{}

static ssize_t btrfs_commit_stats_store(struct kobject *kobj,
					struct kobj_attribute *a,
					const char *buf, size_t len)
{}
BTRFS_ATTR_RW();

static ssize_t btrfs_clone_alignment_show(struct kobject *kobj,
				struct kobj_attribute *a, char *buf)
{}

BTRFS_ATTR();

static ssize_t quota_override_show(struct kobject *kobj,
				   struct kobj_attribute *a, char *buf)
{}

static ssize_t quota_override_store(struct kobject *kobj,
				    struct kobj_attribute *a,
				    const char *buf, size_t len)
{}

BTRFS_ATTR_RW();

static ssize_t btrfs_metadata_uuid_show(struct kobject *kobj,
				struct kobj_attribute *a, char *buf)
{}

BTRFS_ATTR();

static ssize_t btrfs_checksum_show(struct kobject *kobj,
				   struct kobj_attribute *a, char *buf)
{}

BTRFS_ATTR();

static ssize_t btrfs_exclusive_operation_show(struct kobject *kobj,
		struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_generation_show(struct kobject *kobj,
				     struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_temp_fsid_show(struct kobject *kobj,
				    struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

static const char * const btrfs_read_policy_name[] =;

static ssize_t btrfs_read_policy_show(struct kobject *kobj,
				      struct kobj_attribute *a, char *buf)
{}

static ssize_t btrfs_read_policy_store(struct kobject *kobj,
				       struct kobj_attribute *a,
				       const char *buf, size_t len)
{}
BTRFS_ATTR_RW();

static ssize_t btrfs_bg_reclaim_threshold_show(struct kobject *kobj,
					       struct kobj_attribute *a,
					       char *buf)
{}

static ssize_t btrfs_bg_reclaim_threshold_store(struct kobject *kobj,
						struct kobj_attribute *a,
						const char *buf, size_t len)
{}
BTRFS_ATTR_RW();

#ifdef CONFIG_BTRFS_DEBUG
static ssize_t btrfs_offload_csum_show(struct kobject *kobj,
				       struct kobj_attribute *a, char *buf)
{}

static ssize_t btrfs_offload_csum_store(struct kobject *kobj,
					struct kobj_attribute *a, const char *buf,
					size_t len)
{}
BTRFS_ATTR_RW();
#endif

/*
 * Per-filesystem information and stats.
 *
 * Path: /sys/fs/btrfs/<uuid>/
 */
static const struct attribute *btrfs_attrs[] =;

static void btrfs_release_fsid_kobj(struct kobject *kobj)
{}

static const struct kobj_type btrfs_ktype =;

static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj)
{}

static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj)
{}

static struct kobject *get_btrfs_kobj(struct kobject *kobj)
{}

#define NUM_FEATURE_BITS
#define BTRFS_FEATURE_NAME_MAX
static char btrfs_unknown_feature_names[FEAT_MAX][NUM_FEATURE_BITS][BTRFS_FEATURE_NAME_MAX];
static struct btrfs_feature_attr btrfs_feature_attrs[FEAT_MAX][NUM_FEATURE_BITS];

static_assert();
static_assert();

static const u64 supported_feature_masks[FEAT_MAX] =;

static int addrm_unknown_feature_attrs(struct btrfs_fs_info *fs_info, bool add)
{}

static void __btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs)
{}

/* when fs_devs is NULL it will remove all fsid kobject */
void btrfs_sysfs_remove_fsid(struct btrfs_fs_devices *fs_devs)
{}

static void btrfs_sysfs_remove_fs_devices(struct btrfs_fs_devices *fs_devices)
{}

void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info)
{}

static const char * const btrfs_feature_set_names[FEAT_MAX] =;

const char *btrfs_feature_set_name(enum btrfs_feature_set set)
{}

char *btrfs_printable_features(enum btrfs_feature_set set, u64 flags)
{}

static void init_feature_attrs(void)
{}

/*
 * Create a sysfs entry for a given block group type at path
 * /sys/fs/btrfs/UUID/allocation/data/TYPE
 */
void btrfs_sysfs_add_block_group_type(struct btrfs_block_group *cache)
{}

/*
 * Remove sysfs directories for all block group types of a given space info and
 * the space info as well
 */
void btrfs_sysfs_remove_space_info(struct btrfs_space_info *space_info)
{}

static const char *alloc_name(u64 flags)
{}

/*
 * Create a sysfs entry for a space info type at path
 * /sys/fs/btrfs/UUID/allocation/TYPE
 */
int btrfs_sysfs_add_space_info_type(struct btrfs_fs_info *fs_info,
				    struct btrfs_space_info *space_info)
{}

void btrfs_sysfs_remove_device(struct btrfs_device *device)
{}

static ssize_t btrfs_devinfo_in_fs_metadata_show(struct kobject *kobj,
					         struct kobj_attribute *a,
					         char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_devinfo_missing_show(struct kobject *kobj,
					struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_devinfo_replace_target_show(struct kobject *kobj,
					         struct kobj_attribute *a,
					         char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_devinfo_scrub_speed_max_show(struct kobject *kobj,
					     struct kobj_attribute *a,
					     char *buf)
{}

static ssize_t btrfs_devinfo_scrub_speed_max_store(struct kobject *kobj,
					      struct kobj_attribute *a,
					      const char *buf, size_t len)
{}
BTRFS_ATTR_RW();

static ssize_t btrfs_devinfo_writeable_show(struct kobject *kobj,
					    struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_devinfo_fsid_show(struct kobject *kobj,
				       struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

static ssize_t btrfs_devinfo_error_stats_show(struct kobject *kobj,
		struct kobj_attribute *a, char *buf)
{}
BTRFS_ATTR();

/*
 * Information about one device.
 *
 * Path: /sys/fs/btrfs/<uuid>/devinfo/<devid>/
 */
static struct attribute *devid_attrs[] =;
ATTRIBUTE_GROUPS();

static void btrfs_release_devid_kobj(struct kobject *kobj)
{}

static const struct kobj_type devid_ktype =;

int btrfs_sysfs_add_device(struct btrfs_device *device)
{}

static int btrfs_sysfs_add_fs_devices(struct btrfs_fs_devices *fs_devices)
{}

void btrfs_kobject_uevent(struct block_device *bdev, enum kobject_action action)
{}

void btrfs_sysfs_update_sprout_fsid(struct btrfs_fs_devices *fs_devices)

{}

void btrfs_sysfs_update_devid(struct btrfs_device *device)
{}

/* /sys/fs/btrfs/ entry */
static struct kset *btrfs_kset;

/*
 * Creates:
 *		/sys/fs/btrfs/UUID
 *
 * Can be called by the device discovery thread.
 */
int btrfs_sysfs_add_fsid(struct btrfs_fs_devices *fs_devs)
{}

int btrfs_sysfs_add_mounted(struct btrfs_fs_info *fs_info)
{}

static ssize_t qgroup_enabled_show(struct kobject *qgroups_kobj,
				   struct kobj_attribute *a,
				   char *buf)
{}
BTRFS_ATTR();

static ssize_t qgroup_mode_show(struct kobject *qgroups_kobj,
				struct kobj_attribute *a,
				char *buf)
{}
BTRFS_ATTR();

static ssize_t qgroup_inconsistent_show(struct kobject *qgroups_kobj,
					struct kobj_attribute *a,
					char *buf)
{}
BTRFS_ATTR();

static ssize_t qgroup_drop_subtree_thres_show(struct kobject *qgroups_kobj,
					      struct kobj_attribute *a,
					      char *buf)
{}

static ssize_t qgroup_drop_subtree_thres_store(struct kobject *qgroups_kobj,
					       struct kobj_attribute *a,
					       const char *buf, size_t len)
{}
BTRFS_ATTR_RW();

/*
 * Qgroups global info
 *
 * Path: /sys/fs/btrfs/<uuid>/qgroups/
 */
static struct attribute *qgroups_attrs[] =;
ATTRIBUTE_GROUPS();

static void qgroups_release(struct kobject *kobj)
{}

static const struct kobj_type qgroups_ktype =;

static inline struct btrfs_fs_info *qgroup_kobj_to_fs_info(struct kobject *kobj)
{}

#define QGROUP_ATTR(_member, _show_name)

#define QGROUP_RSV_ATTR(_name, _type)

QGROUP_ATTR();
QGROUP_ATTR();
QGROUP_ATTR();
QGROUP_ATTR();
QGROUP_ATTR();
QGROUP_RSV_ATTR();
QGROUP_RSV_ATTR();
QGROUP_RSV_ATTR();

/*
 * Qgroup information.
 *
 * Path: /sys/fs/btrfs/<uuid>/qgroups/<level>_<qgroupid>/
 */
static struct attribute *qgroup_attrs[] =;
ATTRIBUTE_GROUPS();

static void qgroup_release(struct kobject *kobj)
{}

static const struct kobj_type qgroup_ktype =;

int btrfs_sysfs_add_one_qgroup(struct btrfs_fs_info *fs_info,
				struct btrfs_qgroup *qgroup)
{}

void btrfs_sysfs_del_qgroups(struct btrfs_fs_info *fs_info)
{}

/* Called when qgroups get initialized, thus there is no need for locking */
int btrfs_sysfs_add_qgroups(struct btrfs_fs_info *fs_info)
{}

void btrfs_sysfs_del_one_qgroup(struct btrfs_fs_info *fs_info,
				struct btrfs_qgroup *qgroup)
{}

/*
 * Change per-fs features in /sys/fs/btrfs/UUID/features to match current
 * values in superblock. Call after any changes to incompat/compat_ro flags
 */
void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info)
{}

int __init btrfs_init_sysfs(void)
{}

void __cold btrfs_exit_sysfs(void)
{}