Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
send.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Alexander Block. All rights reserved.
3  * Copyright (C) 2012 STRATO. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public
7  * License v2 as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 021110-1307, USA.
18  */
19 
20 #include "ctree.h"
21 
22 #define BTRFS_SEND_STREAM_MAGIC "btrfs-stream"
23 #define BTRFS_SEND_STREAM_VERSION 1
24 
25 #define BTRFS_SEND_BUF_SIZE (1024 * 64)
26 #define BTRFS_SEND_READ_SIZE (1024 * 48)
27 
37 };
38 
42 } __attribute__ ((__packed__));
43 
45  /* len excluding the header */
48  /* crc including the header with zero crc field */
50 } __attribute__ ((__packed__));
51 
54  /* len excluding the header */
56 } __attribute__ ((__packed__));
57 
58 /* commands */
61 
64 
71 
76 
79 
82 
87 
90 };
91 #define BTRFS_SEND_C_MAX (__BTRFS_SEND_C_MAX - 1)
92 
93 /* attributes in send stream */
94 enum {
96 
99 
110 
113 
117 
120 
126 
128 };
129 #define BTRFS_SEND_A_MAX (__BTRFS_SEND_A_MAX - 1)
130 
131 #ifdef __KERNEL__
132 long btrfs_ioctl_send(struct file *mnt_file, void __user *arg);
133 int write_buf(struct file *filp, const void *buf, u32 len, loff_t *off);
134 #endif