linux/fs/btrfs/send.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2012 Alexander Block.  All rights reserved.
 * Copyright (C) 2012 STRATO.  All rights reserved.
 */

#ifndef BTRFS_SEND_H
#define BTRFS_SEND_H

#include <linux/types.h>
#include <linux/sizes.h>
#include <linux/align.h>

struct btrfs_inode;
struct btrfs_ioctl_send_args;

#define BTRFS_SEND_STREAM_MAGIC
/* Conditional support for the upcoming protocol version. */
#ifdef CONFIG_BTRFS_DEBUG
#define BTRFS_SEND_STREAM_VERSION
#else
#define BTRFS_SEND_STREAM_VERSION
#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
#define BTRFS_SEND_BUF_SIZE_V2

enum btrfs_tlv_type {};

struct btrfs_stream_header {} __attribute__ ((packed));

struct btrfs_cmd_header {} __attribute__ ((packed));

struct btrfs_tlv_header {} __attribute__ ((packed));

/* commands */
enum btrfs_send_cmd {};

/* attributes in send stream */
enum {};

long btrfs_ioctl_send(struct btrfs_inode *inode, const struct btrfs_ioctl_send_args *arg);

#endif