git: sys/vfs/hammer: Define HAMMER_ZONE2_MAPPED_INDEX for zone# assertions

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Fri Jun 26 08:14:54 PDT 2015


commit ccdea233638e159afd4802db5c3e1ae9b1f5ee29
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Fri Jun 26 04:06:04 2015 +0900

    sys/vfs/hammer: Define HAMMER_ZONE2_MAPPED_INDEX for zone# assertions
    
    - Define HAMMER_ZONE2_MAPPED_INDEX as zone-8(btree zone) index and
      use this (instead of zone-8 index) to test if the given zone# is
      is valid zone#. This makes better sense as "btree" zone itself
      doesn't have much meaning with regards to checking zone# range
      (e.g. meta zone or large/small data zones could have been defined
      as zone-8 when hammer was designed and it would still work with
      the non-btree-zone-8).
    
    - This is similar to the way HAMMER_RECTYPE_ENTRY_START is defined
      and used to lookup range of records.

Summary of changes:
 sbin/hammer/cmd_blockmap.c       |  4 +++-
 sbin/newfs_hammer/newfs_hammer.c |  2 +-
 sys/vfs/hammer/hammer.h          |  2 +-
 sys/vfs/hammer/hammer_blockmap.c | 16 ++++++++--------
 sys/vfs/hammer/hammer_disk.h     |  6 ++++++
 sys/vfs/hammer/hammer_ondisk.c   |  2 +-
 6 files changed, 20 insertions(+), 12 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ccdea233638e159afd4802db5c3e1ae9b1f5ee29


-- 
DragonFly BSD source repository


More information about the Commits mailing list