From c29f9884bb2aba8ac6a2b9286d582ba86dd61ae1 Mon Sep 17 00:00:00 2001 From: kvik Date: Fri, 6 Aug 2021 16:37:29 +0000 Subject: [PATCH] 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'. --- unionfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/unionfs.c b/unionfs.c index 811614d..0965bd9 100644 --- a/unionfs.c +++ b/unionfs.c @@ -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); } -- 2.45.2