git: sbin/hammer: Fix HammerVersion initialization added by 4c09d9c4

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Apr 15 13:33:06 PDT 2017


commit 18ab2af7148f5685118a0f5f6c22635194a5ef32
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Sat Apr 15 22:29:02 2017 +0300

    sbin/hammer: Fix HammerVersion initialization added by 4c09d9c4
    
    4c09d9c4 added HammerVersion initialization code to load_volume(),
    but this must be done only if volume is a root volume.
    
    hammer version-upgrade only overwrites vol_version field of root
    volume header, thus load_volume() updating HammerVersion using
    non root volume(s) after once initialized using the root volume
    breaks everything that volume version involves.
    
    If HammerVersion isn't initialized by reading the volume header
    (i.e. initialzied via ioctl when fs is mounted), it doesn't break
    anything at least in the same way as this.

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

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/18ab2af7148f5685118a0f5f6c22635194a5ef32


-- 
DragonFly BSD source repository


More information about the Commits mailing list