|
From: | Ognyan Kulev |
Subject: | Re: rollover translator |
Date: | Sun, 31 Oct 2004 09:51:29 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 |
Alfred M. Szmidt wrote:
I got this funky idea today, but I'm not sure what would be the best way to implement it. What it would essentially do is provide a "circular file", so when you get to the end of the file you start from position 0. With the nice option that if you do roll over, you can clear the all stored contents and re-start with a "blank file".
I'm not sure if POSIX allows filesystem (by its own will) to change file offset of user file descriptor.
Another possible implementation is to use sparse blocks: keeping everything before the last X bytes to be sparse blocks. So file will be huge, but only the part we are interested in is saved physically. But I think we don't have RPC that make sparse blocks inside file, not sure though.
Regards, ogi
[Prev in Thread] | Current Thread | [Next in Thread] |