ref: d1a51cc02a74d6f9b19451d1a16b92c7b83b2889
parent: 3b48c49025b592ef59724e864e0c01d03680b070
author: Ori Bernstein <ori@eigenstate.org>
date: Sun May 7 11:56:09 EDT 2023
fs: handle clobbering and renaming files more correctly this change addresses two issues: first, when creating a file, we used to simply send a Oinsert down the tree, which meant that if the message had propagated to a leaf, and we did a remove for each fid that had a reference, we may remove the first instance, and then blow up that a second did not exist. that when removing it via 2 fids, we may remove the first and then assert when we remove the second. second, when renaming over an existing dir, we may leak the old blocks and lose the '..' link that we need to refer to files relative to the dir.