mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
To: Lars Noschinski <lklml@ml.noschinski.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How does ext2 implement sparse files?
Date: Thu, 31 Jan 2008 11:51:17 -0500	[thread overview]
Message-ID: <20080131165117.GC26259@csclub.uwaterloo.ca> (raw)
In-Reply-To: <20080131152823.GA29422@lars.home.noschinski.de>

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

  reply	other threads:[~2008-01-31 16:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31 15:28 Lars Noschinski
2008-01-31 16:51 ` Lennart Sorensen [this message]
2008-01-31 17:18 ` Chris Snook
2008-01-31 18:14 ` Andi Kleen
2008-02-01 10:34   ` Shuduo Sang
2008-02-01 11:08     ` Eric Dumazet
2008-02-01 11:55   ` Lars Noschinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080131165117.GC26259@csclub.uwaterloo.ca \
    --to=lsorense@csclub.uwaterloo.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lklml@ml.noschinski.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®