Commit 82d4bdc7 authored by Andreas Joachim Peters's avatar Andreas Joachim Peters Committed by Elvin Sindrilaru

FUSEX: detach deletion dir from its parent in 'rm -rf' to prevent that we can…

FUSEX: detach deletion dir from its parent in 'rm -rf' to prevent that we can still access a tree which has been moved into the recycle bin when the remote operation takes long
parent c7cf9dc7
Pipeline #429983 failed with stages
in 15 minutes 10 seconds
......@@ -2024,11 +2024,11 @@ EosFuse::opendir(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi)
if (isRecursiveRm(req, true, true) &&
Instance().Config().options.rm_rf_bulk) {
eos_static_warning("Running recursive rm (pid = %d)", fuse_req_ctx(req)->pid);
md = Instance().mds.get(req, ino);
if (md && md->attr().count("sys.recycle")) {
eos_static_warning("Running recursive rm (pid = %d)", fuse_req_ctx(req)->pid);
// bulk rm only when a recycle bin is configured
{
XrdSysMutexHelper mLock(md->Locker());
......@@ -2041,6 +2041,12 @@ EosFuse::opendir(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info* fi)
if (!rc) {
// invalide this directory
Instance().mds.cleanup(md);
metad::shared_md pmd = Instance().mds.getlocal(req, md->pid());
if (pmd) {
pmd->local_children().erase(md->name());
pmd->mutable_children()->erase(md->name());
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment