return NULL;
state->refs = 1;
state->state = 0;
- state->private = 0;
+ state->xprivate = 0;
return state;
}
ret = -ENOENT;
goto out;
}
- state->private = private;
+ state->xprivate = private;
out:
return ret;
}
ret = -ENOENT;
goto out;
}
- *private = state->private;
+ *private = state->xprivate;
out:
return ret;
}
u64 end;
int refs;
unsigned long state;
- u64 private;
+ u64 xprivate;
};
struct extent_buffer {
int set_extent_buffer_uptodate(struct extent_buffer *eb);
int clear_extent_buffer_uptodate(struct extent_io_tree *tree,
struct extent_buffer *eb);
-int set_state_private(struct extent_io_tree *tree, u64 start, u64 private);
-int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private);
+int set_state_private(struct extent_io_tree *tree, u64 start, u64 xprivate);
+int get_state_private(struct extent_io_tree *tree, u64 start, u64 *xprivate);
struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree,
u64 bytenr, u32 blocksize);
struct extent_buffer *find_first_extent_buffer(struct extent_io_tree *tree,
#include <linux/ioctl.h>
#include <time.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define BTRFS_IOCTL_MAGIC 0x94
#define BTRFS_VOL_NAME_MAX 255
#define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \
struct btrfs_ioctl_dev_replace_args)
+#ifdef __cplusplus
+}
+#endif
+
#endif
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
-#define LIST_POISON1 ((void *) 0x00100100)
-#define LIST_POISON2 ((void *) 0x00200200)
+#define LIST_POISON1 ((struct list_head *) 0x00100100)
+#define LIST_POISON2 ((struct list_head *) 0x00200200)
/*
* Simple doubly linked list implementation.
* the prev/next entries already!
*/
#ifndef CONFIG_DEBUG_LIST
-static inline void __list_add(struct list_head *new,
+static inline void __list_add(struct list_head *xnew,
struct list_head *prev,
struct list_head *next)
{
- next->prev = new;
- new->next = next;
- new->prev = prev;
- prev->next = new;
+ next->prev = xnew;
+ xnew->next = next;
+ xnew->prev = prev;
+ prev->next = xnew;
}
#else
-extern void __list_add(struct list_head *new,
+extern void __list_add(struct list_head *xnew,
struct list_head *prev,
struct list_head *next);
#endif
* This is good for implementing stacks.
*/
#ifndef CONFIG_DEBUG_LIST
-static inline void list_add(struct list_head *new, struct list_head *head)
+static inline void list_add(struct list_head *xnew, struct list_head *head)
{
- __list_add(new, head, head->next);
+ __list_add(xnew, head, head->next);
}
#else
-extern void list_add(struct list_head *new, struct list_head *head);
+extern void list_add(struct list_head *xnew, struct list_head *head);
#endif
* Insert a new entry before the specified head.
* This is useful for implementing queues.
*/
-static inline void list_add_tail(struct list_head *new, struct list_head *head)
+static inline void list_add_tail(struct list_head *xnew, struct list_head *head)
{
- __list_add(new, head->prev, head);
+ __list_add(xnew, head->prev, head);
}
/*
* Note: if 'old' was empty, it will be overwritten.
*/
static inline void list_replace(struct list_head *old,
- struct list_head *new)
+ struct list_head *xnew)
{
- new->next = old->next;
- new->next->prev = new;
- new->prev = old->prev;
- new->prev->next = new;
+ xnew->next = old->next;
+ xnew->next->prev = xnew;
+ xnew->prev = old->prev;
+ xnew->prev->next = xnew;
}
static inline void list_replace_init(struct list_head *old,
- struct list_head *new)
+ struct list_head *xnew)
{
- list_replace(old, new);
+ list_replace(old, xnew);
INIT_LIST_HEAD(old);
}
/**
extern struct rb_node *rb_last(struct rb_root *);
/* Fast replacement of a single node without remove/rebalance/add/rebalance */
-extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
+extern void rb_replace_node(struct rb_node *victim, struct rb_node *xnew,
struct rb_root *root);
static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
#ifndef SEND_STREAM_H_
#define SEND_STREAM_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct btrfs_send_ops {
int (*subvol)(const char *path, const u8 *uuid, u64 ctransid,
void *user);
int btrfs_read_and_process_send_stream(int fd,
struct btrfs_send_ops *ops, void *user);
+#ifdef __cplusplus
+}
+#endif
#endif /* SEND_STREAM_H_ */
#include "ctree.h"
#include "rbtree.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum subvol_search_type {
subvol_search_by_root_id,
subvol_search_by_uuid,
char *path_cat(const char *p1, const char *p2);
char *path_cat3(const char *p1, const char *p2, const char *p3);
+#ifdef __cplusplus
+}
+#endif
#endif /* SEND_UTILS_H_ */
#include "ctree.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define BTRFS_SEND_STREAM_MAGIC "btrfs-stream"
#define BTRFS_SEND_STREAM_VERSION 1
#ifdef __KERNEL__
long btrfs_ioctl_send(struct file *mnt_file, void __user *arg);
#endif
+
+#ifdef __cplusplus
+}
+#endif