2010-02-17 15:46:43

by Gaëtan Podevijn

[permalink] [raw]
Subject: Ext2 and ext4 preallocation / mballoc

Hello,

Reading this http://web.mit.edu/tytso/www/linux/ext2intro.html I
understand that ext2 preallocates 8 blocks when a writing data to a
file. Ext3 uses the windows reservations method, but is that ext3 also
preallocates 8 blocks when writing data ?

Moreover, this page
http://kernelnewbies.org/Ext4#head-b2148d2a96d22a1bd7e376e6c08e4a38d08fb157
explains that ext3 allocates one block at a time and ext4 uses
multiblock allocation that is, allocates many block in a single system
call.

What is the difference between preallocation on ext2 (and ext3 ?) and mballoc ?


TYA,

Ga?tan

PS : I'm sorry for my really bad english


2010-03-06 14:45:27

by Aneesh Kumar K.V

[permalink] [raw]
Subject: Re: Ext2 and ext4 preallocation / mballoc

On Wed, 17 Feb 2010 16:46:19 +0100, Gaëtan Podevijn <[email protected]> wrote:
> Hello,
>
> Reading this http://web.mit.edu/tytso/www/linux/ext2intro.html I
> understand that ext2 preallocates 8 blocks when a writing data to a
> file. Ext3 uses the windows reservations method, but is that ext3 also
> preallocates 8 blocks when writing data ?
>
> Moreover, this page
> http://kernelnewbies.org/Ext4#head-b2148d2a96d22a1bd7e376e6c08e4a38d08fb157
> explains that ext3 allocates one block at a time and ext4 uses
> multiblock allocation that is, allocates many block in a single system
> call.
>
> What is the difference between preallocation on ext2 (and ext3 ?) and mballoc ?
>
>


You can find mballoc details at

http://ols.fedoraproject.org/OLS/Reprints-2008/kumar-reprint.pdf

-aneesh