mckusick (Marshall Kirk McKusick)
User

Projects

User Details

User Since
Oct 24 2014, 7:17 PM (173 w, 6 d)

Recent Activity

Wed, Feb 21

mckusick committed rS329749: Fix a read past the end of a buffer in fsck..
Fix a read past the end of a buffer in fsck.
Wed, Feb 21, 8:32 PM
mckusick closed D14163: Fix a read past the end of a buffer in fsck..
Wed, Feb 21, 8:32 PM
mckusick committed rS329746: Refactor fix in r329600 to do its check once in readsuper() rather.
Refactor fix in r329600 to do its check once in readsuper() rather
Wed, Feb 21, 7:56 PM

Fri, Feb 9

mckusick committed rS329087: Add an explanation of the block size units output by prtblknos..
Add an explanation of the block size units output by prtblknos.
Fri, Feb 9, 10:23 PM
mckusick committed rS329078: Merge biodone_finish() back into biodone(). The primary purpose is.
Merge biodone_finish() back into biodone(). The primary purpose is
Fri, Feb 9, 7:51 PM
mckusick committed rS329076: This is a little C-program that can be used to print out the list.
This is a little C-program that can be used to print out the list
Fri, Feb 9, 7:10 PM

Thu, Feb 8

mckusick added a comment to D14163: Fix a read past the end of a buffer in fsck..

In response to brooks. You are correct that this always allocates one block and initialises it to zero. Thus all zero-length directories will sort to the front of the list so that they will all be reported in a block.

Thu, Feb 8, 11:27 PM
mckusick committed rS329052: Include files missed in 329051..
Include files missed in 329051.
Thu, Feb 8, 11:14 PM
mckusick committed rS329051: The goal of this change is to prevent accidental foot shooting by.
The goal of this change is to prevent accidental foot shooting by
Thu, Feb 8, 11:07 PM

Wed, Feb 7

mckusick committed rS328997: Adjust MFC in r328946 to stable/10..
Adjust MFC in r328946 to stable/10.
Wed, Feb 7, 10:50 PM

Tue, Feb 6

mckusick committed rS328948: MFC of 328647..
MFC of 328647.
Tue, Feb 6, 7:18 PM
mckusick committed rS328947: MFC of 328647..
MFC of 328647.
Tue, Feb 6, 7:17 PM
mckusick committed rS328946: MFC of 328643..
MFC of 328643.
Tue, Feb 6, 7:15 PM
mckusick committed rS328944: MFC of 328643..
MFC of 328643.
Tue, Feb 6, 7:13 PM
mckusick committed rS328943: MFC of 328304 and 328382..
MFC of 328304 and 328382.
Tue, Feb 6, 7:10 PM
mckusick committed rS328942: MFC of 328304 and 328382..
MFC of 328304 and 328382.
Tue, Feb 6, 7:09 PM
mckusick committed rS328914: Occasional cylinder-group check-hash errors were being reported on.
Occasional cylinder-group check-hash errors were being reported on
Tue, Feb 6, 12:20 AM

Fri, Feb 2

mckusick committed rS328821: Check and report error returns from sbput(3) calls..
Check and report error returns from sbput(3) calls.
Fri, Feb 2, 11:27 PM
mckusick abandoned D14177: Proposed alternative fix..

See https://reviews.freebsd.org/D14163

Fri, Feb 2, 10:24 PM
mckusick updated the diff for D14163: Fix a read past the end of a buffer in fsck..

I agree with the problem, but propose this new diff as the correct solution.

Fri, Feb 2, 10:20 PM
mckusick commandeered D14163: Fix a read past the end of a buffer in fsck..
Fri, Feb 2, 10:18 PM
mckusick committed rS328813: In the sbwrite(3) function, ensure that the file descriptor has been.
In the sbwrite(3) function, ensure that the file descriptor has been
Fri, Feb 2, 10:06 PM
mckusick added a reviewer for D14177: Proposed alternative fix.: brooks.
Fri, Feb 2, 9:34 PM
mckusick requested changes to D14163: Fix a read past the end of a buffer in fsck..

I concur with the problem, but differ on the solution. When I tried to upload my proposed change it created a whole new report https://reviews.freebsd.org/D14177. How do I just attach a new diff here?

