Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
send.c File Reference
#include <linux/bsearch.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/sort.h>
#include <linux/mount.h>
#include <linux/xattr.h>
#include <linux/posix_acl_xattr.h>
#include <linux/radix-tree.h>
#include <linux/crc32c.h>
#include <linux/vmalloc.h>
#include "send.h"
#include "backref.h"
#include "locking.h"
#include "disk-io.h"
#include "btrfs_inode.h"
#include "transaction.h"

Go to the source code of this file.

Data Structures

struct  fs_path
 
struct  clone_root
 
struct  send_ctx
 
struct  name_cache_entry
 
struct  backref_ctx
 
struct  recorded_ref
 
struct  find_ref_ctx
 
struct  find_xattr_ctx
 

Macros

#define verbose_printk(...)   if (g_verbose) printk(__VA_ARGS__)
 
#define FS_PATH_INLINE_SIZE   (sizeof(struct fs_path) - offsetof(struct fs_path, inline_buf))
 
#define SEND_CTX_MAX_NAME_CACHE_SIZE   128
 
#define SEND_CTX_NAME_CACHE_CLEAN_SIZE   (SEND_CTX_MAX_NAME_CACHE_SIZE * 2)
 
#define TLV_PUT(sctx, attrtype, attrlen, data)
 
#define TLV_PUT_INT(sctx, attrtype, bits, value)
 
#define TLV_PUT_U8(sctx, attrtype, data)   TLV_PUT_INT(sctx, attrtype, 8, data)
 
#define TLV_PUT_U16(sctx, attrtype, data)   TLV_PUT_INT(sctx, attrtype, 16, data)
 
#define TLV_PUT_U32(sctx, attrtype, data)   TLV_PUT_INT(sctx, attrtype, 32, data)
 
#define TLV_PUT_U64(sctx, attrtype, data)   TLV_PUT_INT(sctx, attrtype, 64, data)
 
#define TLV_PUT_STRING(sctx, attrtype, str, len)
 
#define TLV_PUT_PATH(sctx, attrtype, p)
 
#define TLV_PUT_UUID(sctx, attrtype, uuid)
 
#define TLV_PUT_TIMESPEC(sctx, attrtype, ts)
 
#define TLV_PUT_BTRFS_TIMESPEC(sctx, attrtype, eb, ts)
 

Typedefs

typedef int(* iterate_inode_ref_t )(int num, u64 dir, int index, struct fs_path *p, void *ctx)
 
typedef int(* iterate_dir_item_t )(int num, struct btrfs_key *di_key, const char *name, int name_len, const char *data, int data_len, u8 type, void *ctx)
 

Enumerations

enum  inode_state {
  inode_state_no_change, inode_state_will_create, inode_state_did_create, inode_state_will_delete,
  inode_state_did_delete
}
 

Functions

int write_buf (struct file *filp, const void *buf, u32 len, loff_t *off)
 
long btrfs_ioctl_send (struct file *mnt_file, void __user *arg_)
 

Macro Definition Documentation

#define FS_PATH_INLINE_SIZE   (sizeof(struct fs_path) - offsetof(struct fs_path, inline_buf))

Definition at line 64 of file send.c.

#define SEND_CTX_MAX_NAME_CACHE_SIZE   128

Definition at line 77 of file send.c.

#define SEND_CTX_NAME_CACHE_CLEAN_SIZE   (SEND_CTX_MAX_NAME_CACHE_SIZE * 2)

Definition at line 78 of file send.c.

#define TLV_PUT (   sctx,
  attrtype,
  attrlen,
  data 
)
Value:
do { \
ret = tlv_put(sctx, attrtype, attrlen, data); \
if (ret < 0) \
goto tlv_put_failure; \
} while (0)

Definition at line 498 of file send.c.

#define TLV_PUT_BTRFS_TIMESPEC (   sctx,
  attrtype,
  eb,
  ts 
)
Value:
do { \
ret = tlv_put_btrfs_timespec(sctx, attrtype, eb, ts); \
if (ret < 0) \
goto tlv_put_failure; \
} while (0)

Definition at line 541 of file send.c.

#define TLV_PUT_INT (   sctx,
  attrtype,
  bits,
  value 
)
Value:
do { \
ret = tlv_put_u##bits(sctx, attrtype, value); \
if (ret < 0) \
goto tlv_put_failure; \
} while (0)

Definition at line 505 of file send.c.

#define TLV_PUT_PATH (   sctx,
  attrtype,
  p 
)
Value:
do { \
ret = tlv_put_string(sctx, attrtype, p->start, \
p->end - p->start); \
if (ret < 0) \
goto tlv_put_failure; \
} while(0)

Definition at line 522 of file send.c.

#define TLV_PUT_STRING (   sctx,
  attrtype,
  str,
  len 
)
Value:
do { \
ret = tlv_put_string(sctx, attrtype, str, len); \
if (ret < 0) \
goto tlv_put_failure; \
} while (0)

Definition at line 516 of file send.c.

#define TLV_PUT_TIMESPEC (   sctx,
  attrtype,
  ts 
)
Value:
do { \
ret = tlv_put_timespec(sctx, attrtype, ts); \
if (ret < 0) \
goto tlv_put_failure; \
} while (0)

Definition at line 535 of file send.c.

#define TLV_PUT_U16 (   sctx,
  attrtype,
  data 
)    TLV_PUT_INT(sctx, attrtype, 16, data)

Definition at line 513 of file send.c.

#define TLV_PUT_U32 (   sctx,
  attrtype,
  data 
)    TLV_PUT_INT(sctx, attrtype, 32, data)

Definition at line 514 of file send.c.

#define TLV_PUT_U64 (   sctx,
  attrtype,
  data 
)    TLV_PUT_INT(sctx, attrtype, 64, data)

Definition at line 515 of file send.c.

#define TLV_PUT_U8 (   sctx,
  attrtype,
  data 
)    TLV_PUT_INT(sctx, attrtype, 8, data)

Definition at line 512 of file send.c.

#define TLV_PUT_UUID (   sctx,
  attrtype,
  uuid 
)
Value:
do { \
ret = tlv_put_uuid(sctx, attrtype, uuid); \
if (ret < 0) \
goto tlv_put_failure; \
} while (0)

Definition at line 529 of file send.c.

#define verbose_printk (   ...)    if (g_verbose) printk(__VA_ARGS__)

Definition at line 39 of file send.c.

Typedef Documentation

typedef int(* iterate_dir_item_t)(int num, struct btrfs_key *di_key, const char *name, int name_len, const char *data, int data_len, u8 type, void *ctx)

Definition at line 864 of file send.c.

typedef int(* iterate_inode_ref_t)(int num, u64 dir, int index, struct fs_path *p, void *ctx)

Definition at line 743 of file send.c.

Enumeration Type Documentation

Enumerator:
inode_state_no_change 
inode_state_will_create 
inode_state_did_create 
inode_state_will_delete 
inode_state_did_delete 

Definition at line 1431 of file send.c.

Function Documentation

long btrfs_ioctl_send ( struct file mnt_file,
void __user arg_ 
)

Definition at line 4529 of file send.c.

int write_buf ( struct file filp,
const void buf,
u32  len,
loff_t *  off 
)

Definition at line 389 of file send.c.