From owner-freebsd-hackers Tue Jan 14 10:09:13 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA27128 for hackers-outgoing; Tue, 14 Jan 1997 10:09:13 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id KAA27123 for ; Tue, 14 Jan 1997 10:09:10 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA00177; Tue, 14 Jan 1997 10:54:58 -0700 From: Terry Lambert Message-Id: <199701141754.KAA00177@phaeton.artisoft.com> Subject: Re: truss, trace ?? To: lada@ws2301.gud.siemens.co.at (Hr.Ladavac) Date: Tue, 14 Jan 1997 10:54:57 -0700 (MST) Cc: avalon@coombs.anu.edu.au, terry@lambert.org, stesin@gu.net, karpen@ocean.campus.luth.se, hackers@freebsd.org In-Reply-To: <199701141034.AA263998091@ws2301.gud.siemens.co.at> from "Hr.Ladavac" at Jan 14, 97 11:34:50 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > There is a rather simple way to satisfy most of these semantic requirements: > replace the leading blocks with holes--the file grows in the length, lseek > works as expected, but write is only guaranteed to succeed if it > fails in the last part of the file, and the filesystem occupancy does not > increase. read succeeds always, but sometimes it returns a buffer full of > (leading) zeros. This works, until you realize that you run linearly forward through the log file. I assume you steal space in the inode to store the offset of the first valid block in the file? A log file may very well contain valid NULL data... indistinguishable from a zero-fill block coming from the read of a hole. This does not address log files with internal structure boundries that do not allign to disk block boundries. Like wtmp. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.