Date: Fri, 18 Nov 2022 05:58:51 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 267654] UFS "cylinder checksum failed" on temporary storage or data disk on arm64 vm in Azure Message-ID: <bug-267654-227-6jzgPT3LEs@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-267654-227@https.bugs.freebsd.org/bugzilla/> References: <bug-267654-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267654 --- Comment #9 from Kirk McKusick <mckusick@FreeBSD.org> --- Newfs is generating the check hashes using the libufs cgwrite(3) routine. T= he cgwrite(3) routine calls calculate_crc32c() which comes from sys/libkern/gsb_crc32.c. The kernel check also uses calculate_crc32c() from sys/libkern/gsb_crc32.c so they should be getting the same answer. If the structures were somehow laid out differently that might explain it, but the= n a lot of other things would also break. I also note that the same calculate_crc32c() function is used for the superblock checksum and the ino= de checksum which are both working fine which makes it even more of a mystery = why the cylinder group checksums are broken. Another option is to disable cylinder group checksums in newfs(8) using something like this patch: diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 48091d7882d0..5000adff138f 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -499,8 +499,10 @@ mkfs(struct partition *pp, char *fsys) */ if (Oflag > 1) { sblock.fs_flags |=3D FS_METACKHASH; +#ifndef AZURE if (getosreldate() >=3D P_OSREL_CK_CYLGRP) sblock.fs_metackhash |=3D CK_CYLGRP; +#endif if (getosreldate() >=3D P_OSREL_CK_SUPERBLOCK) sblock.fs_metackhash |=3D CK_SUPERBLOCK; if (getosreldate() >=3D P_OSREL_CK_INODE) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267654-227-6jzgPT3LEs>