[lkml]   [2008]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: How does ext2 implement sparse files?
On Feb 1, 2008 2:14 AM, Andi Kleen <> wrote:
> Lars Noschinski <> 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.

does anybody know how to make a hole in a large file which already has
real content from user space application?
In my project I need this function to delete a piece of content from
an exist large effectively.

> -Andi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to
> More majordomo info at
> Please read the FAQ at

 \ /
  Last update: 2008-02-01 11:37    [W:0.080 / U:0.036 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site