From: Yan, Zheng Date: Thu, 26 Feb 2015 04:03:23 +0000 (+0800) Subject: doc: MDS internal data structure X-Git-Tag: v9.0.0~201^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3668%2Fhead;p=ceph.git doc: MDS internal data structure Signed-off-by: Yan, Zheng --- diff --git a/doc/dev/index.rst b/doc/dev/index.rst index 169bf6f3b61..f18adaee0c5 100644 --- a/doc/dev/index.rst +++ b/doc/dev/index.rst @@ -35,4 +35,5 @@ in the body of the message. * osd_internals/index* + mds_internals/index* radosgw/index* diff --git a/doc/dev/mds_internals/data-structures.rst b/doc/dev/mds_internals/data-structures.rst new file mode 100644 index 00000000000..6d0491df0e4 --- /dev/null +++ b/doc/dev/mds_internals/data-structures.rst @@ -0,0 +1,36 @@ +MDS internal data structures +============================== + +*CInode* + CInode contains the metadata of a file, there is one CInode for each file. + The CInode stores information like who owns the file, how big the file is. + +*CDentry* + CDentry is the glue that holds inodes and files together by relating inode to + file/directory names. A CDentry links to at most one CInode (it may not link + to any CInode). A CInode may be linked by multiple CDentries. + +*CDir* + CDir only exists for directory inode, it's used to link CDentries under the + directory. A CInode can have multiple CDir when the directory is fragmented. + +These data structures are linked together as: + + CInode + CDir + | \ + | \ + | \ + CDentry CDentry + CInode CInode + CDir CDir + | | \ + | | \ + | | \ + CDentry CDentry CDentry + CInode CInode CInode + +As this doc is being written, size of CInode is about 1400 bytes, size of CDentry +is about 400 bytes, size of CDir is about 700 bytes. These data structures are +quite large. Please be careful if you want to add new fields to them. + diff --git a/doc/dev/mds_internals/index.rst b/doc/dev/mds_internals/index.rst new file mode 100644 index 00000000000..c8c82ad10da --- /dev/null +++ b/doc/dev/mds_internals/index.rst @@ -0,0 +1,10 @@ +============================== +MDS developer documentation +============================== + +.. rubric:: Contents + +.. toctree:: + :glob: + + *