From owner-freebsd-current@freebsd.org Tue Jan 26 19:58:28 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 873D64FE829 for ; Tue, 26 Jan 2021 19:58:28 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DQHbl3F4Nz3tTG for ; Tue, 26 Jan 2021 19:58:27 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.15.2) with ESMTP id 10QK1dhq088562; Tue, 26 Jan 2021 12:01:39 -0800 (PST) (envelope-from mckusick@mckusick.com) Message-Id: <202101262001.10QK1dhq088562@chez.mckusick.com> From: Kirk McKusick To: Rozhuk Ivan Subject: Re: fsck strange output cc: freebsd-current@freebsd.org X-URL: http://WWW.McKusick.COM/ Reply-To: Kirk McKusick In-reply-to: <20210126170841.7efc58c4@rimwks.local> Comments: In-reply-to Rozhuk Ivan message dated "Tue, 26 Jan 2021 17:08:41 +0300." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <88560.1611691299.1@chez.mckusick.com> Content-Transfer-Encoding: quoted-printable Date: Tue, 26 Jan 2021 12:01:39 -0800 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,MISSING_MID, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on chez.mckusick.com X-Rspamd-Queue-Id: 4DQHbl3F4Nz3tTG X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of mckusick@mckusick.com has no SPF policy when checking 70.36.157.235) smtp.mailfrom=mckusick@mckusick.com X-Spamd-Result: default: False [-2.10 / 15.00]; HAS_REPLYTO(0.00)[mckusick@mckusick.com]; TO_DN_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[70.36.157.235:from]; ASN(0.00)[asn:46375, ipnet:70.36.128.0/19, country:US]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[mckusick]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[mckusick.com]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[70.36.157.235:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-current] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2021 19:58:28 -0000 > From: Rozhuk Ivan > Date: Tue, 26 Jan 2021 17:08:41 +0300 > To: Kirk McKusick > Cc: freebsd-current@freebsd.org > Subject: Re: fsck strange output > = > On Mon, 25 Jan 2021 15:40:12 -0800 > Kirk McKusick wrote: > = > = >> Please try this patch to fsck_ffs and see if it fixes your problem. >> = >> Kirk McKusick >> = >> =3D-=3D-=3D >> = >> *** sbin/fsck_ffs/inode.c.orig 2021-01-07 15:04:04.969086284 >> -0800 --- sbin/fsck_ffs/inode.c 2021-01-25 15:29:06.404803358 >> -0800 *************** >> *** 611,618 **** >> sizeof(struct ufs1_dinode) : sizeof(struct >> ufs2_dinode)); readpercg =3D inosused / fullcnt; >> partialcnt =3D inosused % fullcnt; >> ! partialsize =3D partialcnt * ((sblock.fs_magic =3D=3D >> FS_UFS1_MAGIC) ? ! sizeof(struct ufs1_dinode) : >> sizeof(struct ufs2_dinode)); if (partialcnt !=3D 0) { >> readpercg++; >> } else { >> --- 611,619 ---- >> sizeof(struct ufs1_dinode) : sizeof(struct >> ufs2_dinode)); readpercg =3D inosused / fullcnt; >> partialcnt =3D inosused % fullcnt; >> ! partialsize =3D fragroundup(&sblock, >> ! partialcnt * ((sblock.fs_magic =3D=3D FS_UFS1_MAGIC) ? >> ! sizeof(struct ufs1_dinode) : sizeof(struct >> ufs2_dinode))); if (partialcnt !=3D 0) { >> readpercg++; >> } else { > = > = > https://github.com/rozhuk-im/freebsd/commit/5e8bfa01830e2b6ecb88e572064c= 6fffe5a2df2d > (if I apply correct :) ) > = > With this patch - seems no errors, thanks! Thanks for your testing. It has also corrected the same problem in Peter Holm's test suite. So, I am committed it as 8c22cf9. I will also ensure that it gets MFC'ed into 13.0. Kirk McKusick