usr.sbin/makefs: Add HAMMER2 offline read / VOP_READ support
authorTomohiro Kusumi <tkusumi@netbsd.org>
Sat, 24 Jun 2023 06:45:51 +0000 (23:45 -0700)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Sat, 24 Jun 2023 07:42:53 +0000 (00:42 -0700)
commitfc4148fe6433963760fb77515a762ce076e70282
tree23413677153e77726e0e0b0ccd30c161ecca7c5c
parent89a3eb1631f7e2d7d7a89079dfdeeaa71da08efe
usr.sbin/makefs: Add HAMMER2 offline read / VOP_READ support

The offline read takes HAMMER2 specific "-o R" option.
`image-file` argument is a valid HAMMER2 image file or block device.
Unlike other offline commands, `directory` must be a valid directory.

e.g.
$ makefs -t hammer2 -o R=/path/to/file /dev/adx /a/b/c
$ makefs -t hammer2 -o R=/path/to/file /path/to/hammer2.img /a/b/c

The "-o R" option requires file path argument. The file is retrieved
from `image-file` and written to a file under `directory`.
In the examples above, /path/to/file is retrieved as /a/b/c/file
on success.
usr.sbin/makefs/hammer2.c
usr.sbin/makefs/hammer2.h
usr.sbin/makefs/hammer2/hammer2.h
usr.sbin/makefs/hammer2/hammer2_vnops.c
usr.sbin/makefs/makefs.8