Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jan 1997 14:10:39 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        stesin@gu.net (Andrew Stesin)
Cc:        karpen@ocean.campus.luth.se, hackers@freebsd.org
Subject:   Re: truss, trace ??
Message-ID:  <199701132110.OAA28246@phaeton.artisoft.com>
In-Reply-To: <Pine.BSF.3.95.970113200556.6769N-100000@trifork.gu.net> from "Andrew Stesin" at Jan 13, 97 08:07:42 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> On Sun, 12 Jan 1997, Mikael Karpberg wrote:
> > > Yeah, the cyclic file type is (stupidly) missing from unix.
> 
> [...]
> 
> > Or? Am I completely off line here?
> 
> 	No you aren't.  I was thinking on it for years... but
> 	not enough hacking skills to do it actually.

Cyclic file types imply record orientation.

They do this because you want to remove an atomic record each time
from the front of the file in order to add your record to the end
of the file.

For wtmp style logs, the records are not variable length, so you
are pretty much OK.

For console logs and message logs, however, you are pretty much
screwed.

One problem is that the underlying storage is block instead of record
oriented anyway.  On a VMS system, you'd write a new record and
modify an index; on a UNIX system, you would need to be able to
instert blocks at the end of the block list (which you can do) and
to collapse the block list up (which you can't do, currently).

In addition, you would need to be able to have the first block
of the file be a right-associative (fill-to-end) instead of a
standard left associative (fill-from-start-to-n-bytes) frag.  The
associativity is important to save copies, and since the truncate
from front for the cyclic behavior would result in frags which
shrink over time instead of frags which grow over time.

All of this is possible, it's just not very pretty, and it doesn't
fit in very well with the allocation of indirect blocks... you would
need to (effectively) push all pointers up through the small number
of direct blocks at the front of the file, as you cycled data through.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701132110.OAA28246>