2007-08-02 10:00:36

by Coly Li

[permalink] [raw]
Subject: What is fragment in ext3/4 ?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

These days, when I read the source code of mke2fs, I found an option -f
to set the fragment size.

But I can not find any explaining for ext3/4 framgment from google,
excepting someone saying ext2/3 does not support this feature.

Can anyone tell me what is the function or purpose of fragment of ext
file system ?

Thanks in advance :-)

Coly
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGsan5uTp8cyZ5lTERAvNJAJ0RVII/NFrq8V37AB+tNZ7r291hggCgltef
PC9UiC9elgGZGAMdbHKAz9s=
=pgty
-----END PGP SIGNATURE-----


2007-08-03 00:02:29

by Andreas Dilger

[permalink] [raw]
Subject: Re: What is fragment in ext3/4 ?

On Aug 02, 2007 17:55 +0800, Coly Li wrote:
> These days, when I read the source code of mke2fs, I found an option -f
> to set the fragment size.
>
> But I can not find any explaining for ext3/4 framgment from google,
> excepting someone saying ext2/3 does not support this feature.
>
> Can anyone tell me what is the function or purpose of fragment of ext
> file system ?

This is an obsolete concept from BSD that was never used by ext[234].
Consider a "fragment" in this context to be the same as a "tail" for
reiserfs. A very small file, or the end of a file that is less than
a block.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

2007-08-03 09:21:29

by Coly Li

[permalink] [raw]
Subject: Re: What is fragment in ext3/4 ?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I read from manual and source code, it seems fragment size should be
same to filesystem block size. Therefore, can I say current ext3/4
filesystem still do not support fragment ?

Thanks.

Coly


Andreas Dilger wrote:
> On Aug 02, 2007 17:55 +0800, Coly Li wrote:
>> These days, when I read the source code of mke2fs, I found an option -f
>> to set the fragment size.
>>
>> But I can not find any explaining for ext3/4 framgment from google,
>> excepting someone saying ext2/3 does not support this feature.
>>
>> Can anyone tell me what is the function or purpose of fragment of ext
>> file system ?
>
> This is an obsolete concept from BSD that was never used by ext[234].
> Consider a "fragment" in this context to be the same as a "tail" for
> reiserfs. A very small file, or the end of a file that is less than
> a block.
>
> Cheers, Andreas
> --
> Andreas Dilger
> Principal Software Engineer
> Cluster File Systems, Inc.
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGsvJIuTp8cyZ5lTERAltpAJ9BhpdjoKQUx001KSQP2oR8HNaXsQCZAbyJ
ASnxX0wXDEaU8q5Syvp83yk=
=IYRx
-----END PGP SIGNATURE-----

2007-08-03 16:06:06

by Eric Sandeen

[permalink] [raw]
Subject: Re: What is fragment in ext3/4 ?

Andreas Dilger wrote:
> On Aug 02, 2007 17:55 +0800, Coly Li wrote:
>> These days, when I read the source code of mke2fs, I found an option -f
>> to set the fragment size.
>>
>> But I can not find any explaining for ext3/4 framgment from google,
>> excepting someone saying ext2/3 does not support this feature.
>>
>> Can anyone tell me what is the function or purpose of fragment of ext
>> file system ?
>
> This is an obsolete concept from BSD that was never used by ext[234].
> Consider a "fragment" in this context to be the same as a "tail" for
> reiserfs. A very small file, or the end of a file that is less than
> a block.

There's a fair amount of code around this never-implemented concept;
should it be removed? :)

-Eric

2007-08-03 16:26:17

by Coly Li

[permalink] [raw]
Subject: Re: What is fragment in ext3/4 ?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eric Sandeen wrote:
> Andreas Dilger wrote:
>> On Aug 02, 2007 17:55 +0800, Coly Li wrote:
>>> These days, when I read the source code of mke2fs, I found an option -f
>>> to set the fragment size.
>>>
>>> But I can not find any explaining for ext3/4 framgment from google,
>>> excepting someone saying ext2/3 does not support this feature.
>>>
>>> Can anyone tell me what is the function or purpose of fragment of ext
>>> file system ?
>> This is an obsolete concept from BSD that was never used by ext[234].
>> Consider a "fragment" in this context to be the same as a "tail" for
>> reiserfs. A very small file, or the end of a file that is less than
>> a block.
>
> There's a fair amount of code around this never-implemented concept;
> should it be removed? :)

I agree with this idea. It seems we will never implement it in future,
once "fragment" packed into inode.

Coly

>
> -Eric
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGs1XWuTp8cyZ5lTERAoFSAJsE4noHvOm77i0BKWiw5L1DDAnLKgCfXKcv
uL2ZZDiPJYUDWpKWwtIf1uo=
=bGt4
-----END PGP SIGNATURE-----

2007-08-03 22:29:03

by Andreas Dilger

[permalink] [raw]
Subject: Re: What is fragment in ext3/4 ?

On Aug 04, 2007 00:20 +0800, Coly Li wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Eric Sandeen wrote:
> > There's a fair amount of code around this never-implemented concept;
> > should it be removed? :)
>
> I agree with this idea. It seems we will never implement it in future,
> once "fragment" packed into inode.

Yes, this should all be removed. In fact, the "fragment" fields are
being reassigned in the upstream e2fsprogs, so there is no chance to
implement it in the future either. If we ever want to have fragments
like this, the plan was to add them as EAs in the inode (no point to
make an external EA block to hold a block of data).

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.