include/uapi/linux/btrfs.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/btrfs.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/btrfs.h- Extension
.h- Size
- 39971 bytes
- Lines
- 1272
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/ioctl.hlinux/fs.h
Detected Declarations
struct btrfs_ioctl_vol_argsstruct btrfs_qgroup_limitstruct btrfs_qgroup_inheritstruct btrfs_ioctl_qgroup_limit_argsstruct btrfs_ioctl_vol_args_v2struct btrfs_scrub_progressstruct btrfs_ioctl_scrub_argsstruct btrfs_ioctl_dev_replace_start_paramsstruct btrfs_ioctl_dev_replace_status_paramsstruct btrfs_ioctl_dev_replace_argsstruct btrfs_ioctl_dev_info_argsstruct btrfs_ioctl_fs_info_argsstruct btrfs_ioctl_feature_flagsstruct btrfs_balance_argsstruct btrfs_balance_progressstruct btrfs_ioctl_balance_argsstruct btrfs_ioctl_ino_lookup_argsstruct btrfs_ioctl_ino_lookup_user_argsstruct btrfs_ioctl_search_keystruct btrfs_ioctl_search_headerstruct btrfs_ioctl_search_argsstruct btrfs_ioctl_search_args_v2struct btrfs_ioctl_clone_range_argsstruct btrfs_ioctl_defrag_range_argsstruct btrfs_ioctl_same_extent_infostruct btrfs_ioctl_same_argsstruct btrfs_ioctl_space_infostruct btrfs_ioctl_space_argsstruct btrfs_data_containerstruct btrfs_ioctl_ino_path_argsstruct btrfs_ioctl_logical_ino_argsstruct btrfs_ioctl_get_dev_statsstruct btrfs_ioctl_quota_ctl_argsstruct btrfs_ioctl_quota_rescan_argsstruct btrfs_ioctl_qgroup_assign_argsstruct btrfs_ioctl_qgroup_create_argsstruct btrfs_ioctl_timespecstruct btrfs_ioctl_received_subvol_argsstruct btrfs_ioctl_send_argsstruct btrfs_ioctl_get_subvol_info_argsstruct btrfs_ioctl_get_subvol_rootref_argsstruct btrfs_ioctl_encoded_io_argsstruct btrfs_ioctl_subvol_waitstruct btrfs_ioctl_get_csums_entrystruct btrfs_ioctl_get_csums_argsenum btrfs_dev_stat_valuesenum btrfs_err_code
Annotated Snippet
struct btrfs_ioctl_vol_args {
__s64 fd;
char name[BTRFS_PATH_NAME_MAX + 1];
};
#define BTRFS_DEVICE_PATH_NAME_MAX 1024
#define BTRFS_SUBVOL_NAME_MAX 4039
#ifndef __KERNEL__
/* Deprecated since 5.7 */
# define BTRFS_SUBVOL_CREATE_ASYNC (1ULL << 0)
#endif
#define BTRFS_SUBVOL_RDONLY (1ULL << 1)
#define BTRFS_SUBVOL_QGROUP_INHERIT (1ULL << 2)
#define BTRFS_DEVICE_SPEC_BY_ID (1ULL << 3)
#define BTRFS_SUBVOL_SPEC_BY_ID (1ULL << 4)
#define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED \
(BTRFS_SUBVOL_RDONLY | \
BTRFS_SUBVOL_QGROUP_INHERIT | \
BTRFS_DEVICE_SPEC_BY_ID | \
BTRFS_SUBVOL_SPEC_BY_ID)
#define BTRFS_FSID_SIZE 16
#define BTRFS_UUID_SIZE 16
#define BTRFS_UUID_UNPARSED_SIZE 37
/*
* flags definition for qgroup limits
*
* Used by:
* struct btrfs_qgroup_limit.flags
* struct btrfs_qgroup_limit_item.flags
*/
#define BTRFS_QGROUP_LIMIT_MAX_RFER (1ULL << 0)
#define BTRFS_QGROUP_LIMIT_MAX_EXCL (1ULL << 1)
#define BTRFS_QGROUP_LIMIT_RSV_RFER (1ULL << 2)
#define BTRFS_QGROUP_LIMIT_RSV_EXCL (1ULL << 3)
#define BTRFS_QGROUP_LIMIT_RFER_CMPR (1ULL << 4)
#define BTRFS_QGROUP_LIMIT_EXCL_CMPR (1ULL << 5)
struct btrfs_qgroup_limit {
__u64 flags;
__u64 max_rfer;
__u64 max_excl;
__u64 rsv_rfer;
__u64 rsv_excl;
};
/*
* flags definition for qgroup inheritance
*
* Used by:
* struct btrfs_qgroup_inherit.flags
*/
#define BTRFS_QGROUP_INHERIT_SET_LIMITS (1ULL << 0)
#define BTRFS_QGROUP_INHERIT_FLAGS_SUPP (BTRFS_QGROUP_INHERIT_SET_LIMITS)
struct btrfs_qgroup_inherit {
__u64 flags;
__u64 num_qgroups;
__u64 num_ref_copies;
__u64 num_excl_copies;
struct btrfs_qgroup_limit lim;
__u64 qgroups[];
};
struct btrfs_ioctl_qgroup_limit_args {
__u64 qgroupid;
struct btrfs_qgroup_limit lim;
};
/*
* Arguments for specification of subvolumes or devices, supporting by-name or
* by-id and flags
*
* The set of supported flags depends on the ioctl
*
* BTRFS_SUBVOL_RDONLY is also provided/consumed by the following ioctls:
* - BTRFS_IOC_SUBVOL_GETFLAGS
* - BTRFS_IOC_SUBVOL_SETFLAGS
*/
/* Supported flags for BTRFS_IOC_RM_DEV_V2 */
#define BTRFS_DEVICE_REMOVE_ARGS_MASK \
(BTRFS_DEVICE_SPEC_BY_ID)
/* Supported flags for BTRFS_IOC_SNAP_CREATE_V2 and BTRFS_IOC_SUBVOL_CREATE_V2 */
Annotation
- Immediate include surface: `linux/types.h`, `linux/ioctl.h`, `linux/fs.h`.
- Detected declarations: `struct btrfs_ioctl_vol_args`, `struct btrfs_qgroup_limit`, `struct btrfs_qgroup_inherit`, `struct btrfs_ioctl_qgroup_limit_args`, `struct btrfs_ioctl_vol_args_v2`, `struct btrfs_scrub_progress`, `struct btrfs_ioctl_scrub_args`, `struct btrfs_ioctl_dev_replace_start_params`, `struct btrfs_ioctl_dev_replace_status_params`, `struct btrfs_ioctl_dev_replace_args`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.