Subject: Re: Log area on-disk for the journal
To: M J Fleming <>
From: Thor Lancelot Simon <>
List: tech-kern
Date: 10/20/2006 17:16:00
On Fri, Oct 20, 2006 at 10:08:29PM +0100, M J Fleming wrote:
> On Fri, Oct 20, 2006 at 01:37:05PM -0700, Jason Thorpe wrote:
> > - Contiguously allocated from within the file system's free space.   
> > Pros: simple, fast.  Cons: hard to enable journaling on a pre-existing  
> > file system if the free space is heavily fragmented.
> > 
> > - Allocated from file system free space as contiguously as possible,  
> > but no different than any other file.  Pros: easy to enable journaling  
> > on pre-existing file systems because it will work regardless of how  
> > the free space is laid out.  Cons: have to use BMAP to translate  
> > journal offset -> location on disk.
> > 
> Somebody will know better than me but, if the log area isn't contiguous
> I would have thought that it would impact transaction I/O so much that the
> benefit of metadata-consistency wouldn't be worth it.

I wonder about this, too.  I'm thinking that what Wasabi did, generalized
a little bit, might not be such a bad idea at all -- if the code simply
always used _another disk device_ for the log, that log could be placed
after the FFS (by putting it in a partition after the FFS) as Wasabi did,
before the FFS (by putting it in a partition before the FFS), as might be
desirable for performance reasons, or even on another disk entirely (e.g.
a solid-state device, or a logical disk entirely resident within the
battery-backed memory of a hardware RAID unit, which some such units
support for exactly this purpose).

There is some logistical hassle -- you have to whack mount and a few
other interfaces to understand that a filesystem might have more than
one device associated with it, or somehow make that self-describing --
but it might be worth it, particularly since using an external journal
would also make it possible to journal or unjournal existing filesystems.

  Thor Lancelot Simon	                           

  "We cannot usually in social life pursue a single value or a single moral
   aim, untroubled by the need to compromise with others."      - H.L.A. Hart