Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 2021 05:00:21 GMT
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: cad6b1e358b4 - stable/12 - Clean up fsck_ffs error message output.
Message-ID:  <202105170500.14H50LtD053502@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by mckusick:

URL: https://cgit.FreeBSD.org/src/commit/?id=cad6b1e358b448e114d87607278cb7860ef661d1

commit cad6b1e358b448e114d87607278cb7860ef661d1
Author:     Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2021-04-27 01:42:48 +0000
Commit:     Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2021-05-17 05:03:32 +0000

    Clean up fsck_ffs error message output.
    
    (cherry picked from commit 689724cb23c2acf58091c80f27de4823d7cd87ca)
    
    Sponsored by: Netflix
---
 sbin/fsck_ffs/fsutil.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c
index 84c4437d3312..df2e62d583c2 100644
--- a/sbin/fsck_ffs/fsutil.c
+++ b/sbin/fsck_ffs/fsutil.c
@@ -682,6 +682,7 @@ int
 check_cgmagic(int cg, struct bufarea *cgbp)
 {
 	struct cg *cgp = cgbp->b_un.b_cg;
+	static int prevfailcg = -1;
 
 	/*
 	 * Extended cylinder group checks.
@@ -697,6 +698,9 @@ check_cgmagic(int cg, struct bufarea *cgbp)
 	      cgp->cg_initediblk <= sblock.fs_ipg))) {
 		return (1);
 	}
+	if (prevfailcg == cg)
+		return (0);
+	prevfailcg = cg;
 	pfatal("CYLINDER GROUP %d: BAD MAGIC NUMBER", cg);
 	if (!reply("REBUILD CYLINDER GROUP")) {
 		printf("YOU WILL NEED TO RERUN FSCK.\n");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105170500.14H50LtD053502>