Commit ee95848d authored by Phoebe Buckheister's avatar Phoebe Buckheister Committed by Bernd Lietzow

meta: lock disposed files during unlink-after-client-removal

removing a client from the system causes the meta server to close file
handles held by that client. if any file handle refers to an unlinked
file, that close may remove the file from its disposal directory. if
unlink and close happen simultaneously they can then race with each
other, with unlink adding the file to disposal and adding a "changed
file" modsync event, and close removing the file before the "changed"
event was synced. this causes the resync to abort with modsync errors
parent 8e371141
......@@ -589,6 +589,8 @@ void InternodeSyncer::syncClients(const std::vector<NodeHandle>& clientsList, bo
EntryInfo* entryInfo = sessionFile->getEntryInfo();
FileIDLock lock(sessions->getEntryLockStore(), entryInfo->getEntryID());
MsgHelperClose::closeChunkFile(sessionID, fileHandleID.c_str(),
maxUsedNodesIndex, *inode, entryInfo, NETMSG_DEFAULT_USERID);
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