fs/btrfs/send.h
Source file repositories/reference/linux-study-clean/fs/btrfs/send.h
File Facts
- System
- Linux kernel
- Corpus path
fs/btrfs/send.h- Extension
.h- Size
- 4426 bytes
- Lines
- 188
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/sizes.hlinux/align.h
Detected Declarations
struct btrfs_rootstruct btrfs_ioctl_send_argsstruct btrfs_stream_headerstruct btrfs_cmd_headerstruct btrfs_tlv_headerenum btrfs_tlv_typeenum btrfs_send_cmd
Annotated Snippet
struct btrfs_stream_header {
char magic[sizeof(BTRFS_SEND_STREAM_MAGIC)];
__le32 version;
} __attribute__ ((__packed__));
struct btrfs_cmd_header {
/* len excluding the header */
__le32 len;
__le16 cmd;
/* crc including the header with zero crc field */
__le32 crc;
} __attribute__ ((__packed__));
struct btrfs_tlv_header {
__le16 tlv_type;
/* len excluding the header */
__le16 tlv_len;
} __attribute__ ((__packed__));
/* commands */
enum btrfs_send_cmd {
BTRFS_SEND_C_UNSPEC = 0,
/* Version 1 */
BTRFS_SEND_C_SUBVOL = 1,
BTRFS_SEND_C_SNAPSHOT = 2,
BTRFS_SEND_C_MKFILE = 3,
BTRFS_SEND_C_MKDIR = 4,
BTRFS_SEND_C_MKNOD = 5,
BTRFS_SEND_C_MKFIFO = 6,
BTRFS_SEND_C_MKSOCK = 7,
BTRFS_SEND_C_SYMLINK = 8,
BTRFS_SEND_C_RENAME = 9,
BTRFS_SEND_C_LINK = 10,
BTRFS_SEND_C_UNLINK = 11,
BTRFS_SEND_C_RMDIR = 12,
BTRFS_SEND_C_SET_XATTR = 13,
BTRFS_SEND_C_REMOVE_XATTR = 14,
BTRFS_SEND_C_WRITE = 15,
BTRFS_SEND_C_CLONE = 16,
BTRFS_SEND_C_TRUNCATE = 17,
BTRFS_SEND_C_CHMOD = 18,
BTRFS_SEND_C_CHOWN = 19,
BTRFS_SEND_C_UTIMES = 20,
BTRFS_SEND_C_END = 21,
BTRFS_SEND_C_UPDATE_EXTENT = 22,
BTRFS_SEND_C_MAX_V1 = 22,
/* Version 2 */
BTRFS_SEND_C_FALLOCATE = 23,
BTRFS_SEND_C_FILEATTR = 24,
BTRFS_SEND_C_ENCODED_WRITE = 25,
BTRFS_SEND_C_MAX_V2 = 25,
/* Version 3 */
BTRFS_SEND_C_ENABLE_VERITY = 26,
BTRFS_SEND_C_MAX_V3 = 26,
/* End */
BTRFS_SEND_C_MAX = 26,
};
/* attributes in send stream */
enum {
BTRFS_SEND_A_UNSPEC = 0,
/* Version 1 */
BTRFS_SEND_A_UUID = 1,
BTRFS_SEND_A_CTRANSID = 2,
BTRFS_SEND_A_INO = 3,
BTRFS_SEND_A_SIZE = 4,
BTRFS_SEND_A_MODE = 5,
BTRFS_SEND_A_UID = 6,
BTRFS_SEND_A_GID = 7,
BTRFS_SEND_A_RDEV = 8,
BTRFS_SEND_A_CTIME = 9,
BTRFS_SEND_A_MTIME = 10,
BTRFS_SEND_A_ATIME = 11,
BTRFS_SEND_A_OTIME = 12,
BTRFS_SEND_A_XATTR_NAME = 13,
BTRFS_SEND_A_XATTR_DATA = 14,
BTRFS_SEND_A_PATH = 15,
Annotation
- Immediate include surface: `linux/types.h`, `linux/sizes.h`, `linux/align.h`.
- Detected declarations: `struct btrfs_root`, `struct btrfs_ioctl_send_args`, `struct btrfs_stream_header`, `struct btrfs_cmd_header`, `struct btrfs_tlv_header`, `enum btrfs_tlv_type`, `enum btrfs_send_cmd`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- 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.