[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ext2fs for pupa
From: |
Marco Gerards |
Subject: |
Re: Ext2fs for pupa |
Date: |
11 Oct 2003 23:49:44 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Yoshinori Okuji <address@hidden> writes:
> Hi Marco,
>
> --- Marco Gerards <address@hidden> wrote:
> > I was wondering if it is interested to add ext3 support, so it is
> > possible to boot from a broken ext3 fs. Does it happen often that
> > GRUB can't boot from a broken ext3 partition?
>
> I'm really interested. Indeed, I was trying to implement ext3 support when I
> was rewriting ext2 support for GRUB.
>
> But, for your question, I must say that it is rare. Probably it is because
> GRUB
> only accesses few blocks in a filesystem (i.e. /boot/grub/* and kernels in the
> root directory or the boot directory). Journaling support is still useful,
> however.
Ok.
> > So, does it make sense to implement this? Do you have some other
> > suggestions?
>
> One caution is that you need to expect that memory would exhaust if you load
> journals in memory. As GRUB/PUPA should run in 4MB and the journal size could
> be at most 400MB, it is impossible to store all of them in memory. But if you
> fetch each journal every time from a disk, it would be too slow.
Of course I won't load the entire journal in memory. I think we can
better read form the journal which blocks are replaced.
In that case you will get a hashtable in which is described which fs
block is in the journal.
Example:
10 1000
54 23
90 4534
This means that block 1000 on disk is overruled by block 10 on disk
(journal), etc. This way it is easy to reconstruct a journal quickly
for us.
Were you serious about 400MB? Normally you won't log data, only
metadata. And many blocks in the log are for the same diskblock
AFAIK. That means that you will use the last. Anyway, I can test
this and find out how this works. :)
Do you have an idea how I can get a unreadable filesystem that I can
use to test the ext3 stuff on? :)
> Thus I think you will have to implement a cache mechanism such as LRU. This is
> too difficult in GRUB, but this shouldn't be difficult in PUPA, because you
> have basic memory management functions. You might be able to get an idea from
> the reiserfs code in GRUB, but I'm sure that you will do a better solution
> with
> PUPA. :)
A generic cache will be interesting. I've noticed listing files
wasn't fast with GRUB, this can and IMHO should be changed. :)
Oh, I'm quite sleepy so if something in my mail doesn't make sense or
if it is not clear, please ask tell me.
Thanks,
Marco