~kvik/unionfs

c29f9884bb2aba8ac6a2b9286d582ba86dd61ae1 — kvik 3 years ago c1eed33 master
Remove flush note retry loop

The retry loop was intended to make sure that we flush the
process, but the approach is very brittle. For one, user none
isn't allowed to send notes at all which would cause this
loop to get stuck forever.

For now, flushing isn't going to work at all if you run unionfs
under 'none'.
1 files changed, 4 insertions(+), 3 deletions(-)

M unionfs.c
M unionfs.c => unionfs.c +4 -3
@@ 341,9 341,10 @@ fsflush(Req *r)
	case Tread:
	case Twrite:
		f->flushed = 1;
		while(postnote(PNPROC, f->pid, "flush") != 0)
			sleep(100);
		respond(r->oldreq, "interrupted");
		if(postnote(PNPROC, f->pid, "flush") == 0)
			respond(r->oldreq, "interrupted");
		else
			fprint(2, "fsflush: %r");
	}
	respond(r, nil);
}