Do not complain about incorrect cylinder group check-hashes when

asked to add them to a filesystem.

MFC after:    3 days
Sponsored by: Netflix
This commit is contained in:
Kirk McKusick 2021-03-11 22:44:33 -08:00
parent a491581f3f
commit 6385cabd5b

View File

@ -926,7 +926,8 @@ check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild)
* Extended cylinder group checks.
*/
calchash = cgp->cg_ckhash;
if ((sblock.fs_metackhash & CK_CYLGRP) != 0) {
if ((sblock.fs_metackhash & CK_CYLGRP) != 0 &&
(ckhashadd & CK_CYLGRP) == 0) {
cghash = cgp->cg_ckhash;
cgp->cg_ckhash = 0;
calchash = calculate_crc32c(~0L, (void *)cgp, sblock.fs_cgsize);