> If i save the offset adjustment in f->aux or simmilar, 
> i can calculate the real file offset on the next T-reads, 
> but that will only work if one client reads it at one time. 

No it won't.  Even if just one client is reading, that client might seek.

You could assume that most reads will pick up where the
last one left off, and use f->aux to point at a single hint
that you can check.  Maybe you're willing to do more work
if you do get a seek.  Otherwise you'll need to build a more
complex data structure to help you map between the two.

Also, if f is a Fid* (not a File*), then you get a different f for each
different Topen of the file (and thus also for each client), so the
hint-per-Fid usually works pretty well in practice for this kind
of thing.

Russ


Reply via email to