ref: 86dc77e8c33453679bc487c638b0f2d01f0e1f05
parent: 0d61797ee0b0e15e6fb07823ef42c1d5b5a62bb6
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Nov 26 11:19:36 EST 2025
gefs: wait for epoch before freeing snapdl freedl() doesn't participate in EBR becasue it assumes cleaning up a snapshot is only done when a snapshot is fully inaccessible, but that's not entirely true for the snap tree -- so we need to wait for all readers to advance the epoch before we finish the cleanup. This should be fine, since we're not blocking any of the mutator procs at this point.
--- a/sys/src/cmd/gefs/fs.c
+++ b/sys/src/cmd/gefs/fs.c
@@ -207,6 +207,7 @@
*/
tracem("snapdl");wrwait();
+ epochwait();
freedl(&dl, 1);
qunlock(&fs->synclk);
tracem("synced");--
⑨