Page MenuHomeFreeBSD

mckusick (Marshall Kirk McKusick)
User

Projects

User Details

User Since
Oct 24 2014, 7:17 PM (611 w, 1 d)

Recent Activity

Fri, Jul 10

mckusick accepted D57658: Implement AT_RENAME_EXCHANGE flag for VFS and tmpfs.

Adding the VFS infrastructure for exchange is useful. Further discussion of adding exchange functionality to UFS can continue in a new review.

Fri, Jul 10, 1:04 AM

Wed, Jul 8

mckusick added a comment to D57658: Implement AT_RENAME_EXCHANGE flag for VFS and tmpfs.

Do any file systems besides tmpfs support exchange?

Wed, Jul 8, 11:25 PM

Tue, Jul 7

mckusick added a comment to D57658: Implement AT_RENAME_EXCHANGE flag for VFS and tmpfs.

I like the approach that you suggest. In thinking about the implementation it seems like the approach for exchange(a, b) would be:

Tue, Jul 7, 8:08 PM

Mon, Jul 6

mckusick added a comment to D57658: Implement AT_RENAME_EXCHANGE flag for VFS and tmpfs.

Having had overnight to think through how to implement AT_RENAME_EXCHANGE in UFS, it will require a journal. If the operation is single threaded or at least kept to a bounded number in parallel, the log can be kept in an area that fits in the disk block holding the superblock. The journal entry simply needs to keep entries for the two names being exchanged. Specifically, the inode number of their resident directory, their name, and the inode number that they should reference. A flag in the superblock can indicate that the journal needs to be checked. If so, fsck can look up each name and verify that it references the correct inode number correcting it if it is wrong.

Mon, Jul 6, 7:09 PM
mckusick added a comment to D58058: exterr: relax format restrictions.

Oops, sorry, posted to the wrong phabricator review.

Mon, Jul 6, 7:06 PM
mckusick added a comment to D58058: exterr: relax format restrictions.

Having had overnight to think through how to implement AT_RENAME_EXCHANGE in UFS, it will require a journal. If the operation is single threaded or at least kept to a bounded number in parallel, the log can be kept in an area that fits in the disk block holding the superblock. The journal entry simply needs to keep entries for the two names being exchanged. Specifically, the inode number of their resident directory, their name, and the inode number that they should reference. A flag in the superblock can indicate that the journal needs to be checked. If so, fsck can look up each name and verify that it references the correct inode number correcting it if it is wrong.

Mon, Jul 6, 7:05 PM
mckusick added a comment to D57658: Implement AT_RENAME_EXCHANGE flag for VFS and tmpfs.
In D57658#1331128, @kib wrote:

This cannot be implemented in UFS since a requirement of its consistency model is that the on-disk image is always consistent. If the directory entries being swapped are in two different disk blocks, then there is no order of writing that will have a consistent filesystem. The only way to ensure consistency is to have a journal that can correct the unwritten directory name with its updated inode number.

In other words, it cannot be implemented for SU, but can for async and for SU+J, do you agree?

Mon, Jul 6, 6:28 AM
mckusick added a comment to D57658: Implement AT_RENAME_EXCHANGE flag for VFS and tmpfs.

This cannot be implemented in UFS since a requirement of its consistency model is that the on-disk image is always consistent. If the directory entries being swapped are in two different disk blocks, then there is no order of writing that will have a consistent filesystem. The only way to ensure consistency is to have a journal that can correct the unwritten directory name with its updated inode number.

Mon, Jul 6, 5:27 AM

Jun 9 2026

mckusick committed rGa64877b140fe: Avoid incorrect UFS1 timestamp corrections when system clock fails at boot. (authored by mckusick).
Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
Jun 9 2026, 9:27 PM
mckusick accepted D56490: time: Add EXTERROR for all EINVAL returns.

Your title on this phabricator review needs to be more specific. There are about 11,000 instances of EINVAL returns and you are not adding EXTERROR for all of them. So being a bit more specific about which subsystem you are doing is needed.

Jun 9 2026, 6:40 PM

Jun 2 2026

mckusick committed rG553ef188f7ec: Avoid incorrect UFS1 timestamp corrections when system clock fails at boot. (authored by mckusick).
Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
Jun 2 2026, 12:16 AM
mckusick closed D57371: Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
Jun 2 2026, 12:15 AM

Jun 1 2026

mckusick updated the summary of D57371: Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
Jun 1 2026, 12:18 AM
mckusick updated the diff for D57371: Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.

