aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2020-09-26 21:45:33 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2020-09-26 21:45:33 +0000
commit7d38c4af1773bf0278414e4cf60d540e0a280eb6 (patch)
treedbc897f1317b721504127c9ca47cb260f9d1a6f9
parent7fc1f569abf7c799c6334297ee020a01b5d3d71e (diff)
downloadsrc-7d38c4af1773bf0278414e4cf60d540e0a280eb6.tar.gz
src-7d38c4af1773bf0278414e4cf60d540e0a280eb6.zip
MFS of 366163 from stable/12 which is MFC of 365992 from head.
Update check-hash when doing large UFS filesystem expansions. Approved by: re@ (Glen Barber) Sponsored by: Netflix
Notes
Notes: svn path=/releng/12.2/; revision=366187
-rw-r--r--sbin/growfs/growfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index 61f90de7ea68..1a3f98c1d403 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -572,6 +572,7 @@ updjcg(int cylno, time_t modtime, int fsi, int fso, unsigned int Nflag)
if (sblock.fs_magic == FS_UFS1_MAGIC)
acg.cg_old_ncyl = sblock.fs_old_cpg;
+ cgckhash(&acg);
wtfs(fsbtodb(&sblock, cgtod(&sblock, cylno)),
(size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag);
DBG_PRINT0("jcg written\n");
@@ -947,6 +948,7 @@ updcsloc(time_t modtime, int fsi, int fso, unsigned int Nflag)
* Now write the former cylinder group containing the cylinder
* summary back to disk.
*/
+ cgckhash(&acg);
wtfs(fsbtodb(&sblock, cgtod(&sblock, ocscg)),
(size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag);
DBG_PRINT0("oscg written\n");
@@ -1039,6 +1041,7 @@ updcsloc(time_t modtime, int fsi, int fso, unsigned int Nflag)
* Write the new cylinder group containing the cylinder summary
* back to disk.
*/
+ cgckhash(&acg);
wtfs(fsbtodb(&sblock, cgtod(&sblock, ncscg)),
(size_t)sblock.fs_cgsize, (void *)&acg, fso, Nflag);
DBG_PRINT0("nscg written\n");