shithub: gefs

Download patch

ref: 66a2bf506102bfc0119f8899b997d0f0be8cebfb
parent: 05420abe523462b2fef257fb43cee02c9bb218b7
author: Ori Bernstein <ori@eigenstate.org>
date: Thu Nov 9 00:09:14 EST 2023

ream: fix initial snapshot refcounts

this doesn't matter because the empty snap can never be
renamed, moved, or deleted, but it's nice to have it correct
regardless

--- a/ream.c
+++ b/ream.c
@@ -117,8 +117,8 @@
 	kv.v = p;
 	memset(&t, 0, sizeof(Tree));
 	t.flag = Tforked;
-	t.nref = 1;
-	t.nlbl = 2;
+	t.nref = 2;
+	t.nlbl = 1;
 	t.ht = 1;
 	t.gen = fs->nextgen++;
 	t.pred = 0;