[haiku-gsoc] Re: Ext3 minor design question

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Sun, 30 May 2010 12:00:55 +0200

Janito Ferreira Filho <jvffprog@xxxxxxxxxxx> wrote:
[...]
> However, I think it might be better to do it differently, and have a 
> hash map
> of the journal's mapped blocks (blocks to be revoked would then be 
> removed
> from this table). The table would be larger, however I think it would 
> also serve
> as a mapping for read operations (ie. when a block hasn't been written 
> to the
> main file system but has been committed to journal). 

I'm not sure what you're aiming at (I guess it's solving a visibility 
problem of ongoing transactions), but I would think that this would 
mostly complicate the code. Is there any compelling reason for doing it 
that way exactly?

A journal can only really work if you write complete transactions to 
it, not partial ones. The only advantage I see in what you do is that 
you no longer need to keep a block in memory once it has been committed 
to the journal.
In a real file system, this time span shouldn't be too large anyway, 
and usually, most file system blocks remain unchanged. Furthermore, the 
chances that the changed blocks are still in memory is relatively high 
anyway. Therefore, I don't see much value in letting all read 
operations go through the log as well.

I also don't understand why this would bring any advantage for the case 
of having several journals at once.

Bye,
   Axel.


Other related posts: