]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: MDS internal data structure 3668/head
authorYan, Zheng <zyan@redhat.com>
Thu, 26 Feb 2015 04:03:23 +0000 (12:03 +0800)
committerYan, Zheng <zyan@redhat.com>
Fri, 27 Feb 2015 00:48:13 +0000 (08:48 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
doc/dev/index.rst
doc/dev/mds_internals/data-structures.rst [new file with mode: 0644]
doc/dev/mds_internals/index.rst [new file with mode: 0644]

index 169bf6f3b6175ef63abd39f83cfabfb3103d809a..f18adaee0c549d857d71735eb7e300a61397dd67 100644 (file)
@@ -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 (file)
index 0000000..6d0491d
--- /dev/null
@@ -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 (file)
index 0000000..c8c82ad
--- /dev/null
@@ -0,0 +1,10 @@
+==============================
+MDS developer documentation
+==============================
+
+.. rubric:: Contents
+
+.. toctree::
+   :glob:
+
+   *