Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!pyrnj!hhb!istvan From: istvan@hhb.UUCP (Istvan Mohos) Newsgroups: comp.unix.wizards Subject: Reserving Space on Disk Keywords: File System Message-ID: <563@hhb.UUCP> Date: 15 Jul 90 15:00:57 GMT Organization: HHB Systems, Mawah, NJ Lines: 28 markd@silogic.UUCP (Mark DiVecchio @ Silogic Systems) writes: >An associate has an application where he wants to reserve 4Mb of disk >space. The unix file system does not support this since opening the >file, seeking to 4Mb and writing one byte does not do the trick. >Besides writing out 4Mb of filler, is there any other way to do this? Because disk I/O optimizations are kernel tasks, there is very little you can do unless you're willing to rewrite the buffer cache routines, forcing the system to pop a few free blocks and reassign them to your inode. (Consult Chap. 3 of "The Design Of The UNIX Operating System" by Maurice J. Bach for details.) Personally, I can't blame a philosophy of having to actually write to the disk if one wants to take up space on it; in spite that if (write (fd, malloc(FOURMEG), FOURMEG) != FOURMEG) perror("malloc or write error"), exit (1); does take a few seconds to execute, "delayed-write" or not. Maybe you should just fork off this task and go on to something else. -- Istvan Mohos ...uunet!pyrdc!pyrnj!hhb!istvan RACAL-REDAC/HHB 1000 Wyckoff Ave. Mahwah NJ 07430 201-848-8000 ======================================================================