Fri, Feb 2, 9:33 PM
mckusick created D14177: Proposed alternative fix..
Fri, Feb 2, 9:29 PM
mckusick committed rS328765: MFC of 328444..
MFC of 328444.
Fri, Feb 2, 1:28 AM
mckusick committed rS328764: MFC of 328444..
MFC of 328444.
Fri, Feb 2, 12:52 AM
mckusick committed rS328763: Use sbput(3) rather than sbwrite(3) to ensure that the updated copy of.
Use sbput(3) rather than sbwrite(3) to ensure that the updated copy of
Fri, Feb 2, 12:07 AM
mckusick committed rS328762: Fix punctuation..
Fix punctuation.
Fri, Feb 2, 12:02 AM

Wed, Jan 31

mckusick committed rS328647: Null out journal softc pointer earlier to avoid a segment fault.
Null out journal softc pointer earlier to avoid a segment fault
Wed, Jan 31, 11:31 PM
mckusick committed rS328644: When reading a cylinder group, break out reporting of check hash errors.
When reading a cylinder group, break out reporting of check hash errors
Wed, Jan 31, 11:13 PM
mckusick committed rS328643: One of the vnode fields listed by vn_printf is the union of pointers.
One of the vnode fields listed by vn_printf is the union of pointers
Wed, Jan 31, 10:50 PM

Mon, Jan 29

mckusick added a comment to D14092: Make g_label depend on FFS for now..

I agree that the dependency needs to be added though I am not sure precisely how it should be done. I suggest added kib@ as a reviewer because he is up-to-date with the way that these sorts of dependencies should be indicated.

Mon, Jan 29, 11:02 PM

Fri, Jan 26

mckusick committed rS328444: For many years the message "fsync: giving up on dirty" has occationally.
For many years the message "fsync: giving up on dirty" has occationally
Fri, Jan 26, 6:17 PM
mckusick committed rS328426: Refactoring of reading and writing of the UFS/FFS superblock..
Refactoring of reading and writing of the UFS/FFS superblock.
Fri, Jan 26, 12:59 AM

Thu, Jan 25

mckusick added a comment to D14049: Fix architectures where pointer and u_int have different sizes.

This is the correct fix.

Thu, Jan 25, 9:42 PM

Wed, Jan 24

mckusick committed rS328383: More throughly integrate libufs into fsck_ffs by using its cgput().
More throughly integrate libufs into fsck_ffs by using its cgput()
Wed, Jan 24, 11:57 PM
mckusick committed rS328382: Update .Dd missed in -r328304..
Update .Dd missed in -r328304.
Wed, Jan 24, 10:36 PM

Jan 23 2018

mckusick committed rS328304: In the C library, the setting up of the group array by various.
In the C library, the setting up of the group array by various
Jan 23 2018, 10:19 PM

Jan 17 2018

mckusick committed rS328092: Correct fsck journal-recovery code to update a cylinder-group.
Correct fsck journal-recovery code to update a cylinder-group
Jan 17 2018, 5:58 PM
mckusick committed rS328075: Rename cgget => cglookup to clear name space for new libufs function cgget..
Rename cgget => cglookup to clear name space for new libufs function cgget.
Jan 17 2018, 6:31 AM

Jan 14 2018

mckusick accepted D13862: Exit fsck_ffs with non-zero status when file system is not repaired..

Approve of latest change.

Jan 14 2018, 7:15 AM

Jan 13 2018

mckusick accepted D13862: Exit fsck_ffs with non-zero status when file system is not repaired..

This looks like a sensible and long overdue change.

Jan 13 2018, 6:28 AM
mckusick added a comment to D13884: Report CG checksum mismatches..

Given the issues that have been raised by adding the checkhash, I am thinking that it may be better not to enable it by default. If it is (for now) only enabled optionally, then folks that want to test it can do so and the rest of the users do not have to deal with the testing shake-out. I want to add other checkhashes for things like superblocks, inodes and possibly indirect blocks. Once these are working as a whole, then we can expand them to the larger population. In particular, I want to add the ability to detect when a filesystem is run on an earlier kernel so that we will expect the checkhashes to be wrong. I have just one bit to work with here, so I want to defer adding this until I can use it to cover all the checkhashes. But I think that this ability to detect running on earlier kernels is important to have for the wider population of users.

Jan 13 2018, 6:00 AM
mckusick added a comment to D13884: Report CG checksum mismatches..

Using pfatal means that fsck -p (preen mode) will fail causing a reboot to drop into single user mode with a request that you run fsck manually. If you use pwarn, then a message will be generated but the system will continue to multi-user. I believe that pwarn is more appropriate in this case since you are not in danger of corrupting your filesystem when the checksum is wrong.

