tech-kern archive

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

Changes for the WAPBL replay format

Hi all,
there are a number of important changes for the on-disk format of the
WAPBL journal. I'll go into detail for them separately, but on important
question to answer first is how the update path should look like.

Currently there are three different situations when trying to mount a
FFS filesystem with -o log:
(1) No journal or empty journal
(2) Non empty journal, no unlinked inodes left to free
(3) Non empty journal with unlinked inodes.

The first doesn't require any handling. The second needs to be supported
by fsck anyway, so the replay code has to be able to understand the old
format as far as replaying block records go. fsck currently doesn't care
about the list of unlinked inodes, so (3) doesn't apply for it.

The question is now whether updating the kernel with an unclean
filesystem that has unlinked inodes should be possible and whether the
*write* mount should be possible. Again three different options exist:
(a) Disallow mounting such an unclean filesystem r/w (r/o is possible).
(b) Try to use unused journal space to copy and convert the inode list
to the new format. Afterwards switch the header atomically to the new
format. r/w mount fails if not enough space exists. I think this should
not happen right now, but I am not 100% sure. Code would change
accordingly to ensure that the inode list can always be written (with
some additional spare space).
(c) Exploit that the inode list is currently written as continous
section of journal blocks, always clearing the list with the first
record. This allows truncating the journal to this block only and free
enough space. This is what the code currently does for (c) and would
require at least basic support to write the old header format.

I'd personally go with (b), even though it is not the most robust
approach, but from personal discussions with some developers (a) might
be good enough.


Home | Main Index | Thread Index | Old Index