shithub: gefs

Download patch

ref: 5df01f8986e0256e7c5c0e657195892b3ca9daab
parent: 1a98d4fe239089d86ff0e45939e98a40ccf025ea
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Nov 5 16:16:43 EST 2023

check: show more info on what we're checking

--- a/check.c
+++ b/check.c
@@ -70,6 +70,7 @@
 				fprint(fd, "freed block in use: %llx\n", bp.addr);
 				fail++;
 			}
+print("get %B\n", bp);
 			if((c = getblk(bp, 0)) == nil){
 				fprint(fd, "corrupt block: %r\n");
 				fail++;
@@ -187,8 +188,10 @@
 	Blk *b;
 
 	ok = 1;
+	fprint(fd, "checking freelist\n");
 	if(badfree())
 		ok = 0;
+	fprint(fd, "checking snap tree\n");
 	if((b = getroot(&fs->snap, &height)) != nil){
 		if(badtree(fd, b, height-1, nil, 0))
 			ok = 0;
@@ -210,6 +213,7 @@
 			break;
 		memcpy(name, s.kv.k+1, s.kv.nk-1);
 		name[s.kv.nk-1] = 0;
+		fprint(fd, "checking snap %s\n", name);
 		if((t = opensnap(name, nil)) == nil){
 			fprint(2, "invalid snap label %s\n", name);
 			ok = 0;