sbin/hammer: Abort if a device is used for more than one volumes
- setup_volume() needs to check if the device has already been
registered, in addition to checking the volume id. If it's been
registered already, abort the process before writes to volumes
start. Otherwise using a single device for more than one volumes
hits assertion at some point on blockmap lookup of layer1/2
bigblocks with possible core dump. It should abort before any
ondisk change (when the function is used by newfs_hammer) occurs.
# /sbin/newfs_hammer -L TEST /dev/da3 /dev/da3 /dev/da3
Volume 0 DEVICE /dev/da3 size 465.76GB
newfs_hammer: setup_volume: /dev/da3: Specified more than once