]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: create only one ESubtreeMap during fs creation
authorSage Weil <sage@inktank.com>
Sat, 17 Aug 2013 05:08:00 +0000 (22:08 -0700)
committerSage Weil <sage@inktank.com>
Sat, 17 Aug 2013 05:08:00 +0000 (22:08 -0700)
commit4fd34befd5b626b5baeba91cd23b5478b60529d0
tree3df6edda3cc4c78705c434132049081a552ad1c3
parent6bb7c625285cf8482db72946f796c702fe7d8502
mds: create only one ESubtreeMap during fs creation

Previously we would create an empty ESubtreeMap when we opened the log
segment and then immediately journal a second one that created the root
and mdsdir.  More importantly, for the second ESubtreeMap, we would not
wait for it to commit before requesting the ACTIVE state, leading to
#4894.

Instead, break start_new_segment() into two steps: one that creates the
in-memory LogSegment tracking structure, and one that journals the
ESubtreeMap.  Open things early and write the (one) ESubtreeMap at the
end of boot_create().. and then wait for it.

Fixes: #4894
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDLog.cc
src/mds/MDLog.h
src/mds/MDS.cc