sys/vfs/hammer: Add HAMMER_MIN_UNDO_BIGBLOCKS to set minimum undo fifo to 512MB
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 29 Oct 2016 07:03:13 +0000 (16:03 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 30 Oct 2016 03:31:12 +0000 (12:31 +0900)
commit668f11d85250ff62937eaca5f0219b55182a6c1d
treeb29265f6300bd89534ddc9416f2b0d4b7fa65372
parent9bd64fcf3b31aca72e4bd1bebd91876d777b44c9
sys/vfs/hammer: Add HAMMER_MIN_UNDO_BIGBLOCKS to set minimum undo fifo to 512MB

Add HAMMER_MIN_UNDO_BIGBLOCKS which is 64 big-blocks in addition
to HAMMER_MAX_UNDO_BIGBLOCKS which is 128 big-blocks.

This not only removes magic number 500*1024*1024 from source,
but also changes minimum undo fifo from 500MB to 512MB in terms
of userspace command.

This means the number of big-blocks created by newfs_hammer by
default (depending on volumes size), and the minumum number of
big-blocks that can be specified, change from 63(504MB) to 64(512MB),
which is trivial given the size of total volumes required by
the filesystem.

I think it's just better to keep the number multiple of 8MB.
As mentioned, one can't assign exact 500MB for undo fifo anyway
as it gets aligned to big-block boundary.

This change doesn't affect the existing filesystem.
sbin/hammer/ondisk.c
sbin/newfs_hammer/newfs_hammer.8
sbin/newfs_hammer/newfs_hammer.c
sys/vfs/hammer/hammer_disk.h