From: Patrick Donnelly Date: Wed, 23 Oct 2024 18:01:41 +0000 (-0400) Subject: mds: inherit charmap on mkdir X-Git-Tag: v20.0.0^2~36 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=033d8666373f239b18d52f3fd8c350148ba4f4a1;p=ceph.git mds: inherit charmap on mkdir Signed-off-by: Patrick Donnelly Fixes: https://tracker.ceph.com/issues/66373 --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 6e106230bf9bd..12ae35eb2606d 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -7235,11 +7235,16 @@ void Server::handle_client_mkdir(const MDRequestRef& mdr) // it's a directory. dn->push_projected_linkage(newi); - auto _inode = newi->_get_inode(); + auto* _inode = newi->_get_inode(); _inode->version = dn->pre_dirty(); _inode->rstat.rsubdirs = 1; _inode->accounted_rstat = _inode->rstat; _inode->update_backtrace(); + if (auto* csp = diri->get_charmap()) { + dout(20) << " with " << *csp << dendl; + auto& c = _inode->set_charmap(); + c = *csp; + } snapid_t follows = mdcache->get_global_snaprealm()->get_newest_seq(); SnapRealm *realm = dn->get_dir()->inode->find_snaprealm();