shithub: gefs

Download patch

ref: 73995a559cd5864886100e5a225db0a58638790b
parent: a4bafdabf7903cd35a2918db44991ab1a20421eb
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Dec 10 11:33:14 EST 2023

stats: remove useless/never updated info

--- a/cons.c
+++ b/cons.c
@@ -193,18 +193,6 @@
 }
 
 static void
-stats(int fd, char**, int)
-{
-	Stats *s;
-
-	s = &fs->stats;
-	fprint(fd, "stats:\n");
-	fprint(fd, "	cache hits:	%lld\n", s->cachehit);
-	fprint(fd, "	cache lookups:	%lld\n", s->cachelook);
-	fprint(fd, "	cache ratio:	%f\n", (double)s->cachehit/(double)s->cachelook);
-}
-
-static void
 showdf(int fd, char**, int)
 {
 	char *units[] = {"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", nil};
@@ -290,7 +278,6 @@
 	{.name="help",		.sub=nil,	.minarg=0, .maxarg=0, .fn=help},
 	{.name="permissive",	.sub=nil,	.minarg=1, .maxarg=1, .fn=permflip},
 	{.name="snap",		.sub=nil,	.minarg=1, .maxarg=3, .fn=snapfs},
-	{.name="stats", 	.sub=nil,	.minarg=0, .maxarg=0, .fn=stats},
 	{.name="sync",		.sub=nil,	.minarg=0, .maxarg=0, .fn=syncfs},
 	{.name="users",		.sub=nil,	.minarg=0, .maxarg=1, .fn=refreshusers},
 
--- a/dat.h
+++ b/dat.h
@@ -24,7 +24,6 @@
 typedef struct Dlist	Dlist;
 typedef struct Mount	Mount;
 typedef struct User	User;
-typedef struct Stats	Stats;
 typedef struct Conn	Conn;
 
 enum {
@@ -476,11 +475,6 @@
 	int	heapsz;
 };
 
-struct Stats {
-	vlong	cachehit;
-	vlong	cachelook;
-};
-
 /*
  * Overall state of the file sytem.
  * Shadows the superblock contents.
@@ -566,7 +560,6 @@
 
 	RWLock	flushq[Nflushtab];
 	int	flushop[Nflushtab];
-	Stats	stats;
 };
 
 struct Arena {