Jan 13 2018, 5:51 AM

Dec 27 2017

mckusick committed rS327253: In preparation for converting to libufs to read the superblock,.
In preparation for converting to libufs to read the superblock,
Dec 27 2017, 10:19 PM

Dec 26 2017

mckusick committed rS327227: Missing disk close in libufs..
Missing disk close in libufs.
Dec 26 2017, 11:16 PM

Dec 9 2017

mckusick accepted D13428: Provide an option to force synchronous initialization of inode blocks.

I believe that the correct solution is to make barrier writes work correctly as they can be used to solve a multitude of problems. Indeed I would use them more extensively in UFS if I believed that they worked. That said, I suggest a comment over the definition of the doasyncinodeinit that explains that synchronous inode initialization is only needed when barrier writes do not work.

Dec 9 2017, 1:04 AM

Dec 6 2017

mckusick accepted D13385: Optimize telldir(3).

This looks like an excellent improvement. I have not reviewed every line of code, but the concept is sound.

Dec 6 2017, 4:46 PM

Oct 31 2017

mckusick accepted D12765: newfs: warn if newer than kernel.
Oct 31 2017, 11:10 PM

Oct 17 2017

mckusick accepted D12704: Fix a racy VI_DOOMED check in MNT_VNODE_FOREACH_ALL().
Oct 17 2017, 7:13 PM

Oct 16 2017

mckusick committed rS324675: MFC of 324456..
MFC of 324456.
Oct 16 2017, 9:55 PM
mckusick committed rS324674: MFC of 324456..
MFC of 324456.
Oct 16 2017, 9:53 PM

Oct 10 2017

mckusick committed rS324499: Growfs got missed in r323923 that added a check hash to cylinder groups..
Growfs got missed in r323923 that added a check hash to cylinder groups.
Oct 10 2017, 4:17 PM

Oct 9 2017

mckusick committed rS324456: Do not report the filesystem as modified when the only change is to.
Do not report the filesystem as modified when the only change is to
Oct 9 2017, 10:20 PM

Sep 22 2017

mckusick committed rS323923: Continuing efforts to provide hardening of FFS, this change adds a.
Continuing efforts to provide hardening of FFS, this change adds a
Sep 22 2017, 12:45 PM

Sep 4 2017

mckusick committed rS323157: The new fsck recovery information to enable it to find backup.
The new fsck recovery information to enable it to find backup
Sep 4 2017, 8:19 PM

Aug 24 2017

mckusick committed rS322861: Note change brought on by 322860 MFC..
Note change brought on by 322860 MFC.
Aug 24 2017, 9:49 PM
mckusick committed rS322860: MFC of 276737, 322200, 322201, 322271, and 322297.
MFC of 276737, 322200, 322201, 322271, and 322297
Aug 24 2017, 9:44 PM

Aug 23 2017

mckusick committed rS322807: MFC of 322298 noting MFC 322806 in UPDATING.
MFC of 322298 noting MFC 322806 in UPDATING
Aug 23 2017, 4:44 AM
mckusick committed rS322806: MFC of 322200, 322201, 322271, and 322297.
MFC of 322200, 322201, 322271, and 322297
Aug 23 2017, 4:35 AM

Aug 22 2017

mckusick committed rS322793: MFC of 269692, 322179, 322463, and 322464:.
MFC of 269692, 322179, 322463, and 322464:
Aug 22 2017, 3:27 PM
mckusick committed rS322792: MFC of 322179, 322463, and 322464:.
MFC of 322179, 322463, and 322464:
Aug 22 2017, 3:21 PM

Aug 16 2017

mckusick committed rS322566: Correct compile error triggered in nanobsd i386 by 322513 (MFC of 322178).
Correct compile error triggered in nanobsd i386 by 322513 (MFC of 322178)
Aug 16 2017, 5:51 AM

Aug 14 2017

mckusick committed rS322513: MFC of 322178:.
MFC of 322178:
Aug 14 2017, 7:13 PM
mckusick committed rS322480: MFC r322178.
MFC r322178
Aug 14 2017, 2:49 AM

Aug 13 2017

mckusick committed rS322464: When read requests are sent from a filesystem running above g_journal,.
When read requests are sent from a filesystem running above g_journal,
Aug 13 2017, 6:09 PM
mckusick committed rS322463: Eliminate a variable that is only ever set..
Eliminate a variable that is only ever set.
Aug 13 2017, 6:06 PM

Aug 9 2017

