git: sbin/hammer: Fix conditional for Hammer_FSId initialization

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Mar 19 14:27:44 PDT 2016


commit 5356b6e3ee79a952d7bd36a3eecf2c0b75fafccd
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Wed Mar 9 09:04:20 2016 +0900

    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.

Summary of changes:
 sbin/hammer/ondisk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5356b6e3ee79a952d7bd36a3eecf2c0b75fafccd


-- 
DragonFly BSD source repository



More information about the Commits mailing list