ref: f5e421deff7f2278fd3a937241dc64aaf25a8a32
parent: ecf4557d007dcd4a34433b489e382842ccf37029
author: Ori Bernstein <ori@eigenstate.org>
date: Sat May 27 20:52:11 EDT 2023
main: add option to check fs on startup useful for test scripts
--- a/fs.c
+++ b/fs.c
@@ -2068,10 +2068,11 @@
void
runfs(int, void *pc)
{
+ char err[128];
+ long old;
+ u32int h;
RWLock *lk;
Conn *c;
- u32int h;
- char err[128];
Fcall r;
Fmsg *m;
@@ -2093,7 +2094,10 @@
}
dprint("← %F\n", &m->Fcall);
- assert(asetl(&tagtab[m->tag], m->type) == 0);
+ if((old = asetl(&tagtab[m->tag], m->type)) != 0){
+ fprint(2, "dup incoming tag: %d [type=%ld]\n", m->tag, old);
+ abort();
+ }
lk = &fs->flushq[ihash(m->tag) % Nflushtab];
if(m->type == Tflush)
wlock(lk);