From 1999aae995dd9a5c17fa40316d618585b8b7674f Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Fri, 1 Feb 2013 15:56:22 +0800 Subject: Btrfs-progs: move struct root_info to btrfs-list.h As we would add more ways to list and manage the subvols and snapshots, its better if we have struct root_info defined in the header file. Signed-off-by: Anand Jain --- btrfs-list.h | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) (limited to 'btrfs-list.h') diff --git a/btrfs-list.h b/btrfs-list.h index dc18ee4..f945734 100644 --- a/btrfs-list.h +++ b/btrfs-list.h @@ -18,7 +18,52 @@ #include "kerncompat.h" -struct root_info; +/* + * one of these for each root we find. + */ +struct root_info { + struct rb_node rb_node; + struct rb_node sort_node; + + /* this root's id */ + u64 root_id; + + /* equal the offset of the root's key */ + u64 root_offset; + + /* flags of the root */ + u64 flags; + + /* the id of the root that references this one */ + u64 ref_tree; + + /* the dir id we're in from ref_tree */ + u64 dir_id; + + u64 top_id; + + /* generation when the root is created or last updated */ + u64 gen; + + /* creation generation of this root in sec*/ + u64 ogen; + + /* creation time of this root in sec*/ + time_t otime; + + u8 uuid[BTRFS_UUID_SIZE]; + u8 puuid[BTRFS_UUID_SIZE]; + + /* path from the subvol we live in to this root, including the + * root's name. This is null until we do the extra lookup ioctl. + */ + char *path; + + /* the name of this root in the directory it lives in */ + char *name; + + char *full_path; +}; typedef int (*btrfs_list_filter_func)(struct root_info *, u64); typedef int (*btrfs_list_comp_func)(struct root_info *, struct root_info *, -- cgit v1.2.1