Subject: Re: FFS and Journaling
To: None <netbsd-users@netbsd.org>
From: Simon Truss <simon@bigblue.demon.co.uk>
List: netbsd-users
Date: 03/25/2007 19:59:46
Thor Lancelot Simon wrote:
> On Sun, Mar 25, 2007 at 10:24:34AM +0000, Simon Truss wrote:
>> Hi,
>>
>> From the recent SOC discussion I gather that the advantage of 
>> journalling over softdep is the fast replay of the journal obviating the 
>> need to fsck the whole disk. My thinking here is that softdep and 
>> journalling has been kept as independent strategies and that a combined 
>> softdep+journal may prove slightly simpler and more efficient than a 
>> full blown independent journal solution.
> 
> I think it's about the same amount of work.  You're right, as far as I
> can tell, that it should be possible to use softdep to order the writes
> for the filesystem, then output those ordered writes into a journal.  It
> would be nice if softdep in fact were a generic layer that produced an
> ordered graph of the writes for a chunk of the filesystem namespace.

Are we saying then that there is a commonality in required fs hooks 
between journalling and softdep. That by developing journalling and some 
clean dependency hooks there might come a time when softdep can be moved 
over to this common interface? That would be wonderful, both progress 
and practical.

I have just about reached by limit of my file system knowledge, should I 
continue into detail with this concept I will be proceeding to fantasy 
systems instead :-)

> But it's not.  Instead, it's a huge mess of spaghetti code that is
> incestuous with all layers of the FFS implementation at every opportunity.

Yikes. That's a good reason not to mess with softdep. Practicality 
always gets in the way.

> From my point of view one major advantage of a journalled FFS would be
> the simplicity it would bring back to our core filesystem implementation.
> I would be very happy to get good filesystem performance from kernels
> that didn't have the softdep code anywhere near them.

agreed, but softdep in concept still has a lot of potential, some of 
which cannot be offered by journalling. I would hope that if softdep was 
removed that something could be found to take its place some day.

Simon