git: hammer2 - Fix growfs issue with multi-volume support + one other bug

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Jun 14 13:20:36 PDT 2021


commit 0ed77c0451fd8246c4e40d07fd0562fc21eada3d
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Jun 14 13:16:59 2021 -0700

    hammer2 - Fix growfs issue with multi-volume support + one other bug
    
    * A hammer2 filesystem versioned for multi-volume support checks
      voldata.total_size, but growfs was never modified to adjust
      the total_size field.
    
      Fix this by having growfs properly adjust the total_size field.
    
    * An older bug... growfs was not zeroing any new volume headers
      when extending the filesystem in such a way as additional volume
      headers are needed.
    
      Fix by properly zeroing these headers (mount will complain until
      hammer2 cycles through all four but that's ok).
    
    * Also fix an older bug, modifications to only the volume header could
      be flushed without bumping mirror_tid, causing confusion later
      on if the filesystem is unmounted and remounted.
    
      Fix this by having hammer2_voldata_modify() set mirror_tid in the
      vchain in the same manner that hammer2_chain_modify() does for
      a chain.  e.g.:
    
      hmp->vchain.bref.mirror_tid = hmp->voldata.mirror_tid + 1;

Summary of changes:
 sys/vfs/hammer2/hammer2_ioctl.c  | 26 ++++++++++++++++++++++----
 sys/vfs/hammer2/hammer2_vfsops.c |  9 +++++++++
 2 files changed, 31 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0ed77c0451fd8246c4e40d07fd0562fc21eada3d


-- 
DragonFly BSD source repository


More information about the Commits mailing list