Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / doc / dev / mds_internals / data-structures.rst
1 MDS internal data structures
2 ==============================
3
4 *CInode*
5   CInode contains the metadata of a file, there is one CInode for each file.
6   The CInode stores information like who owns the file, how big the file is.
7
8 *CDentry*
9   CDentry is the glue that holds inodes and files together by relating inode to
10   file/directory names. A CDentry links to at most one CInode (it may not link
11   to any CInode). A CInode may be linked by multiple CDentries.
12
13 *CDir*
14   CDir only exists for directory inode, it's used to link CDentries under the
15   directory. A CInode can have multiple CDir when the directory is fragmented.
16
17 These data structures are linked together as::
18
19   CInode
20   CDir
21    |   \
22    |      \
23    |         \
24   CDentry   CDentry
25   CInode    CInode
26   CDir      CDir
27    |         |  \
28    |         |     \
29    |         |        \
30   CDentry   CDentry  CDentry
31   CInode    CInode   CInode
32
33 As this doc is being written, size of CInode is about 1400 bytes, size of CDentry
34 is about 400 bytes, size of CDir is about 700 bytes. These data structures are
35 quite large. Please be careful if you want to add new fields to them.
36