Add time check to loading of inodes in libufs per comment by Andre Albsmeier.

Jun 1 2026, 12:16 AM
mckusick added a comment to D57371: Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
In D57371#1314488, @imp wrote:

I'd be tempted to double the tolerance to 1 minute. Some drives with write caching enable won't flush everything to medium so maybe the prior SB is still on the medium. We don't seem to send a BIO_FLUSH down, but this is from code inspection and maybe I missed something. One could speculate that further writes were lost, but while 30s is a long time to the drive, a few seconds might not be so you may find files on these drives past 30s by a little bit and 1 minute seems like a sensible limit to account for it.

Since I wasn't sure, I asked Claude and it said no too. It knew I asked the wrong question too...

me> when we flush the super block with ffs_sbflush, do we send a BIO_FLUSH down afterwards?
● The function is called ffs_sbupdate, not ffs_sbflush. Let me read the implementation.
● No, ffs_sbupdate does not send a BIO_FLUSH after writing the superblock. It writes the superblock (and summary information) using bwrite() or bawrite() depending on the waitfor flag, but there is no subsequent BIO_FLUSH issued to force the data to stable storage on the device.

The write path is:
1. Copy the superblock into a buffer (getblk + bcopy)
2. Write it with bwrite() (synchronous, waits for I/O completion) or bawrite() (async)

bwrite() waits for the I/O to complete at the BIO layer, but that doesn't guarantee the drive's write cache has been flushed to media — that would require an explicit BIO_FLUSH. None of the callers of   ffs_sbupdate appear to issue one either.

(Note: the function is ffs_sbupdate, not ffs_sbflush — there is no ffs_sbflush in the tree.)
Jun 1 2026, 12:13 AM
mckusick added a comment to D57371: Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
In D57371#1314400, @kib wrote:

ffs_load_inode() is used from ffs_vgetf(), and might set the IN_MODIFIED flag. This breaks suspension for FFS1. Note that despite FF1 not supports snapshots, we still need to suspend it for several VFS ops.

This is pre-existing bug.

Jun 1 2026, 12:06 AM

May 30 2026

mckusick requested review of D57371: Avoid incorrect UFS1 timestamp corrections when system clock fails at boot.
May 30 2026, 10:33 PM
mckusick accepted D57313: Fix MSDOSFS to support UTF-16 surrogate pairs.

This now looks ready to commit.

May 30 2026, 9:01 PM

May 29 2026

mckusick added a comment to D57313: Fix MSDOSFS to support UTF-16 surrogate pairs.

Have you run your suggested tests?

May 29 2026, 4:34 AM
mckusick accepted D56967: jail: add allow.mount.all to allow mounting any filesystem.

Still fine with this change.

May 29 2026, 4:30 AM

May 24 2026

mckusick accepted D56967: jail: add allow.mount.all to allow mounting any filesystem.

This is a useful addition. I don't have an opinion on whether unsafe should be in the name.

May 24 2026, 5:38 AM

May 17 2026

mckusick accepted D57036: ufs: ufs_bmap_seekdata() needs mapped buffer for scan.

Sorry for the delay in answering. I am in a remote area of California and the power / Internet has been out since just after I sent my question. Power outages are unfortunately routine enough for you that you can work around them, me not so much.

May 17 2026, 9:56 PM
mckusick added a comment to D57036: ufs: ufs_bmap_seekdata() needs mapped buffer for scan.

Why does ufs_bmap_seekdata() cause a panic when it uses an unmapped buffer?

May 17 2026, 4:31 AM

Apr 21 2026

mckusick accepted D56542: kdump: tweaks for the extended errors decoding.

Much more complete and useful output.

Apr 21 2026, 10:52 PM

Apr 20 2026

mckusick added a comment to D56490: time: Add EXTERROR for all EINVAL returns.

Always glad to see more use of EXTERROR.

Apr 20 2026, 12:21 AM

Apr 5 2026

mckusick accepted D56245: tunefs: Better fix for arm64 alignment issues.

This now looks complete and correct.

Apr 5 2026, 10:02 PM

Apr 3 2026

mckusick added a comment to D56245: tunefs: Better fix for arm64 alignment issues.

You could also do something similar with the directory filling routine dir_clear_block() and the two functions that call it dir_insert() and dir_extend().

Apr 3 2026, 11:33 PM

Mar 30 2026

mckusick accepted D55594: amdsmu: Cezanne support.

Time to get this committed.

Mar 30 2026, 8:26 PM

Mar 26 2026

