Messages in this thread | | | Subject | Re: How does ext2 implement sparse files? | From | Andi Kleen <> | Date | Thu, 31 Jan 2008 19:14:01 +0100 |
| |
Lars Noschinski <lklml@ml.noschinski.de> writes:
> For an university project, we had to write a toy filesystem (ext2-like), > for which I would like to implement sparse file support. For this, I > digged through the ext2 source code; but I could not find the point, > where ext2 detects holes. > > As far as I can see from fs/buffer.c, an hole is a buffer_head which is > not mapped, but uptodate. But I cannot find a relevant source line, > where ext2 makes usage of this information.
It does not explicitely detect holes; holey data is just never written so no space for it is allocated.
-Andi
| |