retrymount code review request
Hi!
I'd like to ask for code review for my retrymount tool:
http://code.google.com/p/inferno-contrib-retrymount/source/browse/appl/cmd/retrymount.b
It act as wrapper/proxy for mount to be able to detect broken connection
and restart mount.
I don't wanna overcomplicate things trying to hide the fact of broken
connection from applications which use files mounted using this connection -
it's fine for me if application will receive file i/o errors in this case.
But if application able to recover after such error, I'd like to let it
try to re-open these files again and again until success and continue i/o
with these files. I.e. application shouldn't bother about remounting
resources - actually it shouldn't even know these resources was mounted
from somewhere. It just work with files while it's possible and if error
happens it just try to recover after errors, reopen files and continue
it's work, if possible.
Problem is, I've seen few times on production servers the connection
wasn't remounted by this tool after error. This happens just a few times
in last year, and I was unable to catch this bug. Looking at code I can't
even imagine how this may happens. But it happened, so probably I miss
something. Or this happens because of bug in Inferno, not in my code - but
I hope this isn't the case.
So, if anyone will have spare time, please take a look at the code, maybe
you'll got idea how this bug may happens. Maybe I just misunderstand
something important and trying to solve this issue in wrong way.
(Continue reading)