-
Notifications
You must be signed in to change notification settings - Fork 6
/
ops.txt
64 lines (50 loc) · 1.92 KB
/
ops.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Operations
Chunk tree ops
CTOP_LOAD: Loads items from the chunk tree into the chunkTree vector
CTOP_DUMP_TREE: Dumps the entire chunk tree to stdout
Root tree ops
RTOP_LOAD: Loads items from the root tree into the rootTree vector
RTOP_DUMP_TREE: Dumps the entire root tree to stdout
RTOP_DEFAULT_SUBVOL: Finds the default subvolume and sets it as the subvolume to mount
RTOP_GET_SUBVOL_ID: Returns the object ID for a given subvolume name
Inputs:
[0] const char * subvolume name
Outputs:
[0] BtrfsObjID * ptr to subvol's object ID
RTOP_SUBVOL_EXISTS: Returns a boolean indicating whether the given subvolume ID exists
Inputs:
[0] const BtrfsObjID * subvolume ID
Outputs:
[0] bool * whether it exists
RTOP_GET_ADDR: Returns the address of the root node of a given tree
Inputs:
[0] const BtrfsObjID * tree ID
Outputs:
[0] LogiAddr * logical address
RTOP_DUMP_SUBVOLS: Finds each subvolume and runs an FSOP_DUMP_TREE on each
FS tree ops
FSOP_NAME_TO_ID: Finds the object ID for a named file or dir
Inputs:
[0] const BtrfsObjID * parent's object ID
[1] const unsigned int * hash of the child file/dir's name
[2] const char * child file/dir's name
Outputs:
[0] BtrfsObjID * child's object ID
[1] bool * whether child is a subvolume
FSOP_DUMP_TREE: Dumps the entire FS tree to stdout
FSOP_GET_FILE_PKG: Returns a FilePkg struct containing information about a file from its object ID
Inputs:
[0] const BtrfsObjID * object ID
Outputs:
[0] FilePkg * FilePkg struct to fill
FSOP_DIR_LIST: Performs a directory listing of the dir represented by the object ID given in one step
Inputs:
[0] const FilePkg * FilePkg struct associated with the directory
[1] const bool * whether this directory is the root (the root of the _mounted_ subvolume)
Outputs:
[0] DirList * DirList struct to fill
FSOP_GET_INODE: Gets an inode with the specified object ID
Inputs:
[0] const BtrfsObjID * file's object ID
Outputs:
[0] BtrfsInodeItem * inode