sbin/hammer: Fix conditional for Hammer_FSId initialization
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Wed, 9 Mar 2016 00:04:20 +0000 (09:04 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 19 Mar 2016 19:42:38 +0000 (04:42 +0900)
commit5356b6e3ee79a952d7bd36a3eecf2c0b75fafccd
treebfc78e423fec806e6dd6f913230fe240e4c539c2
parentf5fd48a5ef0c53bb3be248e358edf2fbc9d9d722
sbin/hammer: Fix conditional for Hammer_FSId initialization

Hammer_FSId is initialized when no entry in the VolList yet,
but this becomes an issue when a new volume (that hasn't joined
the HAMMER filesystem yet) is the first created volume_info.

If the second volume_info is for the existing HAMMER volume,
it is likely that
bcmp(&Hammer_FSId, &ondisk->vol_fsid, sizeof(Hammer_FSId))
does not match and results in the following error.
"load_volume: %s: FSId does match other volumes!"

The only reason this hasn't become an issue so far is because
no existing hammer command creates volume_info in that order.
sbin/hammer/ondisk.c