Reserving Space on Disk
Ken Lerman
lerman at stpstn.UUCP
Tue Jul 17 22:14:38 AEST 1990
In article <836 at mwtech.UUCP> martin at mwtech.UUCP (Martin Weitzel) writes:
>In article <13422 at ulysses.att.com> cjc at ulysses.att.com (Chris Calabrese[mav]) writes:
[... much deleted ...]
>What is wrong with the following approach (at least on non-BSD-ish
>file systems)?
>
> while file has not desired size
> lseek(2) from current position forward
> disk-block-size bytes minus 1 and write(2)
> one byte
>
>IMHO this should fill the disk and avoids much copying from user-space.
>--
>Martin Weitzel, email: martin at mwtech.UUCP, voice: 49-(0)6151-6 56 83
But if you wrote two bytes at a time, you could write the last byte of
one block and the first byte of the next in one write.
That would seem to be an advantage.
But only the wizards know for sure, and I probably don't qualify in
this forum.
Ken
More information about the Comp.unix.wizards
mailing list