home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vms
- Path: sparky!uunet!usc!sdd.hp.com!network.ucsd.edu!munnari.oz.au!uniwa!cujo!cc.curtin.edu.au!zrepachol
- From: zrepachol@cc.curtin.edu.au
- Subject: Semantics of append of files.
- Message-ID: <1992Dec29.004434.1@cc.curtin.edu.au>
- Lines: 38
- Sender: news@cujo.curtin.edu.au (News Manager)
- Organization: Curtin University of Technology
- References: <24DEC199220084219@spades.aces.com> <Bzt6EF.Est@dale.cts.com>,<1992Dec26.100030.299@rlgsc.com> <1hjmn7INN34t@gap.caltech.edu> <1992Dec27.100810.300@rlgsc.com>
- Date: Mon, 28 Dec 1992 15:44:34 GMT
-
- In article <1992Dec27.100810.300@rlgsc.com>, gezelter@rlgsc.com writes:
- > In article <1hjmn7INN34t@gap.caltech.edu>, carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
- >> In article <1992Dec26.100030.299@rlgsc.com>, gezelter@rlgsc.com writes:
- ...
- > Carl,
- >
- > I would be interested in hearing exactly what type of file that
- > you had that problem of partial blocks with. I have been using
- > this solution in a range of applications for about 15 years on
- > both RSX and VMS and have never encountered the behavior that you
- > describe.
- >
-
- Your example is a little bogus, as it only uses 1 block. The problem Carl
- refers to is a implementation detail to imcrease data integrity on an append.
-
- Remember that the data will look like:
- ...[record-size]lastrecord in file....[-1]0000000... to the end of the block.
-
- The end of file pointer should enable us to locate the [-1] record length
- ( no more data in this block ) word, but, where is the begining of the record?
- We will have to move part of it *AT LEAST* into a buffer so we can append to it,
- but we don't know how much. So we would have to block *ALL* access to the file
- while we start the append. In fact, we may have several records in our buffer,
- but how are we to know, unless we read ALL the file first...
-
- The other way is to start the append at the begining of the next block, and
- stay away from the previous record. This would allow us to reliably interlock
- record access by locking a)the non-existant last-plus-one record in the previous
- block, and b) the record we are about to append, updating EOF, and deq'ing the
- record locks.
-
- This is the origin of the puzzeling "I copyed 400 blocks of data from a bunch
- of files into one, and I've lost 40 blocks..." plea for help. The copy is a
- RECORD operation, and drops the empty space on the floor.
-
- ~Paul
-
-