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.
668f11d sys/vfs/hammer: Add HAMMER_MIN_UNDO_BIGBLOCKS to set minimum undo fifo to 512MB
sbin/hammer/ondisk.c | 6 +++---
sbin/newfs_hammer/newfs_hammer.8 | 6 +++---
sbin/newfs_hammer/newfs_hammer.c | 28 ++++++++++++++++++----------
sys/vfs/hammer/hammer_disk.h | 6 ++++--
4 files changed, 28 insertions(+), 18 deletions(-)
Upstream: gitweb.dragonflybsd.org