mckusick committed rG981cd082a40e: Provide more precise error explanations for mmap(2) EINVAL errors. (authored by mckusick).
Provide more precise error explanations for mmap(2) EINVAL errors.
Mar 26 2026, 5:48 AM
mckusick committed rGb0ef93ae3f63: Delete error-check code that can never happen. (authored by mckusick).
Delete error-check code that can never happen.
Mar 26 2026, 5:43 AM

Mar 20 2026

mckusick accepted D56002: tunefs: Don't combine GEOM journaling with SU.

Good to get the consistency.

Mar 20 2026, 11:48 PM
mckusick accepted D55999: newfs: Don't combine GEOM journaling with SU.

Good to update the manual page.

Mar 20 2026, 11:47 PM
mckusick accepted D55999: newfs: Don't combine GEOM journaling with SU.

Looks good. Not clear that soft updates and GEOM will not work at cross purposes with each other..

Mar 20 2026, 9:55 PM

Mar 19 2026

mckusick committed rGdad6e6fc1ea4: Provide more precise error explanations for mmap(2) EINVAL errors. (authored by mckusick).
Provide more precise error explanations for mmap(2) EINVAL errors.
Mar 19 2026, 12:53 AM
mckusick closed D55888: Refinement of extended errors for mmap(2).
Mar 19 2026, 12:53 AM
mckusick committed rG51446d33c6fb: Delete error-check code that can never happen. (authored by mckusick).
Delete error-check code that can never happen.
Mar 19 2026, 12:48 AM

Mar 18 2026

mckusick added a comment to D55888: Refinement of extended errors for mmap(2).

This time for sure!

Mar 18 2026, 12:50 AM
mckusick updated the diff for D55888: Refinement of extended errors for mmap(2).

Further error message refinement.

Mar 18 2026, 12:49 AM

Mar 17 2026

mckusick added a comment to D55888: Refinement of extended errors for mmap(2).

Valid complaint, but not sure what the error message should be for the third case.

Mar 17 2026, 9:40 PM
mckusick added a comment to D55888: Refinement of extended errors for mmap(2).

Update per your suggestion.

Mar 17 2026, 8:46 PM
mckusick updated the diff for D55888: Refinement of extended errors for mmap(2).

Update per kib's suggestion.

Mar 17 2026, 8:45 PM
mckusick requested review of D55888: Refinement of extended errors for mmap(2).
Mar 17 2026, 12:50 AM

Mar 7 2026

mckusick committed rGb7a7d51107f3: Refinements to the output when the EXTERROR_VERBOSE environment is set (authored by mckusick).
Refinements to the output when the EXTERROR_VERBOSE environment is set
Mar 7 2026, 12:12 AM

Feb 26 2026

mckusick committed rG6fd98877de63: Refinements to the output when the EXTERROR_VERBOSE environment is set (authored by mckusick).
Refinements to the output when the EXTERROR_VERBOSE environment is set
Feb 26 2026, 6:29 AM
mckusick closed D55494: Refinement to kernel extended error reporting.
Feb 26 2026, 6:29 AM
mckusick planned changes to D55494: Refinement to kernel extended error reporting.
Feb 26 2026, 6:11 AM

Feb 25 2026

mckusick added a comment to D55498: exterr: support for EXTERROR_VERBOSE=brief.

If you don't have kernel strings, you need to print the long form.

Feb 25 2026, 9:29 PM
mckusick updated the summary of D55494: Refinement to kernel extended error reporting.
Feb 25 2026, 9:25 PM
mckusick updated the diff for D55494: Refinement to kernel extended error reporting.

Incorporate changes recommended by kib.

Feb 25 2026, 9:21 PM
mckusick requested review of D55494: Refinement to kernel extended error reporting.
Feb 25 2026, 12:28 AM

Feb 18 2026

mckusick accepted D55323: <sys/extattr.h>: use designated initializers for EXTATTR_NAMESPACE_NAMES.

This adds clarity for me.

Feb 18 2026, 9:46 PM

Feb 17 2026

mckusick accepted D55337: libc: improve include usage for exterror sources.

Looks good.

Feb 17 2026, 10:05 PM
mckusick accepted D55336: libc: add man page for uexterr_gettext(3).

Fix some grammar nits.

Feb 17 2026, 10:04 PM
mckusick accepted D55327: libc: print extended errors from warn(3) and vwarn(3).

Most helpful, thanks.

Feb 17 2026, 6:58 PM

Jan 21 2026

