/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (C) 2012 Alexander Block. All rights reserved. * Copyright (C) 2012 STRATO. All rights reserved.
*/
#define BTRFS_SEND_STREAM_MAGIC "btrfs-stream" /* Conditional support for the upcoming protocol version. */ #ifdef CONFIG_BTRFS_EXPERIMENTAL #define BTRFS_SEND_STREAM_VERSION 3 #else #define BTRFS_SEND_STREAM_VERSION 2 #endif
/* * In send stream v1, no command is larger than 64K. In send stream v2, no * limit should be assumed, the buffer size is set to be a header with * compressed extent size.
*/ #define BTRFS_SEND_BUF_SIZE_V1 SZ_64K #define BTRFS_SEND_BUF_SIZE_V2 ALIGN(SZ_16K + BTRFS_MAX_COMPRESSED, PAGE_SIZE)
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__));
BTRFS_SEND_A_FILE_OFFSET = 18, /* * As of send stream v2, this attribute is special: it must be the last * attribute in a command, its header contains only the type, and its * length is implicitly the remaining length of the command.
*/
BTRFS_SEND_A_DATA = 19,
/* * File attributes from the FS_*_FL namespace (i_flags, xflags), * translated to BTRFS_INODE_* bits (BTRFS_INODE_FLAG_MASK) and stored * in btrfs_inode_item::flags (represented by btrfs_inode::flags and * btrfs_inode::ro_flags).
*/
BTRFS_SEND_A_FILEATTR = 26,
BTRFS_SEND_A_UNENCODED_FILE_LEN = 27,
BTRFS_SEND_A_UNENCODED_LEN = 28,
BTRFS_SEND_A_UNENCODED_OFFSET = 29, /* * COMPRESSION and ENCRYPTION default to NONE (0) if omitted from * BTRFS_SEND_C_ENCODED_WRITE.
*/
BTRFS_SEND_A_COMPRESSION = 30,
BTRFS_SEND_A_ENCRYPTION = 31,
BTRFS_SEND_A_MAX_V2 = 31,
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.