From fd74884e5f97b1cbfca7c582336d7fbbbdf07644 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 5 Dec 2009 09:20:27 -0800 Subject: [PATCH] HAMMER VFS - Change default from version 3 to version 4 * Version 4 is now the default for newfs_hammer and is no longer considered a work in progress. * Filesystems may be upgraded to version 4 in-place. The UNDO FIFO (typically 1G) is reformatted so the upgrade might take a minute or two depending. * Version 4 allows the UNDO FIFO to be flushed without also having to flush the volume header, removing 2 of the 4 disk syncs typically required for an fsync() and removing 1 of the 2 disk syncs typically required for a flush sequence. This is accomplished by adding a sequence number of the UNDO entries in the FIFO and preventing them from crossing a 512-byte boundary, so each 512-byte block starts with an entry. HAMMER's mount code is then able to scan the UNDO FIFO to determine the start and end for recovery purposes. * Version 4 implements the infrastructure needed for REDO, but does not implement any REDO operations. --- sys/vfs/hammer/hammer_disk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vfs/hammer/hammer_disk.h b/sys/vfs/hammer/hammer_disk.h index 85d2c1013a..c6639a1402 100644 --- a/sys/vfs/hammer/hammer_disk.h +++ b/sys/vfs/hammer/hammer_disk.h @@ -583,14 +583,14 @@ typedef struct hammer_volume_ondisk *hammer_volume_ondisk_t; sizeof(hammer_crc_t)) #define HAMMER_VOL_VERSION_MIN 1 /* minimum supported version */ -#define HAMMER_VOL_VERSION_DEFAULT 3 /* newfs default version */ +#define HAMMER_VOL_VERSION_DEFAULT 4 /* newfs default version */ #define HAMMER_VOL_VERSION_WIP 4 /* version >= this is WIP */ #define HAMMER_VOL_VERSION_MAX 4 /* maximum supported version */ #define HAMMER_VOL_VERSION_ONE 1 #define HAMMER_VOL_VERSION_TWO 2 /* new dirent layout (2.3+) */ #define HAMMER_VOL_VERSION_THREE 3 /* new snapshot layout (2.5+) */ -#define HAMMER_VOL_VERSION_FOUR 4 /* new undo/redo/flush (2.5+) */ +#define HAMMER_VOL_VERSION_FOUR 4 /* new undo/flush (2.5+) */ /* * Record types are fairly straightforward. The B-Tree includes the record -- 2.41.0