mckusick accepted D54783: mdmfs: Fix soft updates logic.

Agreed, better way to do it.

Jan 21 2026, 8:44 PM

Jan 12 2026

mckusick accepted D54662: Remove the DEBUG_VFS_LOCKS kernel option.

This is long overdue.

Jan 12 2026, 5:06 AM

Jan 9 2026

mckusick accepted D54576: newfs: Add an option to disable soft updates.
Jan 9 2026, 7:29 PM

Jan 8 2026

mckusick added inline comments to D54576: newfs: Add an option to disable soft updates.
Jan 8 2026, 9:50 PM
mckusick added a comment to D54576: newfs: Add an option to disable soft updates.

You do not specify what happens if both -U and -u are specified. In practice, whichever one is second wins out. I think it should be flagged as an error.

Jan 8 2026, 5:43 AM

Dec 28 2025

mckusick accepted D54380: exterror: support %d in error messages.

This is a great step ahead. Looking forward to having it in production.

Dec 28 2025, 11:32 PM
mckusick added a comment to D54380: exterror: support %d in error messages.

Coming down the home stretch. Just three more comments.

Dec 28 2025, 9:42 PM
mckusick added a comment to D54380: exterror: support %d in error messages.

Providing the file names is a great improvement. I like the way you have automated their generation.

Dec 28 2025, 7:47 PM
mckusick accepted D54380: exterror: support %d in error messages.

Everything looks good.

Dec 28 2025, 3:07 AM

Dec 27 2025

mckusick accepted D54380: exterror: support %d in error messages.

Much more useful output to the user.

Dec 27 2025, 11:46 PM

Dec 9 2025

mckusick accepted D53950: Add libxo support to `gpart show` and document libxo flags in geom and gpart man pages.

This LGTM. I will commit it Dec 9th if no objections are raised.

Dec 9 2025, 12:22 AM
mckusick accepted D54032: sndctl(8): Add libxo support.

This LGTM.

Dec 9 2025, 12:21 AM

Nov 18 2025

mckusick committed rG404fbe6847b4: Fix getmntpoint(3) to operate as it is documented in its manual page. (authored by mckusick).
Fix getmntpoint(3) to operate as it is documented in its manual page.
Nov 18 2025, 12:03 AM

Nov 17 2025

mckusick committed rG45197d29ced2: Fix getmntpoint(3) to operate as it is documented in its manual page. (authored by mckusick).
Fix getmntpoint(3) to operate as it is documented in its manual page.
Nov 17 2025, 11:48 PM
mckusick committed rG511e33d20925: Add --libxo support for geom status and list sub commands. (authored by mckusick).
Add --libxo support for geom status and list sub commands.
Nov 17 2025, 8:40 PM
mckusick committed rG259264460d8d: Add --libxo support for geom status and list sub commands. (authored by mckusick).
Add --libxo support for geom status and list sub commands.
Nov 17 2025, 8:26 PM

Nov 14 2025

mckusick added a comment to D53589: exterror.9 man page.

I have sent you my edit of the manual page in a separate email rather than trying to put all my comments into the above draft.

Nov 14 2025, 7:22 AM

Nov 3 2025

mckusick committed rGc174f518c9c8: Refinements to the --libxo support for geom status and list sub commands. (authored by mckusick).
Refinements to the --libxo support for geom status and list sub commands.
Nov 3 2025, 10:55 PM
mckusick closed D53313: geom: more libxo fixes.
Nov 3 2025, 10:55 PM
mckusick accepted D53351: exterror(9): add infra for bufs and bios.

Tried it out and had no problems and got expected errors.

Nov 3 2025, 10:30 PM

Oct 31 2025

mckusick accepted D53313: geom: more libxo fixes.

Unless anyone has further feedback, I will plan to commit this early next week.

Oct 31 2025, 5:15 PM
mckusick added a comment to D53424: ufs: support unmapped bufs for indirect blocks in bmap.

This is an impressive performance improvement and one well worth adding to the system.

Oct 31 2025, 5:13 PM

Oct 28 2025

mckusick added a comment to D53351: exterror(9): add infra for bufs and bios.

This approach seems like the right way to get the extended errors back from the underlying devices.

Oct 28 2025, 7:06 PM

Oct 26 2025

mckusick added a comment to D53313: geom: more libxo fixes.

Structurally, this looks good to me. I will await Phil's commentary on its JSON/XML usefulness.

Oct 26 2025, 5:44 PM

Oct 22 2025

