<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test/sbin/fsck_ffs, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/'/>
<updated>2020-12-18T23:28:27Z</updated>
<entry>
<title>Rename pass4check() to freeblock() and move from pass4.c to inode.c.</title>
<updated>2020-12-18T23:28:27Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2020-12-18T23:28:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=7180f1ab40e22f3f6b8d50d05c6ae186de54e90a'/>
<id>urn:sha1:7180f1ab40e22f3f6b8d50d05c6ae186de54e90a</id>
<content type='text'>
The new name more accurately describes what it does and the file move
puts it with other similar functions. Done in preparation for future
cleanups. No functional differences intended.

Sponsored by: Netflix
Historic Footnote: my last FreeBSD svn commit
</content>
</entry>
<entry>
<title>Use proper type (ino_t) for inode numbers to avoid improper sign extention</title>
<updated>2020-10-25T21:04:07Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2020-10-25T21:04:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=2d34afcd04207cf3fa3d5b7f467a890eae75da41'/>
<id>urn:sha1:2d34afcd04207cf3fa3d5b7f467a890eae75da41</id>
<content type='text'>
in the Pass 5 checks. The manifestation was fsck_ffs exiting with this error:

  ** Phase 5 - Check Cyl groups
  fsck_ffs: inoinfo: inumber 18446744071562087424 out of range

The error only manifests itself for filesystems bigger than about 100Tb.

Reported by:  Nikita Grechikhin &lt;ngrechikhin at yandex.ru&gt;
MFC after:    2 weeks
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>Various new check-hash checks have been added to the UFS filesystem</title>
<updated>2020-10-25T00:43:48Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2020-10-25T00:43:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=996d40f91d7c3ca1b4efa11a4f59ee47c924eab1'/>
<id>urn:sha1:996d40f91d7c3ca1b4efa11a4f59ee47c924eab1</id>
<content type='text'>
over various major releases. Superblock check hashes were added for
the 12 release and cylinder-group and inode check hashes will appear
in the 13 release.

When a disk with a UFS filesystem is writably mounted, the kernel
clears the feature flags for anything that it does not support. For
example, if a UFS disk from a 12-stable kernel is mounted on an
11-stable system, the 11-stable kernel will clear the flag in the
filesystem superblock that indicates that superblock check-hashs
are being maintained. Thus if the disk is later moved back to a
12-stable system, the 12-stable system will know to ignore its
incorrect check-hash.

If the only filesystem modification done on the earlier kernel is
to run a utility such as growfs(8) that modifies the superblock but
neither updates the check-hash nor clears the feature flag indicating
that it does not support the check-hash, the disk will fail to mount
if it is moved back to its original newer kernel.

This patch moves the code that clears the filesystem feature flags
from the mount code (ffs_mountfs()) to the code that reads the
superblock (ffs_sbget()). As ffs_sbget() is used by the kernel mount
code and is imported into libufs(3), all the filesystem utilities
will now also clear these flags when they make modifications to the
filesystem.

As suggested by John Baldwin, fsck_ffs(8) has been changed to accept
and repair bad superblock check-hashes rather than refusing to run.
This change allows fsck to recover filesystems that have been impacted
by utilities older than those created after this change and is a
sensible thing to do in any event.

Reported by:  John Baldwin (jhb@)
MFC after:    2 weeks
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>Update the libufs cgget() and cgput() interfaces to have a similar</title>
<updated>2020-09-19T22:48:30Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2020-09-19T22:48:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=85ee267a3eb58f9aa1a73a1abcf033c5c460b324'/>
<id>urn:sha1:85ee267a3eb58f9aa1a73a1abcf033c5c460b324</id>
<content type='text'>
API to the sbget() and sbput() interfaces. Specifically they take
a file descriptor pointer rather than the struct uufsd *disk pointer
used by the libufs cgread() and cgwrite() interfaces. Update fsck_ffs
to use these revised interfaces.

No functional changes intended.

Sponsored by: Netflix
</content>
</entry>
<entry>
<title>Move all of the error prints in readsb() from stderr to stdout.</title>
<updated>2020-09-01T18:50:26Z</updated>
<author>
<name>Chuck Silvers</name>
<email>chs@FreeBSD.org</email>
</author>
<published>2020-09-01T18:50:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=e83370448fd9023625774e74db472c2bf4485816'/>
<id>urn:sha1:e83370448fd9023625774e74db472c2bf4485816</id>
<content type='text'>
The only output from fsck that should go to stderr is the usage message.
if setup() fails then exit with EEXIT rather than 0.

Reviewed by:	mckusick
Sponsored by:	Netflix
</content>
</entry>
<entry>
<title>Use the sbput() function to write alternate superblocks so that</title>
<updated>2020-08-15T21:40:36Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2020-08-15T21:40:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=f644caad88237bb645bd7c61ec1c28582978f435'/>
<id>urn:sha1:f644caad88237bb645bd7c61ec1c28582978f435</id>
<content type='text'>
they get a checkhash.

PR:           246983
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>The libufs library needs to track and free the new fs_si structure</title>
<updated>2020-06-23T21:28:26Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2020-06-23T21:28:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=92c839a156ba96c821e8b6c16892f583115b6d40'/>
<id>urn:sha1:92c839a156ba96c821e8b6c16892f583115b6d40</id>
<content type='text'>
in addition to the fs_csp structure that it references.

PR:           247425
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>Inode check-hash errors were being reported after system crashes.</title>
<updated>2020-04-10T23:58:07Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2020-04-10T23:58:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=0c08ecdff3dfdaf6db5e882c8cd816f354284ab3'/>
<id>urn:sha1:0c08ecdff3dfdaf6db5e882c8cd816f354284ab3</id>
<content type='text'>
Trace the cause down to journalled soft updates recovery code in
fsck failing to recompute the check-hash after updating an inode.

As inode check-hash was first introduced to UFS in FreeBSD 13,
there is no need to MFC this commit.

Reported by:  Chuck Silvers
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>Add an inode check-hash verification when running the journalled</title>
<updated>2020-04-10T23:49:34Z</updated>
<author>
<name>Kirk McKusick</name>
<email>mckusick@FreeBSD.org</email>
</author>
<published>2020-04-10T23:49:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=2a18059670480dbe6eb49a3258463fe5dfcf00a9'/>
<id>urn:sha1:2a18059670480dbe6eb49a3258463fe5dfcf00a9</id>
<content type='text'>
soft update recovery code with the debugging (-d) option.

As inode check-hash was first introduced to UFS in FreeBSD 13,
there is no need to MFC this commit.

Reported by:  Chuck Silvers
Sponsored by: Netflix
</content>
</entry>
<entry>
<title>fsck_ffs/fsdb: fix -fno-common build</title>
<updated>2020-03-29T20:03:46Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-03-29T20:03:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test/commit/?id=c3e9752ea1360595e63ef5f4219faae51ed5bef2'/>
<id>urn:sha1:c3e9752ea1360595e63ef5f4219faae51ed5bef2</id>
<content type='text'>
This one is also a small list:

- 3x duplicate definition (ufs2_zino, returntosingle, nflag)
- 5x 'needs extern', 3/5 of which are referenced in fsdb

-fno-common will become the default in GCC10/LLVM11.

MFC after:	1 week
</content>
</entry>
</feed>
