git: sys/vfs/hammer2: Don't use 1 byte size for 0 radix bits

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Wed Oct 21 11:04:19 PDT 2020


commit 893aa36e0111c1418f260bd8d1092b7f22ea010e
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Tue Oct 20 01:04:07 2020 +0900

    sys/vfs/hammer2: Don't use 1 byte size for 0 radix bits
    
    Not using 1 byte size for 0 radix bits is part of ondisk spec.
    This may not be expected to happen in these cases, but other ones
    always consider 0 radix or assert radix != 0.
    
    --
     * WARNING! A radix of 0 (such as when data_off is all 0's) is a special
     *	    case which means no data associated with the blockref, and
     *	    not the '1 byte' it would otherwise calculate to.

Summary of changes:
 sys/vfs/hammer2/hammer2_chain.c |  8 ++++++--
 sys/vfs/hammer2/hammer2_io.c    | 10 ++++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/893aa36e0111c1418f260bd8d1092b7f22ea010e


-- 
DragonFly BSD source repository



More information about the Commits mailing list