lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080201115530.GB14567@lars.home.noschinski.de>
Date:	Fri, 1 Feb 2008 12:55:30 +0100
From:	Lars Noschinski <lkml@...noschinski.de>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: How does ext2 implement sparse files?

[Sorry for using an invalid mail address in my previous post]

* Andi Kleen <andi@...stfloor.org> [08-02-01 10:28]:
>Lars Noschinski <lklml@...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.

Thanks for the answers. No that I know that, it is kind of obvious. I
was irritated yesterday by a bug a bug in our implementation (number of
used blocks is reported as filesize/blocksize); so I was expecting the
VFS to issue write requests for empty pages (which would be sillly, I
know).

Thanks,
     Lars.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