Page MenuHomeFreeBSD
Feed Search

Jan 28 2025

mckusick committed rG256389eaf158: Fix build from aa90fbed151de5 by eliminating an unused variable..
Jan 28 2025, 8:49 AM
mckusick committed rGaa90fbed151d: Standardize the definition of a UFS dinode..
Jan 28 2025, 1:41 AM

Jan 25 2025

mckusick committed rG6a356edd4fc3: Fix backward compatibility with UFS1 filesystems created before June 2002.
Jan 25 2025, 9:11 PM

Jan 24 2025

mckusick committed rG544ad91ef9f6: Use ffs_sbget() to replace open-coded superblock reload..
Jan 24 2025, 1:23 AM

Jan 23 2025

mckusick committed rGbb14579988c5: Eliminate unneeded variables and computations..
Jan 23 2025, 6:45 AM
mckusick committed rG26c483aec039: Fix backward compatibility with UFS1 filesystems created before June 2002.
Jan 23 2025, 6:41 AM
mckusick committed rGf31c37f8acb2: Use ffs_sbget() to replace open-coded superblock reload..
Jan 23 2025, 6:39 AM
mckusick committed rG996fe40e05c9: Eliminate unneeded variables and computations..
Jan 23 2025, 6:37 AM

Jan 17 2025

mckusick closed D48472: Fix backward compatibility with UFS1 filesystems created before June 2002.

Committed as 661ca921e8cd56b17fc6615bc7e596e56e0e7c31

Jan 17 2025, 4:22 AM

Jan 16 2025

mckusick committed rG661ca921e8cd: Fix backward compatibility with UFS1 filesystems created before June 2002.
Jan 16 2025, 6:45 PM

Jan 15 2025

mckusick requested review of D48472: Fix backward compatibility with UFS1 filesystems created before June 2002.
Jan 15 2025, 9:53 PM
mckusick committed rGc18a6c15f415: Use ffs_sbget() to replace open-coded superblock reload..
Jan 15 2025, 9:11 PM

Jan 13 2025

mckusick accepted D48378: ffs_reallocblks(): ensure that pref cg is valid.

These changes look correct to me. I am surprised that it has taken this long to trip over this error case.

Jan 13 2025, 5:05 AM

Jan 12 2025

mckusick committed rGdf48361e7792: Eliminate unneeded variables and computations..
Jan 12 2025, 9:52 PM

Jan 9 2025

mckusick added a comment to D48329: ls -h: humanize the total as well.

I agree that -h changes the format of all numbers, So it should just be "x MB".

Jan 9 2025, 6:26 AM
mckusick added a comment to D48374: bsdinstall: Remove advice to turn off SUJ for SSDs.

I largely agree with phk's analysis. SU+J does more writing than just SU (the extra writes being the journal data). Fsck runs very quickly on SSDs since random seeks do not slow it down as they do spinning rust. It would be worthwhile to run a timing test of fsck -p on a large SSD to see if it takes more than say 30 seconds but my guess is that it will not.

Jan 9 2025, 6:07 AM

Dec 18 2024

mckusick added a comment to D47887: style(9): deprecate blank lines without local vars.

Sorry, late to comment.

Dec 18 2024, 9:42 PM

Nov 13 2024

mckusick added a reverting change for rG8733bc277a38: vfs: don't provoke recycling non-free vnodes without a good reason: rG2ca9c96dc0cf: Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90.
Nov 13 2024, 7:53 PM
mckusick committed rG2ca9c96dc0cf: Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90.
Nov 13 2024, 7:52 PM
mckusick added a reverting change for rG8733bc277a38: vfs: don't provoke recycling non-free vnodes without a good reason: rGab05a1cf321a: Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90.
Nov 13 2024, 7:47 PM
mckusick committed rGab05a1cf321a: Revert commit 8733bc277a383cf59f38a83956f4f523869cfc90.
Nov 13 2024, 7:47 PM

Oct 12 2024

mckusick committed rG51b1d399b2de: Ensure that soft updates are not enabled by default when using mdmfs(8).
Oct 12 2024, 10:33 PM
mckusick committed rG54416c6e1379: Ensure that soft updates are not enabled by default when using mdmfs(8).
Oct 12 2024, 10:30 PM

Oct 3 2024