mckusick committed rG99bf680a8499: Fix getmntpoint(3) to operate as it is documented in its manual page. (authored by mckusick).
Fix getmntpoint(3) to operate as it is documented in its manual page.
Oct 22 2025, 6:02 PM
mckusick closed D53185: Fix getmntpoint(3) to operate as it is documented in its manual page..
Oct 22 2025, 6:02 PM

Oct 21 2025

mckusick added a comment to D53185: Fix getmntpoint(3) to operate as it is documented in its manual page..

Respond to latest comments.

Oct 21 2025, 11:21 PM
mckusick updated the diff for D53185: Fix getmntpoint(3) to operate as it is documented in its manual page..

Get rid of unneeded else statement.

Oct 21 2025, 11:20 PM

Oct 19 2025

mckusick updated the diff for D53185: Fix getmntpoint(3) to operate as it is documented in its manual page..

Add comment on why it is not necessary to check for NULL return from prependdevtopath().

Oct 19 2025, 7:32 PM
mckusick added a comment to D53185: Fix getmntpoint(3) to operate as it is documented in its manual page..

Responding to Dag-Erling's comments.

Oct 19 2025, 12:05 AM
mckusick updated the diff for D53185: Fix getmntpoint(3) to operate as it is documented in its manual page..

Respond to Dag-Erling's comments.

Oct 19 2025, 12:03 AM

Oct 18 2025

mckusick added a comment to D53180: geom: fix glabel status after 0d4642a.

This looks good to me, but I will await a review from Johan before proceeding.

Oct 18 2025, 7:24 AM
mckusick requested review of D53185: Fix getmntpoint(3) to operate as it is documented in its manual page..
Oct 18 2025, 7:11 AM

Oct 16 2025

mckusick committed rG2168e15ee89b: Update commit 0d4642a to fix failed tests. (authored by mckusick).
Update commit 0d4642a to fix failed tests.
Oct 16 2025, 8:29 PM
mckusick closed D53110: Fix failing multipath test caused by D37615.
Oct 16 2025, 8:29 PM
mckusick accepted D53110: Fix failing multipath test caused by D37615.

I will put in this change to fix the tests.
Pleas start a new review to address the additional suggestions.

Oct 16 2025, 8:20 PM

Oct 14 2025

mckusick accepted D53038: fsck_ffs: garbage collect calcsb.

Indeed this functionality is now embodied in ffs_search.

Oct 14 2025, 8:10 PM
mckusick accepted D53037: ffs_truncate: correct INVARIANTS panic debug output.

Fix is correct. Clearly a cut & paste blunder when I wrote it.

Oct 14 2025, 8:05 PM
mckusick added a comment to D37615: geom <class> list/status --libxo support.
In D37615#1212734, @guest-jsollvander wrote:
In D37615#1212613, @guest-svmhdvn wrote:

This patch seems to break several testcases in the sys/geom/class/multipath/misc test suite with this output:

===> sys/geom/class/multipath/misc:add
Result:     failed: ACTIVE !=  (ACTIVE != )

I'll take a look.

Oct 14 2025, 7:58 PM

Oct 13 2025

mckusick committed rG0d4642a67e59: Add --libxo support for geom status and list sub commands. (authored by mckusick).
Add --libxo support for geom status and list sub commands.
Oct 13 2025, 9:16 PM
mckusick closed D37615: geom <class> list/status --libxo support.
Oct 13 2025, 9:16 PM
mckusick added a comment to D53061: sendmail: Restart sendmail service on package upgrade.

I note that the sshd daemon is restarted when it is reinstalled. The sshd daemon is restarted since its update may be security related and thus the security fix should take effect as soon as the updated version is available.

Oct 13 2025, 4:28 PM

Oct 7 2025

mckusick accepted D37615: geom <class> list/status --libxo support.

First, sorry for letting this languish. Though I have not dealt with libxo, I assume that you have ensured that this generates the output that you need. Structurally it is properly added to the geom utility. If there are no issues raised by the other reviewers by Monday October 13th, I will commit it.

Oct 7 2025, 9:31 PM

Sep 14 2025

mckusick accepted D52036: sys/power: Generic sleep types.

Mentor approval.

Sep 14 2025, 9:52 PM
mckusick accepted D52043: acpi: Use sleep types defined in sys/power.h.

Mentor approval.

Sep 14 2025, 6:09 PM

Sep 11 2025

mckusick accepted D52044: sys/power: Sleep type reporting by PM backends.

Looks ready to go.

Sep 11 2025, 5:41 AM