Date: Tue, 26 Jan 2021 12:01:39 -0800 From: Kirk McKusick <mckusick@mckusick.com> To: Rozhuk Ivan <rozhuk.im@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: fsck strange output Message-ID: <202101262001.10QK1dhq088562@chez.mckusick.com> In-Reply-To: <20210126170841.7efc58c4@rimwks.local>
next in thread | previous in thread | raw e-mail | index | archive | help
> From: Rozhuk Ivan <rozhuk.im@gmail.com> > Date: Tue, 26 Jan 2021 17:08:41 +0300 > To: Kirk McKusick <mckusick@mckusick.com> > Cc: freebsd-current@freebsd.org > Subject: Re: fsck strange output > = > On Mon, 25 Jan 2021 15:40:12 -0800 > Kirk McKusick <mckusick@mckusick.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101262001.10QK1dhq088562>