From 5e79179d2b6f53052fab883d5d0de4c2b5d13fc5 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Tue, 3 Apr 2018 17:01:52 +0800 Subject: [PATCH] mds: PendingReleaseNotes and dev doc for open file table Fixes: http://tracker.ceph.com/issues/23532 Signed-off-by: "Yan, Zheng" --- PendingReleaseNotes | 5 +++++ doc/dev/mds_internals/data-structures.rst | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 9f3da71b664b7..4f1d6e4178387 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -38,6 +38,11 @@ mds_session_timeout, mds_session_autoclose, and mds_max_file_size are now obsolete. + * Each mds rank now maintains a table that tracks open files and their + ancestor directories. Recovering MDS can quickly get open files' pathes, + significantly reducing the time of loading inodes for open files. MDS + creates the table automatically if it does not exist. + * *RBD* * The RBD C API's rbd_discard method now enforces a maximum length of diff --git a/doc/dev/mds_internals/data-structures.rst b/doc/dev/mds_internals/data-structures.rst index 1197b62f3a4b9..f06727166fc6a 100644 --- a/doc/dev/mds_internals/data-structures.rst +++ b/doc/dev/mds_internals/data-structures.rst @@ -34,3 +34,11 @@ As this doc is being written, size of CInode is about 1400 bytes, size of CDentr 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. +*OpenFileTable* + Open file table tracks open files and their ancestor directories. Recovering + MDS can easily get open files' pathes, significantly reducing the time of + loading inodes for open files. Each entry in the table corresponds to an inode, + it records linkage information (parent inode and dentry name) of the inode. MDS + can constructs the inode's path by recursively lookup parent inode's linkage. + Open file table is stored in omap of RADOS objects, table entries correspond to + KV pairs in omap. -- 2.39.5