usr.sbin/makefs: Add HAMMER2 offline growfs support
authorTomohiro Kusumi <tkusumi@netbsd.org>
Wed, 7 Jun 2023 08:12:14 +0000 (01:12 -0700)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Wed, 7 Jun 2023 09:28:45 +0000 (02:28 -0700)
commitafa5234b4929bad6fae51a08e548a4f5c167cece
treeb479e8891097047d86e1f1df611b585e90cf0e30
parent961db90e96d4d039edbd15dd78ecc822445405ec
usr.sbin/makefs: Add HAMMER2 offline growfs support

The offline growfs takes HAMMER2 specific "-o G" option.
`image-file` argument is a valid HAMMER2 image file or block device.
`directory` argument is unused, but needs to be a valid path or "--".

e.g.
$ makefs -t hammer2 -o G /dev/adx --
$ makefs -t hammer2 -o G /path/to/hammer2.img --

By default expands volume to image file or block device size.
If -s option is specified, use that size.
No shrink support in the same way hammer2(8) growfs doesn't.
usr.sbin/makefs/hammer2.c
usr.sbin/makefs/hammer2.h
usr.sbin/makefs/hammer2/hammer2.h
usr.sbin/makefs/hammer2/hammer2_ioctl.c
usr.sbin/makefs/makefs.8
usr.sbin/makefs/makefs.c
usr.sbin/makefs/walk.c