mckusick committed rG5b21d4ad060a: Ensure that soft updates are not enabled by default when using mdmfs(8).
Oct 3 2024, 3:08 PM

Jul 28 2024

mckusick added a comment to D45625: getblk: avoid bufobj interlock when waiting on buf lock.

Sorry to be slow to comment. Like D45624, this change looks functionally correct. Again, the main issue for me is to understand what sort of workload it helps. Do you have an example benchmark whose performance is improved with this change?

Jul 28 2024, 11:42 PM
mckusick added a comment to D45624: lockmgr: introduce lock_sleepgen.

Sorry to be slow to comment. This change looks functionally correct. The main issue for me is to understand what sort of workload it helps. Do you have an example benchmark whose performance is improved with this change?

Jul 28 2024, 11:42 PM
mckusick committed rG21161df3e032: Do not allow snapshots on UFS filesystems using gjournal..
Jul 28 2024, 7:07 PM
mckusick committed rGb45276b1693d: Do not allow snapshots on UFS filesystems using gjournal..
Jul 28 2024, 7:04 PM

Jul 27 2024

mckusick added a comment to D45987: tmpfs: Account for whiteouts during rename/rmdir.

I do not remember why the change to allow the removing of directories with whiteouts became allowed. The changes in commit 996c772f581f56248 are quite extensive. If you can let me know which file(s) in that commit have the relevant changes, I can go back through the changes made in those files for the Lite/2 release to see if any explanation shows up.

Sure, I'm referring to:

--- a/sys/ufs/ufs/ufs_lookup.c
+++ b/sys/ufs/ufs/ufs_lookup.c
@@ -906,7 +961,7 @@ ufs_dirempty(ip, parentino, cred)
                if (dp->d_reclen == 0)
                        return (0);
                /* skip empty entries */
-               if (dp->d_ino == 0)
+               if (dp->d_ino == 0 || dp->d_ino == WINO)
                        continue;
                /* accept only "." and ".." */
 #              if (BYTE_ORDER == LITTLE_ENDIAN)

