Messages in this thread | | | From | (Måns Rullgård) | Subject | Re: Is there a "make hole" (truncate in middle) syscall? | Date | Thu, 04 Dec 2003 21:55:23 +0100 |
| |
Rob Landley <rob@landley.net> writes:
> You can make a file with a hole by seeking past it and never writing to that > bit, but is there any way to punch a hole in a file after the fact? (I mean > other with lseek and write. Having a sparse file as the result....)
I've never heard of one.
> What are the downsides of holes? (How big do they have to be to > actually save space, is there a performance penalty to having a file > with 1000 4k holes in it, etc...)
A hole has to be at least the size of one block in the filesystem, typically 4k, to save any space. Regarding performance, I would expect it to improve for reads.
-- Måns Rullgård mru@kth.se
- 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/
| |