lkml.org 
[lkml]   [2000]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch] Cleanup struct gendisk registration, 2.3.40-pre1
   Date: Wed, 19 Jan 2000 17:17:38 +0200
From: Catalin Muresan <cata@codec.ro>

Hello,

in /usr/src/linux/include/linux/ext2_fs.h there is a

#define EXT2_MIN_FRAG_SIZE 1024

does ext2 use block fragments? if yes how? if not why?
(from a quick look at the source it seems unlikely that
ext2 uses fragments)

No, ext2 doesn't use block fragments. There was some thought to do so,
but it was never implemented. The reason for it was that for a long
time, because of our superior block allocation algorithms, we were
getting good contiguous block allocations with 1k blocks, and so for
smaller files things worked just as well as 8k blocks with 1k fragments,
so why bother with the complexity?

It was only later when people started using really large files that (at
least I) realized that in fact there was one other problem with 1k
blocks, which was the fact that indirect blocks in large files aren't
teribly efficient with 1k blocks. For long time it simply wasn't an
issue, so we just never bothered to implement fragments.

These days, because of the Linux VM, things really very badly want to be
algined nicely, so storing the tail of files in fragments would be a bit
of a pain to implement.

It's true that 4k block will waste more disk space w/o fragments, but
disk space is so cheap that it's not clear it matters all that much ---
except if you have a filesystem where you're storing lots of small
files, in which case you should mke2fs it with 1k blocksizes.

- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site