From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx> Rename operation can call predirty_journal_parents() several times. So a directory fragment's rstat can also be modified several times. But only the first modification is journaled because EMetaBlob::add_dir() does not update existing dirlump. For example: when hanlding 'mv a/b/c a/c', Server::_rename_prepare may first decrease directory a and b's nested files count by one, then increases directory a's nested files count by one. Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx> --- src/mds/events/EMetaBlob.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mds/events/EMetaBlob.h b/src/mds/events/EMetaBlob.h index 9c281e9..116b704 100644 --- a/src/mds/events/EMetaBlob.h +++ b/src/mds/events/EMetaBlob.h @@ -635,12 +635,12 @@ private: dirty, complete, isnew); } dirlump& add_dir(dirfrag_t df, fnode_t *pf, version_t pv, bool dirty, bool complete=false, bool isnew=false) { - if (lump_map.count(df) == 0) { + if (lump_map.count(df) == 0) lump_order.push_back(df); - lump_map[df].fnode = *pf; - lump_map[df].fnode.version = pv; - } + dirlump& l = lump_map[df]; + l.fnode = *pf; + l.fnode.version = pv; if (complete) l.mark_complete(); if (dirty) l.mark_dirty(); if (isnew) l.mark_new(); -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html