lkml.org 
[lkml]   [2008]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: How does ext2 implement sparse files?
From
On Thu, Jan 31, 2008 at 04:28:23PM +0100, Lars Noschinski wrote:
> 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.
>
> Any hints would be greatly appreciated,

While I don't actually know, I always thought it was up to the
application to create files with holes by seeking over the holes before
writing data. That seems like the simplest way to me.

--
Len Sorensen


\
 
 \ /
  Last update: 2008-01-31 17:55    [W:0.080 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site