part of function ufs_dirempty(), which is (now, but if I'm not mistaken also was then) called only by ufs_rename() and ufs_rmdir().

Barring other reasons I can't see now, I think we'd better revert that behavior, both for logical reasons (the directory references no file but still has whiteout entries that we are going to lose silently) and practical ones (e.g., on Linux, whiteouts are implemented as device files, and thus rmdir() on directories holding some will fail with ENOTEMPTY; this is also to ease consistency in ZFS' code).

Jul 27 2024, 1:54 AM

Jul 25 2024

mckusick added a comment to D45987: tmpfs: Account for whiteouts during rename/rmdir.

I suspect that removing a directory with whiteouts was allowed for UFS only because not doing so would confuse most users not aware of whiteouts, as these are not printed by a regular ls. I doubt there was any other reason than that. It appears the test on WINO wasn't in 4.4BSD and was introduced in the Lite/2 commit (996c772f581f56248). Adding @mckusick as he might have some recollection of what lead to this decision.

Jul 25 2024, 6:32 AM
mckusick committed rGcab41e0dd31d: Do not allow snapshots on UFS filesystems using gjournal..
Jul 25 2024, 6:11 AM

May 22 2024

mckusick committed rG017d52e38ab3: Enable soft updates by default for UFS2 filesystems..
May 22 2024, 7:23 PM

May 21 2024

mckusick accepted D45245: getblk: fail faster with GB_LOCK_NOWAIT.

I concur that this seems like a reasonable optimization.

May 21 2024, 5:23 AM
mckusick accepted D45248: lockmgr: make lockmgr_disowned public and use it.

Useful abstraction of internal state.

May 21 2024, 5:23 AM
mckusick accepted D45249: buf: define and use BUF_DISOWNED.

Better to avoid use of internal lock state.

May 21 2024, 5:23 AM

May 16 2024

mckusick committed rG6b2af2d88ffd: Enable soft updates by default for UFS2 filesystems..
May 16 2024, 11:45 PM
mckusick committed rG7465f9fc0646: Enable soft updates by default for UFS2 filesystems..
May 16 2024, 6:56 AM

May 15 2024

mckusick accepted D45208: vfs_domount_update(): postpone setting MNT_UNION until VFS_MOUNT() is done.

This looks like the correct fix. One other unrelated nit.

May 15 2024, 7:47 PM
mckusick committed rG61dece6d27fb: Enable soft updates by default for UFS2 filesystems..
May 15 2024, 5:41 AM
mckusick closed D45201: Enable soft updates by default for UFS2 filesystems.
May 15 2024, 5:41 AM
mckusick requested review of D45201: Enable soft updates by default for UFS2 filesystems.
May 15 2024, 12:32 AM

Mar 17 2024

mckusick added a comment to D44319: Support 64KB cluster size in MSDOSFS.

In general b_lblkno is for the use of the client of the buffer cache to use for whatever purpose they want. The b_blkno is what the underlying hardware is going to use to locate the requested data. The filesystem generally uses its BMAP routine to convert the b_lblkno to the appropriate b_blkno.

Mar 17 2024, 6:49 AM

Mar 11 2024

mckusick committed rG9cfb9a34bf15: Eliminate unnecessary UFS1 integrity checks..
Mar 11 2024, 8:51 PM

Mar 5 2024

mckusick committed rG8c6964b779ce: Eliminate unnecessary UFS1 integrity checks..
Mar 5 2024, 12:19 AM
mckusick committed rGfdfb8e783c3e: Eliminate unnecessary UFS1 integrity checks..
Mar 5 2024, 12:10 AM

Feb 28 2024

mckusick added a comment to D38789: makefs: allow to create a immutable ffs (eg. rootfs).

[...] It would be possible to add another flag to the existing um_flags word with the semantic that the filesystem can be mounted only as read-only (UM_READONLY). Of course it would still be possible for the superuser to clear this flag but it takes slightly more effort.

Yes, that is a great approach!
I will look into it / make a proposal.

In a second step, we could guard the UM_READONLY flag via the
existing FFS superblock checksum logic in way that fsck will detect
and refuse to auto-repair a manual flag clean attempt.

Thank you!

Feb 28 2024, 10:42 PM
mckusick abandoned D41747: Ensure I/O buffers in fsck_ffs(8) are 64-byte aligned.

Relevant parts of these changes were incorporated in commit 772430dd6795585 as discussed in PR 267654 and review https://reviews.freebsd.org/D41724.

Feb 28 2024, 10:32 PM

Feb 20 2024

mckusick accepted D43978: Fix pseudo-inode calculation in FAT12/FAT16.

This does fix the problem as described in the summary.

Feb 20 2024, 6:01 AM
mckusick added a comment to D43978: Fix pseudo-inode calculation in FAT12/FAT16.

If I understand your change, you are coming up with a different synthetic inode value to ensure that it will be unique. Presumably this value is externally visible as the "st_ino" in the stat structure and the "d_fileno" in the dirent structure. If so, this value will be different after this change so any program that has saved it somewhere could get confused. Not sure if this is really an issue though.

Feb 20 2024, 3:36 AM
mckusick committed rGb241767f8ef3: Eliminate unnecessary UFS1 integrity checks..
Feb 20 2024, 12:18 AM

Feb 17 2024

mckusick accepted D43951: Fix MSDOSFS rename (in case target exists).

Non-obvious bug, but once figured out the fix is simple and clearly correct.

Feb 17 2024, 8:39 PM

Dec 17 2023

mckusick committed rG2e4ac696d8d4: Increase UFS/FFS maximum link count from 32767 to 65530..
Dec 17 2023, 3:49 AM
mckusick committed rG636bf719194c: Increase UFS/FFS maximum link count from 32767 to 65530..
Dec 17 2023, 3:47 AM

Dec 4 2023

mckusick committed rG42bcec08a25f: Spacing and alignment cleanups..
Dec 4 2023, 11:30 PM
mckusick committed rG468605fd3c38: Spacing and alignment cleanups..
Dec 4 2023, 11:27 PM

Dec 3 2023

mckusick added a comment to D42767: Increase UFS/FFS maximum link count from 32767 to 65530.

I would be happy to review a subsequent patch to make i_nlink a 16-bit unsigned int and move/adapt the KASSERT() checking for underflow.

Dec 3 2023, 8:45 PM
mckusick closed D42767: Increase UFS/FFS maximum link count from 32767 to 65530.
Dec 3 2023, 8:41 PM
mckusick committed rG35a301555bff: Increase UFS/FFS maximum link count from 32767 to 65530..
Dec 3 2023, 8:41 PM

Nov 28 2023

mckusick updated the diff for D42767: Increase UFS/FFS maximum link count from 32767 to 65530.

Change in-memory i_nlink to a signed 32-bit value so that can check that it has not gone negative before assigning it to the on-disk unsigned 16-bit di_nlink field.

Nov 28 2023, 5:45 PM
mckusick added a comment to D42767: Increase UFS/FFS maximum link count from 32767 to 65530.
In D42767#975487, @kib wrote:

ffs_softdep.c has several lines of kind

sys/ufs/ffs/ffs_softdep.c:    KASSERT(ip->i_nlink >= 0, ("handle_workitem_remove: file ino "

which no longer make sense.

There are less critical comparisons like ip->i_nlink <= 0 at least in ufs_inode.c and ufs_vnops.c which could be cleaned up.

Actually i_nlink is a signed 32-bit value where the nlink count is maintained while the inode is in memory. So it can in fact be checked for negative values which of course should never be copied to the 16-bit unsigned value that is maintained on the disk.

Nov 28 2023, 4:37 PM
mckusick added a comment to D42767: Increase UFS/FFS maximum link count from 32767 to 65530.
In D42767#975487, @kib wrote:

ffs_softdep.c has several lines of kind

sys/ufs/ffs/ffs_softdep.c:    KASSERT(ip->i_nlink >= 0, ("handle_workitem_remove: file ino "

which no longer make sense.

There are less critical comparisons like ip->i_nlink <= 0 at least in ufs_inode.c and ufs_vnops.c which could be cleaned up.

Nov 28 2023, 4:36 PM

Nov 25 2023

mckusick requested review of D42767: Increase UFS/FFS maximum link count from 32767 to 65530.
Nov 25 2023, 4:01 AM

Nov 17 2023

mckusick committed rGbde3cdf18d98: Spacing and alignment cleanups..
Nov 17 2023, 10:40 PM
mckusick closed D41724: Ensure I/O buffers in libufs(3) are 128-byte aligned.
Nov 17 2023, 10:12 PM
mckusick committed rG772430dd6795: Ensure I/O buffers in libufs(3) are 128-byte aligned..
Nov 17 2023, 10:12 PM
mckusick updated the diff for D41724: Ensure I/O buffers in libufs(3) are 128-byte aligned.

Per kib suggestions:

Nov 17 2023, 1:52 AM

Nov 15 2023

mckusick added inline comments to D41724: Ensure I/O buffers in libufs(3) are 128-byte aligned.
Nov 15 2023, 1:33 AM
mckusick updated the diff for D41724: Ensure I/O buffers in libufs(3) are 128-byte aligned.

Comments from kib.

Nov 15 2023, 1:26 AM
mckusick updated the summary of D41724: Ensure I/O buffers in libufs(3) are 128-byte aligned.
Nov 15 2023, 1:23 AM

Nov 12 2023

mckusick committed rGd3d779f64754: Delete snapshot after opening it when running fsck_ffs(9) in background..
Nov 12 2023, 6:52 AM
mckusick committed rG27133e6e86c1: Delete snapshot after opening it when running fsck_ffs(9) in background..
Nov 12 2023, 6:49 AM

Oct 28 2023

mckusick committed rGb08c5c8acf1e: Fix a bug in fsck_ffs(8) triggered by corrupted filesystems..
Oct 28 2023, 9:15 PM
mckusick committed rG0bd8274c8529: Fix a bug in fsck_ffs(8) triggered by corrupted filesystems..
Oct 28 2023, 9:11 PM

Oct 25 2023

mckusick committed rGd3a36e4b7459: Delete snapshot after opening it when running fsck_ffs(9) in background..
Oct 25 2023, 10:39 PM

Oct 20 2023

mckusick committed rG3943698c6dbe: Minor sysctl description cleanup..
Oct 20 2023, 10:34 PM
mckusick committed rG1e39a0886e09: Fix a bug in fsck_ffs(8) triggered by corrupted filesystems..
Oct 20 2023, 10:16 PM

Oct 18 2023

mckusick accepted D41645: geom_union: Add test for geom_union..

Sorry, I thought I had approved this and missed your (useful) update.

Oct 18 2023, 3:59 AM

Sep 8 2023

mckusick updated the diff for D41747: Ensure I/O buffers in fsck_ffs(8) are 64-byte aligned.

Updates reflecting comments from kib.

Sep 8 2023, 6:36 AM
mckusick added a comment to D41724: Ensure I/O buffers in libufs(3) are 128-byte aligned.

I do not know which if any disk controllers are currently affected. It is a problem that comes and goes. Adding the alignment hook allows buffer alignment to be easily adjusted as needed. It also has the performance improvement of not requiring disk drivers to use bounce buffers in cases that they previously needed to do so.

Sep 8 2023, 6:34 AM
mckusick updated the diff for D41724: Ensure I/O buffers in libufs(3) are 128-byte aligned.

Updates reflecting comments from kib and imp.

Sep 8 2023, 6:30 AM

Sep 6 2023

mckusick accepted D41645: geom_union: Add test for geom_union..

This all looks good to go. Thanks for doing it.

Sep 6 2023, 5:49 AM

Sep 5 2023

mckusick added reviewers for D41747: Ensure I/O buffers in fsck_ffs(8) are 64-byte aligned: kib, lwhsu.
Sep 5 2023, 9:54 PM
mckusick requested review of D41747: Ensure I/O buffers in fsck_ffs(8) are 64-byte aligned.
Sep 5 2023, 9:52 PM
mckusick updated the diff for D41724: Ensure I/O buffers in libufs(3) are 128-byte aligned.

Update to reflect suggested changes by kib.

Sep 5 2023, 8:58 PM
mckusick requested review of D41724: Ensure I/O buffers in libufs(3) are 128-byte aligned.
Sep 5 2023, 6:35 AM

Sep 2 2023

mckusick accepted D41645: geom_union: Add test for geom_union..

Your checksum test is a good way to verify that everything worked as expected though it is possible that some sort of filesystem corruption snuck in (obviously to both copies). So you might want to add a second check by running 'fsck -p -f' on the both the gunion filesystem and the original filesystem after the gunion has been dissolved. The exit status from fsck should be zero.

Sep 2 2023, 5:52 PM
mckusick added a comment to D41645: geom_union: Add test for geom_union..

I am happy to see a set of gunion tests being added. The set of tests looks complete.

Sep 2 2023, 6:37 AM

Aug 20 2023

mckusick committed rG47048a611dd2: Set UFS/FFS file type to snapshot before changing its block pointers..
Aug 20 2023, 4:30 AM
mckusick committed rG817bac9a6327: Optimize operations on UFS/FFS filesystems with bad cylinder group(s)..
Aug 20 2023, 4:30 AM
mckusick committed rG7f65ff3d8854: Cleanups to UFS/FFS ffs_checkblk()..
Aug 20 2023, 4:30 AM
mckusick committed rGc1854e43b352: Clean up and document UFS/FFS error returns..
Aug 20 2023, 4:30 AM
mckusick committed rG2d20a3178a72: Remove a partial UFS/FFS snapshot if it fails to build successfully..
Aug 20 2023, 4:30 AM
mckusick committed rGa11c97bb79e7: Rate limit kernel UFS/FFS cylinder group check-hash error messages..
Aug 20 2023, 4:29 AM
mckusick committed rG3085e04892e2: Handle UFS/FFS file deletion from cylinder groups with check-hash failure..
Aug 20 2023, 4:29 AM
mckusick committed rG6412782800fa: Support background fsck_ffs(8) on filesystems using journaled soft updates.
Aug 20 2023, 4:29 AM
mckusick committed rG2e025e410760: Update newfs(8) and tunefs(8) manual pages..
Aug 20 2023, 4:29 AM

Aug 12 2023

mckusick committed rGdb25f7b14097: Improve dumpfs(8) error messages when a cylinder group read fails..
Aug 12 2023, 7:12 PM
mckusick committed rG220427da0e9b: Set UFS/FFS file type to snapshot before changing its block pointers..
Aug 12 2023, 6:21 PM

Aug 11 2023

mckusick committed rGc3046779b241: Optimize operations on UFS/FFS filesystems with bad cylinder group(s)..
Aug 11 2023, 6:04 AM
mckusick committed rG677023529d6a: Cleanups to UFS/FFS ffs_checkblk()..
Aug 11 2023, 5:40 AM