Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!hsi!stpstn!lerman From: lerman@stpstn.UUCP (Ken Lerman) Newsgroups: comp.unix.wizards Subject: Re: Reserving Space on Disk Message-ID: <5377@stpstn.UUCP> Date: 17 Jul 90 12:14:38 GMT References: <563@hhb.UUCP> <1990Jul15.211608.26025@virtech.uucp> <13422@ulysses.att.com> <836@mwtech.UUCP> Reply-To: lerman@stpstn.UUCP (Ken Lerman) Organization: The Stepstone Corporation, Sandy Hook, CT 06482 Lines: 24 In article <836@mwtech.UUCP> martin@mwtech.UUCP (Martin Weitzel) writes: >In article <13422@ulysses.att.com> cjc@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@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