shithub: gefs

Download patch

ref: 25cc2858183091d1450288a17587b601510d61ba
parent: e3c68a8e1bb6c6a40622ec5efc88dcfcc0714d0c
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jan 7 22:01:52 EST 2024

fs: consistent terminology -- mutator proc.

--- a/fns.h
+++ b/fns.h
@@ -202,7 +202,7 @@
 void*	chrecv(Chan*);
 void	chsend(Chan*, void*);
 void	runfs(int, void*);
-void	runwrite(int, void*);
+void	runmutate(int, void*);
 void	runread(int, void*);
 void	runcons(int, void*);
 void	runtasks(int, void*);
--- a/fs.c
+++ b/fs.c
@@ -2206,7 +2206,7 @@
 }
 
 void
-runwrite(int id, void *)
+runmutate(int id, void *)
 {
 	Fmsg *m;
 	Amsg *a;
@@ -2234,6 +2234,7 @@
 
 		qlock(&fs->mutlk);
 		epochstart(id);
+		fs->snap.dirty = 1;
 		switch(m->type){
 		case Tcreate:	fscreate(m);		break;
 		case Twrite:	fswrite(m, id);		break;
@@ -2245,7 +2246,7 @@
 		assert(estacksz() == 0);
 		epochend(id);
 		epochclean();
- 		qunlock(&fs->mutlk);
+		qunlock(&fs->mutlk);
 
 		if(a != nil)
 			chsend(fs->admchan, a);
--- a/main.c
+++ b/main.c
@@ -402,7 +402,7 @@
 	srvfd = postfd(srvname, "", 0666);
 	ctlfd = postfd(srvname, ".cmd", 0600);
 	launch(runcons, (void*)ctlfd, "ctl");
-	launch(runwrite, nil, "mutate");
+	launch(runmutate, nil, "mutate");
 	launch(runsweep, nil, "sweep");
 	launch(runtasks, nil, "tasks");
 	for(i = 0; i < fs->nreaders; i++)