shithub: gefs

Download patch

ref: f625f5ccc37f9b5a8155e3bdfff8899f9215dffd
parent: f9ba748e3856172c4b5e0026bf1049706a83a520
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Feb 17 20:05:34 EST 2024

snap: put reclaim fix back in place

--- a/snap.c
+++ b/snap.c
@@ -310,8 +310,8 @@
 	assert(nm <= nelem(m));
 	dlsync();
 	btupsert(&fs->snap, m, nm);
-	reclaimblocks(t->gen, succ, t->pred);
 	if(deltree){
+		reclaimblocks(t->gen, succ, t->pred);
 		for(mnt = agetp(&fs->mounts); mnt != nil; mnt = mnt->next){
 			if(mnt->root->gen == t->succ)
 				mnt->root->pred = t->pred;