mckusick committed rS322298: Add an entry to UPDATING for r322297 which restores the ability.
Add an entry to UPDATING for r322297 which restores the ability
Aug 9 2017, 5:22 AM
mckusick committed rS322297: Since the switch to GPT disk labels, fsck for UFS/FFS has been.
Since the switch to GPT disk labels, fsck for UFS/FFS has been
Aug 9 2017, 5:17 AM
mckusick added a comment to D11589: Print more info when super blocks don't match, implement ability to ignore mismatches..

From: Warner Losh <imp@bsdimp.com>
Date: Mon, 7 Aug 2017 23:56:36 -0600
Subject: Re: [Differential] D11589: Print more info when super blocks don't match, implement ability to ignore mismatches.
To: Kirk McKusick <mckusick@mckusick.com>
Cc: Warner Losh <imp@freebsd.org>, Konstantin Belousov <kostikbel@gmail.com>, Scott Long <scottl@netflix.com>

Aug 9 2017, 4:50 AM

Aug 7 2017

mckusick committed rS322179: gjournal is broken in handling its flush_queue. If we have 10 bio's.
gjournal is broken in handling its flush_queue. If we have 10 bio's
Aug 7 2017, 7:40 PM
mckusick committed rS322178: sysctl kern.geom.journal.cache.limit shows negative value for FreeBSD/amd64.
sysctl kern.geom.journal.cache.limit shows negative value for FreeBSD/amd64
Aug 7 2017, 7:18 PM
mckusick committed rS322132: MFC r321816:.
MFC r321816:
Aug 7 2017, 2:29 AM
mckusick committed rS322130: MFC r321816:.
MFC r321816:
Aug 7 2017, 2:17 AM

Aug 1 2017

mckusick committed rS321886: Add Anne Dickison..
Add Anne Dickison.
Aug 1 2017, 6:25 PM

Jul 31 2017

mckusick committed rS321816: Avoid reading a snapshot block when it is already in the cache..
Avoid reading a snapshot block when it is already in the cache.
Jul 31 2017, 8:42 PM

Jul 24 2017

mckusick added a comment to D11589: Print more info when super blocks don't match, implement ability to ignore mismatches..

Every UFS filesystem has a chunk of space reserved at the front for a boot block. Historically 8K, later 64K, now 256K. This size is known, so if we put a structure at the end of it with the BPG size, then fsck can find it and with great reliability find alternative superblocks. If the boot block is *entirely* filled, then we will lose that info, but it almost never is completely filled. As kib points out, administrators are running fsck when they are trying to fix their filesystems. It is far easier if fsck just deals with the problem rather than sending them off on some wild goose chase with other utilities to find alternate superblocks. Especially because this is a rare situation, but nearly always critical when it happens. We should not be lazy here. We should fix this issue.

Jul 24 2017, 4:03 AM

Jul 22 2017

mckusick added a comment to D11589: Print more info when super blocks don't match, implement ability to ignore mismatches..

Date: Sat, 22 Jul 2017 10:25:09 +0000
To: mckusick@freebsd.org
From: "kib (Konstantin Belousov)" <phabric-noreply@FreeBSD.org>
Subject: [Differential] D11589: Print more info when super blocks don't match, implement ability to ignore mismatches.

kib added a comment.

In https://reviews.freebsd.org/D11589#242174, @mckusick wrote:

Being able to search for alternate superblocks can be very
helpful. As discussed by Warner and myself in the email thread
below, to do so we need to be able to store a single 32-bit number
somewhere external to the filesystem. I really hope that someone
on this thread has an idea on where it could be placed.

If you can find a way to store BPG, I'll volunteer to figure
out how to get calcsb to use it.

Kirk, thank you very much. This (indirectly) answers the question
that I cannot answer myself and which blocked my understanding of
the patch. Am I right in the following statements:

If newfs was used with default settings, and the partition was not
resized, then alternate superblocks can be found by fsck using the
same calculation as was done by newfs.

Jul 22 2017, 8:15 PM

Jul 21 2017

mckusick added a comment to D11589: Print more info when super blocks don't match, implement ability to ignore mismatches..

Being able to search for alternate superblocks can be very helpful. As discussed by Warner and myself in the email thread below, to do so we need to be able to store a single 32-bit number somewhere external to the filesystem. I really hope that someone on this thread has an idea on where it could be placed.

Jul 21 2017, 6:04 PM

Jul 10 2017

mckusick accepted D11490: Make fsck_y_enable use -R.

