Skip to contentSkip to conversation

What is fragment in ext3/4 ?

DISCUSSION Coly Li 3 participants 6 messages Aug 2, 2007 – Aug 3, 2007

lore
Share & tools
lore

Coly Li

author
#0 lore raw

-----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-----

#1 lore raw
Quoted 8 lines · Coly Li

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.

author
#2 lore raw

-----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

Quoted 15 lines · Andreas Dilger
Quoted 8 lines · Coly Li

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.

Quoted 6 lines

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-----

#3 lore raw
In reply to Andreas Dilger
Quoted 7 lines · Andreas Dilger
Quoted 6 lines · Coly Li

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.

Quoted 7 lines
Quoted 2 lines

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

author
#4 lore raw

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

Quoted 10 lines · Eric Sandeen
Quoted 9 lines · Andreas Dilger
Quoted 8 lines · Coly Li

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 ?

Quoted 7 lines
Quoted 4 lines

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

Quoted 3 lines

-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-----

#5 lore raw
Quoted 7 lines · Coly Li

-----BEGIN PGP SIGNED MESSAGE-----

Quoted 2 lines · Eric Sandeen

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.