2021年6月15日(火) 5:20 Matthew Dillon <[email protected]>: > > > commit 0ed77c0451fd8246c4e40d07fd0562fc21eada3d > Author: Matthew Dillon <[email protected]> > 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.
multi-volumes mount still doesn't support growfs ioctl as it returns EOPNOTSUPP. Since hmp->devvp is a root volume, growfs implementation works only if hmp->devvp is the last one, which basically means it's a single volume mount. > * 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
