tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Removing softdep

On Sat, Jun 07, 2008 at 01:07:49AM +0100, Andrew Doran wrote:
> On Sat, Jun 07, 2008 at 01:55:10AM +0200, Martin Husemann wrote:
> > On Sat, Jun 07, 2008 at 12:11:57AM +0100, Andrew Doran wrote:
> > > So, I propose to remove softdep when we import the journalling code, and 
> > > to
> > > go forward with the focus on improving journalling.
> > 
> > I agree with this in principle, but as an admin running file systems with
> > softdeps now (netbsd-4 mostly, and never experienced any problems with
> > softdeps) this migration would force me to dump, newfs and restore serious
> > amounts of data, so would be a huge pain.
> That would be unacceptable. The file system format won't change at all.  I
> don't know what Simon has planned for the journal but I like how Solaris
> handles the journal. My limited understanding of it is:
> mount:
> - allocate unlinked blocks (no inode/directory) for journal
> - allocate block to denote which blocks the journal uses, maybe a btree
> - write decriptor block to disk
> - write back superblock with pointer to descriptor block
> clean unmount:
> - clear superblock pointer
> - free all blocks allocated to describe journal, it's gone
> fsck:
> - old, journal unaware fsck: don't recognise the blocks, throw them away.
>   check file system as usual. maybe lose data.
> - new and journal aware: replay the journal, or let kernel mount it and
>   do the same.

I'd prefer to not have the kernel replay the journal. At the very minimum it
should not do it when the filesystem is mounted read-only.
Also a flag to fsck to throw away the journal without replaying it could
be usefull.

> Given that all you'd need to do is replace '-o softdep' with '-o whatever'.
> If we reuse the flag bit you wouldn't need to do anything.

This looks like a very good plan, and not too hard to implement.
I'm not sure reusing the softdep flag is a good idea though.
Lets make it completely explicit that softdep isn't supported any more.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index