Messages in this thread | | | From | Peter Chubb <> | Date | Fri, 5 Dec 2003 13:39:14 +1100 | Subject | Re: Is there a "make hole" (truncate in middle) syscall? |
| |
>>>>> "Philippe" == Philippe Troin <phil@fifi.org> writes:
Philippe> Peter Chubb <peter@chubb.wattle.id.au> writes: >> >>>>> "Rob" == Rob Landley <rob@landley.net> writes: >> Rob> You can make a file with a hole by seeking past it and never Rob> writing to that bit, but is there any way to punch a hole in a Rob> file after the fact? (I mean other with lseek and write. Having Rob> a sparse file as the result....) >> SVr4 has fcntl(fd, F_FREESP, flock) that frees the space covered by >> the struct flock in the file. Linux doesn't have this, at least in >> the baseline kernels.
Philippe> However most SVr4 (at least Solaris and HP-UX) only Philippe> implement FREESP when the freed space is at the file's Philippe> tail. In other words, FREESP can only be used to implement Philippe> ftruncate().
The original SVr4 worked in the middle of files too.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |