Page MenuHomeFreeBSD

Retire two unused background fsck sysctls.
ClosedPublic

Authored by jhb on Apr 18 2020, 5:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 14 2024, 2:00 AM
Unknown Object (File)
Jan 2 2024, 12:05 PM
Unknown Object (File)
Dec 20 2023, 7:56 AM
Unknown Object (File)
Dec 18 2023, 8:23 PM
Unknown Object (File)
Oct 11 2023, 1:28 AM
Unknown Object (File)
Oct 11 2023, 1:28 AM
Unknown Object (File)
Sep 30 2023, 12:43 PM
Unknown Object (File)
Sep 4 2023, 2:57 PM
Subscribers

Details

Summary

These two sysctls were added to support UFS softupdates journalling
with snapshots. However, the changes to fsck to use them were never
committed and there have never been any in-tree uses of these sysctls.

More details from Kirk:

When journalling got added to soft updates, its journal rollback freed
blocks that it thought were no longer in use. But it does not take
snapshots into account (i.e., if a snapshot is still using it, then it
cannot be freed). So I added the needed logic to fsck by having the
free go through the kernel's blkfree code so it could grab blocks that
were still needed by snapshots. That is done using the setbufoutput
hack. I never got that code working reliably, so it is still sitting
in my work directory. Which also explains why you still cannot take
snapshots on filesystems running with journalling...

In looking over my use of this feature, and in particular the troubles
I was having with it, I conclude that it may be better to extract the
code from the kernel that handles freeing blocks claimed by snapshots
and putting it into fsck directly. My original intent was that it is
complex and at the time changing, so only having to maintain it in one
place was appealing. But at this point it has not changed in years and
the hacks like setinode and setbufoutput to be able to use the kernel
code is sufficiently ugly, that I am leaning towards just extracting
it.

Test Plan
  • built a kernel on amd64, and grepp'd the tree for any uses of set_inode or the FFS constants

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I concur with this change.
It should be MFC'ed to stable/12 and stable/11.

This revision is now accepted and ready to land.Apr 20 2020, 8:00 PM
This revision was automatically updated to reflect the committed changes.