struct seen_fsid {
u8 fsid[BTRFS_FSID_SIZE];
struct seen_fsid *next;
+ DIR *dirstream;
+ int fd;
};
int btrfs_make_root_dir(struct btrfs_trans_handle *trans,
int get_fsid(const char *path, u8 *fsid, int silent);
int is_seen_fsid(u8 *fsid, struct seen_fsid *seen_fsid_hash[]);
-int add_seen_fsid(u8 *fsid, struct seen_fsid *seen_fsid_hash[]);
+int add_seen_fsid(u8 *fsid, struct seen_fsid *seen_fsid_hash[],
+ int fd, DIR *dirstream);
void free_seen_fsid(struct seen_fsid *seen_fsid_hash[]);
int get_label(const char *btrfs_dev, char *label);
int string_is_numerical(const char *str);
int prefixcmp(const char *str, const char *prefix);
+unsigned long total_memory(void);
+
/*
* Global program state, configurable by command line and available to
* functions without extra context passing.