summaryrefslogtreecommitdiffstats
path: root/src/mds/CDir.cc
diff options
context:
space:
mode:
authorXiubo Li <xiubli@redhat.com>2021-09-15 14:58:22 +0200
committerXiubo Li <xiubli@redhat.com>2023-05-05 12:46:01 +0200
commita8c63c7919a78497190995b1a542fbcc05e68d92 (patch)
tree5dd02c122d76d012df364b5d5f626755c40db880 /src/mds/CDir.cc
parentMerge pull request #51348 from jamesorlakin/hotfix/doc-weightset-osd-tree-com... (diff)
downloadceph-a8c63c7919a78497190995b1a542fbcc05e68d92.tar.xz
ceph-a8c63c7919a78497190995b1a542fbcc05e68d92.zip
mds: do not take the ino which has been used
When replaying the journals, if the inodetable or the sessionmap versions do not match, the CInode will be added to the inode_map, but the ino may still be in the inodetable or sessions' prealloc inos list. So when allocating new CInode we should skip them. Fixes: https://tracker.ceph.com/issues/52280 Signed-off-by: Xiubo Li <xiubli@redhat.com>
Diffstat (limited to 'src/mds/CDir.cc')
-rw-r--r--src/mds/CDir.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc
index 0a2edd60eb4..ca0c2ec17f0 100644
--- a/src/mds/CDir.cc
+++ b/src/mds/CDir.cc
@@ -1950,6 +1950,7 @@ CDentry *CDir::_load_dentry(
if (!undef_inode) {
mdcache->add_inode(in); // add
+ mdcache->insert_taken_inos(in->ino());
dn = add_primary_dentry(dname, in, std::move(alternate_name), first, last); // link
}
dout(12) << "_fetched got " << *dn << " " << *in << dendl;