This seems like a reasonable change. Definitely in keeping with the spirit of -y.

Jul 10 2017, 3:24 AM

Jun 28 2017

mckusick committed rS320453: Create a new function ffs_getcg() to read in and verify a cylinder.
Create a new function ffs_getcg() to read in and verify a cylinder
Jun 28 2017, 5:32 PM

Jun 26 2017

mckusick committed rS320366: MFC of 320176:.
MFC of 320176:
Jun 26 2017, 5:33 PM
mckusick committed rS320365: MFC of 320176:.
MFC of 320176:
Jun 26 2017, 5:29 PM

Jun 20 2017

mckusick committed rS320176: Allow '_' in labels when specifying -L to newfs..
Allow '_' in labels when specifying -L to newfs.
Jun 20 2017, 9:27 PM

May 23 2017

mckusick accepted D10852: Document st_flags in the stat(2)..

Looks good. Make it so.

May 23 2017, 7:22 PM

May 22 2017

mckusick accepted D10852: Document st_flags in the stat(2)..

With suggested change, I am happy with this (useful) update.

May 22 2017, 10:05 PM
mckusick requested changes to D10852: Document st_flags in the stat(2)..
May 22 2017, 9:48 PM

May 13 2017

mckusick added a comment to D10692: mnt_vnode_next_active: use conventional lock order when trylock fails.

This change is a nice piece of work. Thanks for figuring it out. Going through your discussion with kib on the subtleties of the flags and hold count semantics makes me wish that it was simpler, but I do not see a way to do so and still be able to have the (very useful) semantics of vgone().

May 13 2017, 12:01 AM

May 4 2017

mckusick accepted D10589: UFS fs.h: clear warning from use by makefs(1).

I like this solution much better than D10578.

May 4 2017, 10:29 PM

Apr 12 2017

mckusick accepted D9674: Handle ENXIO bufs..

This looks good to me.

Apr 12 2017, 11:10 PM

Feb 21 2017

mckusick added a comment to D9674: Handle ENXIO bufs..

I concur with imp's analysis. Once ENXIO is returned no more I/O will be possible, so the disk will remain in whatever state it is in. So it is always safe to just call softdep_disk_write_complete(bp); to clean up the dependencies and free their storage. There is still the issue that clearing some dependencies will allow others to proceed and those other may try to read data from the disk (such as the update of an inode). Almost always the update will be for something that is already cached, but occationally there will be a cache miss and so to ensure success we will need to augment soft updates to handle those cases. This is probably best done by setting a state flag (MNT_DISKGONE?) that indicates that the disk is gone and we are shutting down. In the (rather few) places in the soft depedencies code that we do reads, we check for that flag and provide a usable default which in most cases will just be a zeroed out buffer.

Feb 21 2017, 10:02 PM
mckusick added a comment to D9674: Handle ENXIO bufs..

Here is a change that will at least clean up the soft updates associated with the buffer, though as noted if the filesystem keeps running it will put itself into an inconsistent and possibly unrecoverable state. This is no worse than what would happen with a filesystem running without soft updates if you continue operating after failing to do the I/O.

Feb 21 2017, 3:39 AM

Feb 15 2017

mckusick accepted D9623: prefix (more) UFS symbols with UFS_ to reduce namespace pollution.

Additional changes are sensible and do not change functionality.

Feb 15 2017, 10:06 PM
mckusick accepted D9536: prefix UFS symbols with UFS_ to reduce namespace pollution.

This looks like a useful change and should have no effect on functionality.

Feb 15 2017, 6:57 AM

Jan 22 2017

mckusick committed rS312638: By default, when doing incremental restores the restore program.
By default, when doing incremental restores the restore program
Jan 22 2017, 5:49 PM

Dec 22 2016

mckusick added a comment to D8854: Rename the 'flags' argument to getfsstat() to 'flag' and validate it..

I did some sleuthing through BSDI sources and the addition of the MNT_LAZY flag check was put into getfsstat by one of the BSDI engineers apparently in response to a customer request. From there it got carried over to FreeBSD when I made the diffs for Julian who did the import.

Dec 22 2016, 6:08 PM

Nov 26 2016

mckusick committed rS309173: MFC r308064:.
MFC r308064:
Nov 26 2016, 12:56 AM
mckusick committed rS309172: MFC r308064:.
MFC r308064:
Nov 26 2016, 12:43 AM

Nov 22 2016

mckusick committed rS308946: MFC r307978:.
MFC r307978:
Nov 22 2016, 12:27 AM