[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: filesystem

* "Bill Cunningham" <billcun suddenlink net> hat geschrieben:

> I hope this is the right list. I have created an ext2 filesystem and
> removed the dir_index feature. I don't know if this kind of experimentation
> is going to help me learn something about filesystems or not. Well what is
> dir_index? Then I ran e2fsck -f -v -pD and the /dev file. Now what did I
> remove? Htree. I guess it can always be put back and it's on an experimental
> filesystem.
> What features separate ext4 from ext3 ? I have noticed too that ext2
> fragments quite a bit.

Hello Bill.

You're trying to understand what exactly? From the user point of view,
dir_index just makes directory accesses on very big directories faster.
When creating a new file, or searching a file to be opened, without
dir_index the file system driver has to read each any every directory
cluster and investigate it's content to figure out, whether an object with
the given name already exists. With dir_index, there is an additional form
of sorted tree in the directory, which speeds up this lookup process. Now,
when you remove that feature and then e2fsck, all those indexes will be
removed. If you later readd the feature and e2fsck, those indexes get

>From the developer point of view, one approach is to read and understand
the kernel sources for ext2/3/4 or just start writing your own file system
checker. If you get that right, you've understood the file system ;)

Not much more advice, anyone can give you in a general way.

Features that separate ext2 / ext3 / ext4? Clear answer: There is no ext3
and ext4. It's all ext2, but there are three independent code bases in the
Linux kernel, called ext2, ext3 and ext4 - but they all implement ext2.

The fs driver called ext3 needs the feature has_journal, ext2 can't mount
feature needs_recovery. Despite from this, they are pretty much identical.

The fs driver called ext4 supports some new features, the prominent
(i.e. documented) ones are: extent (don't store cluster pointers but
instead cluster ranges - saving space for large files), flex_bg
(drop the constraint, that group meta data shall be stored in it's own
group, thus allowing to virtually create bigger groups. Probably you can
mke2fs one file system with flex_bg, then remove the feature flag and
perfecly mount and use it with ext2 / ext3, however, e2fsck may get cracy
on that setup - but I don't see, why the file system drivers should get a
problem with that - anyways, I didn't test it), uninit_bg (speeds up
mke2fs by skipping the "overwrite all bitmaps and inode tables with
zeros" step).

Regards, Bodo

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]