Page MenuHomeFreeBSD
Feed Advanced Search

Jul 21 2022

mckusick committed rG7c332e97bbd3: Ask to look for alternate UFS2 superblocks when the standard one is unusable. (authored by mckusick).
Ask to look for alternate UFS2 superblocks when the standard one is unusable.
Jul 21 2022, 5:53 AM

Jul 20 2022

mckusick committed rG8d4ccb9da296: Rewrite function definitions in the UFS/FFS code base with identifier lists. (authored by mckusick).
Rewrite function definitions in the UFS/FFS code base with identifier lists.
Jul 20 2022, 7:51 PM

Jul 16 2022

mckusick committed rG904347a00c1f: Additional check for UFS/FFS superblock integrity checks. (authored by mckusick).
Additional check for UFS/FFS superblock integrity checks.
Jul 16 2022, 5:33 PM
mckusick committed rG90e29718cffc: Clarify when GEOM utilities exit with success or failure. (authored by mckusick).
Clarify when GEOM utilities exit with success or failure.
Jul 16 2022, 5:27 PM

Jul 14 2022

mckusick committed rG2e66649e4f34: Another fix to build from 064e6b4. (authored by mckusick).
Another fix to build from 064e6b4.
Jul 14 2022, 4:06 AM

Jul 13 2022

mckusick committed rGc792466f878a: Fix build from 064e6b4. (authored by mckusick).
Fix build from 064e6b4.
Jul 13 2022, 11:54 PM
mckusick committed rG064e6b4303d8: Rewrite function definitions in the UFS/FFS code base with identifier lists. (authored by mckusick).
Rewrite function definitions in the UFS/FFS code base with identifier lists.
Jul 13 2022, 9:09 PM

Jul 8 2022

mckusick committed rGcb59f7dd2201: Correctly update fs_dsize in growfs(8) (authored by mckusick).
Correctly update fs_dsize in growfs(8)
Jul 8 2022, 9:47 PM
mckusick committed rGe349fcc80aa2: Eliminate set but not used variable. (authored by mckusick).
Eliminate set but not used variable.
Jul 8 2022, 9:47 PM

Jul 6 2022

mckusick committed rG5bc926af9fd1: Bug fix to UFS/FFS superblock integrity checks when reading a superblock. (authored by mckusick).
Bug fix to UFS/FFS superblock integrity checks when reading a superblock.
Jul 6 2022, 9:46 PM
mckusick committed rGf3f5368dfbef: Bug fix to UFS/FFS superblock integrity checks when reading a superblock. (authored by mckusick).
Bug fix to UFS/FFS superblock integrity checks when reading a superblock.
Jul 6 2022, 9:46 PM
mckusick committed rG9e1f44d044a5: Bug fix to UFS/FFS superblock integrity checks when reading a superblock. (authored by mckusick).
Bug fix to UFS/FFS superblock integrity checks when reading a superblock.
Jul 6 2022, 9:46 PM

Jun 28 2022

mckusick committed rG2049cc321815: Correctly update fs_dsize in growfs(8) (authored by mckusick).
Correctly update fs_dsize in growfs(8)
Jun 28 2022, 4:49 AM
mckusick committed rG78dfcf256a44: Eliminate set but not used variable. (authored by mckusick).
Eliminate set but not used variable.
Jun 28 2022, 4:49 AM

Jun 24 2022

mckusick accepted D35577: UFS rename: make it reliable when using SU and reaching nlink limit.

This looks to be the correct fix.

Jun 24 2022, 3:44 AM
mckusick committed rGce6296caa370: Fix build break in 50dc4c7. (authored by mckusick).
Fix build break in 50dc4c7.
Jun 24 2022, 2:56 AM
mckusick committed rG50dc4c7df415: When a superblock integrity check fails, report the cause of the failure. (authored by mckusick).
When a superblock integrity check fails, report the cause of the failure.
Jun 24 2022, 12:40 AM

Jun 22 2022

mckusick accepted D34836: ffs: fix vn_read_from_obj() usage for PAGE_SIZE > block size.

Update looks good.

Jun 22 2022, 7:25 PM

Jun 19 2022

mckusick accepted D35514: UFS: make mkdir() and link() reliable when using SU and reaching nlink limit.

Right. I should have noticed that something was missing in ufs_sync_nlink() when it did not include a use of vn_lock_pair(). I believe that this is now correct.

Jun 19 2022, 10:06 PM
mckusick accepted D35514: UFS: make mkdir() and link() reliable when using SU and reaching nlink limit.

This looks good. I concur that rename requires a different approach so can be the subject of another change.

Jun 19 2022, 7:11 PM
mckusick added a comment to D35514: UFS: make mkdir() and link() reliable when using SU and reaching nlink limit.

This looks like the correct solution to me. As noted in bug report 165392, link and rename also need the same fix.

Jun 19 2022, 6:46 PM

Jun 11 2022

mckusick committed rG800a53b445e7: Bug fix to UFS/FFS superblock integrity checks when reading a superblock. (authored by mckusick).
Bug fix to UFS/FFS superblock integrity checks when reading a superblock.
Jun 11 2022, 6:06 PM

Jun 7 2022

mckusick added a comment to D35402: status/report-2022-01-2022-03: Add report.

Let me know if this helps clarify gunion.

Jun 7 2022, 8:35 PM

Jun 1 2022

mckusick committed rGbc218d89200f: Two bug fixes to UFS/FFS superblock integrity checks when reading a superblock. (authored by mckusick).
Two bug fixes to UFS/FFS superblock integrity checks when reading a superblock.
Jun 1 2022, 2:59 AM

May 27 2022

mckusick closed D35219: Comprehensive UFS/FFS superblock integrity checks made when a superblock is read.
May 27 2022, 7:23 PM
mckusick committed rG076002f24d35: Do comprehensive UFS/FFS superblock integrity checks when reading a superblock. (authored by mckusick).
Do comprehensive UFS/FFS superblock integrity checks when reading a superblock.
May 27 2022, 7:23 PM

May 25 2022

mckusick added a comment to D35219: Comprehensive UFS/FFS superblock integrity checks made when a superblock is read.

Thanks for the testing Peter.

May 25 2022, 11:20 PM

May 22 2022

mckusick added a comment to D35219: Comprehensive UFS/FFS superblock integrity checks made when a superblock is read.

Good idea to add reason for failure. I wonder if fsdb might be the right place to add it? We do need a simple check to determine if the block should be considered a superblock which is currently whether the magic number matches UFS1 or UFS2 so that we can look in several possible places for the superblock or so that the tasting code can check to see if it is a UFS filesystem. But all the other checks should be called out.

May 22 2022, 7:16 PM
mckusick added inline comments to D35219: Comprehensive UFS/FFS superblock integrity checks made when a superblock is read.
May 22 2022, 5:44 AM

May 21 2022

mckusick added a comment to D35219: Comprehensive UFS/FFS superblock integrity checks made when a superblock is read.

Update to account for reported problems. Hopefully relaxed checks will not open a new door for attack.

May 21 2022, 11:21 PM
mckusick updated the diff for D35219: Comprehensive UFS/FFS superblock integrity checks made when a superblock is read.

From Peter Holm: Relax bounds checking on fs_ipg and fs_fpg to account for tiny filesystems.

May 21 2022, 11:20 PM

May 17 2022

mckusick added a comment to D35219: Comprehensive UFS/FFS superblock integrity checks made when a superblock is read.

Still need to track down problem cited by Peter Holm.

May 17 2022, 7:00 AM
mckusick updated the diff for D35219: Comprehensive UFS/FFS superblock integrity checks made when a superblock is read.

Changes suggested by kib and refinements suggested by Robert Morris

May 17 2022, 6:59 AM

May 16 2022

mckusick requested review of D35219: Comprehensive UFS/FFS superblock integrity checks made when a superblock is read.
May 16 2022, 12:06 AM

May 15 2022

mckusick committed rG187d7e982132: Reduce code nesting in readsuper(). (authored by mckusick).
Reduce code nesting in readsuper().
May 15 2022, 10:03 PM
mckusick accepted D35212: 13.1-RELEASE note: fsck_ffs: background fsck.

I concur that this note should be added.

May 15 2022, 4:29 PM

May 14 2022

mckusick accepted D35131: makefs(8): Fix calculation of metadata segmets sizes.

Calculations and comment are accurate.

May 14 2022, 7:08 PM
mckusick accepted D35132: makefs(8): Fix calculation of file sizes.

This is an accurate calculation the the extra needed space.

May 14 2022, 7:03 PM

May 10 2022

mckusick committed rGbf46c0a9ae4e: Clean up comments in fsck.h. (authored by mckusick).
Clean up comments in fsck.h.
May 10 2022, 11:07 PM

May 5 2022

mckusick committed rG262b581d1791: Properly specify the level of indirect block being looked up. (authored by mckusick).
Properly specify the level of indirect block being looked up.
May 5 2022, 11:59 PM

Apr 24 2022

mckusick accepted D35034: g_vfs_done: Only report ENXIO once.

This seems like a useful change.

Apr 24 2022, 12:28 AM

Apr 15 2022

mckusick accepted D34837: vfs: fix vfs_bio_clrbuf() for PAGE_SIZE > block size.
Apr 15 2022, 1:07 AM
mckusick added a comment to D34836: ffs: fix vn_read_from_obj() usage for PAGE_SIZE > block size.

I like the approach suggested by kib that ufs_open() not set VIRF_PGREAD when the page size is larger than the fragment size.

Apr 15 2022, 12:54 AM
mckusick accepted D34835: ffs: fix vn_io_fault_pgmove() offset for PAGE_SIZE > block size.
Apr 15 2022, 12:40 AM

Apr 6 2022

mckusick committed rG4710aa248bcd: Avoid dereferencing a possibly null pointer. (authored by mckusick).
Avoid dereferencing a possibly null pointer.
Apr 6 2022, 9:26 PM
mckusick accepted D34806: ffs: wait for trims earlier during unmount to avoid panic.

I concur with the analysis. Waiting for trims in the current location is clearly too late. Waiting in the new location will ensure that all the dependencies get flushed. And once flushed it should not be possible to add any new ones thus no new trims should be able to appear.

Apr 6 2022, 6:37 PM

Mar 17 2022

mckusick accepted D34584: mount.8: mention that the snapshot option is exclusive.

Looks good. Short and to the point.

Mar 17 2022, 5:10 AM

Mar 16 2022

mckusick committed rG47b50c23185b: Ensure that fsck(8) / fsck_ffs(8) produces the correct exit code for missing… (authored by mckusick).
Ensure that fsck(8) / fsck_ffs(8) produces the correct exit code for missing…
Mar 16 2022, 11:31 PM
mckusick committed rG934ba51bc929: Ensure that fsck(8) / fsck_ffs(8) produces the correct exit code for missing… (authored by mckusick).
Ensure that fsck(8) / fsck_ffs(8) produces the correct exit code for missing…
Mar 16 2022, 10:58 PM
mckusick accepted D34562: ffs: fix mksnap_ffs.

The main clients of making snapshots are dump(8), fsck_ffs(8), and mksnap_ffs(8) and none of them want to change any other attributes. Generally speaking, administrators do not use the mount(8) command directly to take snapshots. The one other change I would recommend is to document in the mount.8 manual page that when the "snapshot" option is specified, any other options will be ignored.

Mar 16 2022, 9:27 PM
mckusick committed rG2983ec0a87a1: Ensure that fsck(8) / fsck_ffs(8) produces the correct exit code (authored by mckusick).
Ensure that fsck(8) / fsck_ffs(8) produces the correct exit code
Mar 16 2022, 6:39 PM

Mar 13 2022

mckusick accepted D34530: vfs: prefix lookup and relookup with vfs_.

I picked those names when ufs was the only filesystem in BSD. I should have renamed them when I added the VFS interface. Better late than never!

Mar 13 2022, 1:12 AM
mckusick accepted D34468: vfs: stop using SAVESTART for rename.

This change looks reasonable to me.

Mar 13 2022, 12:52 AM

Mar 1 2022

mckusick committed rG3cf2f812f586: Add casts to printf statements to keep armv6, armv7, and powerpc (authored by mckusick).
Add casts to printf statements to keep armv6, armv7, and powerpc
Mar 1 2022, 3:31 AM
mckusick committed rGc7996ddf8000: Create a new GEOM utility, gunion(8). (authored by mckusick).
Create a new GEOM utility, gunion(8).
Mar 1 2022, 12:37 AM
mckusick closed D32697: Create a union GEOM module.
Mar 1 2022, 12:37 AM

Feb 28 2022

mckusick committed rGa0c3799828e5: fsck_ffs: don't try to write in read-only mode (authored by chs).
fsck_ffs: don't try to write in read-only mode
Feb 28 2022, 5:39 AM

Feb 27 2022

mckusick committed rG5f3cd10138a1: Update fsdb(8) to reflect new structure of fsck_ffs(8). (authored by mckusick).
Update fsdb(8) to reflect new structure of fsck_ffs(8).
Feb 27 2022, 1:36 AM
mckusick committed rG5628a0901987: Avoid unaligned writes by fsck_ffs(8). (authored by mckusick).
Avoid unaligned writes by fsck_ffs(8).
Feb 27 2022, 1:36 AM

Feb 23 2022

mckusick committed rGc5d476c98c22: Update fsdb(8) to reflect new structure of fsck_ffs(8). (authored by mckusick).
Update fsdb(8) to reflect new structure of fsck_ffs(8).
Feb 23 2022, 11:42 PM

Feb 21 2022

mckusick added a comment to D34328: diff: Use change start when searching for function names.

minor format question. Change looks correct.

Feb 21 2022, 7:38 PM

Feb 20 2022

mckusick committed rG7a1c1f6a0332: Avoid unaligned writes by fsck_ffs(8). (authored by mckusick).
Avoid unaligned writes by fsck_ffs(8).
Feb 20 2022, 9:22 PM
mckusick updated the diff for D32697: Create a union GEOM module.

This update reflects some minor cleanups that were reported by Peter Holm during his testing.

Feb 20 2022, 6:31 AM
mckusick committed rGc8cc568961df: Provide an interface that allows GEOM modules to return multiple messages. (authored by mckusick).
Provide an interface that allows GEOM modules to return multiple messages.
Feb 20 2022, 5:33 AM

Feb 16 2022

mckusick committed rG166926a3dee0: Have fsck_ffs(8) properly correct superblock check-hash failures. (authored by mckusick).
Have fsck_ffs(8) properly correct superblock check-hash failures.
Feb 16 2022, 1:16 AM
mckusick committed rGefd949aaba74: Have fsck_ffs(8) properly correct superblock check-hash failures. (authored by mckusick).
Have fsck_ffs(8) properly correct superblock check-hash failures.
Feb 16 2022, 1:16 AM
mckusick committed rGbf02faa1ae7b: In GEOM debugging output, show consumer for cloned and duplicated bio's. (authored by mckusick).
In GEOM debugging output, show consumer for cloned and duplicated bio's.
Feb 16 2022, 12:38 AM
mckusick committed rG3364fdf16a00: ufs: handle LoR between snap lock and vnode lock (authored by mckusick).
ufs: handle LoR between snap lock and vnode lock
Feb 16 2022, 12:25 AM

Feb 15 2022

mckusick updated the diff for D32697: Create a union GEOM module.

These changes address comments from all three reviewers.

Feb 15 2022, 6:46 AM

Feb 6 2022

mckusick accepted D34179: ffs_read(): lock buffers after snaplk with LK_NOWITNESS.

This patch eliminates the LOR in my test case.

Feb 6 2022, 12:53 AM

Feb 4 2022

mckusick committed rG57b0fc30676f: Avoid unnecessary setting of UFS flag requesting fsck(8) be run. (authored by mckusick).
Avoid unnecessary setting of UFS flag requesting fsck(8) be run.
Feb 4 2022, 10:47 PM
mckusick committed rG9583be047bed: Properly fix parameter to sysctlnametomib(). (authored by mckusick).
Properly fix parameter to sysctlnametomib().
Feb 4 2022, 10:07 PM
mckusick committed rG504cb544e2c3: Fix parameter to sysctlnametomib(); (authored by mckusick).
Fix parameter to sysctlnametomib();
Feb 4 2022, 10:02 PM
mckusick committed rGc16f699d79e2: Whitespace and capitalization cleanups. (authored by mckusick).
Whitespace and capitalization cleanups.
Feb 4 2022, 8:01 PM
mckusick committed rGc0bfa109b942: Have fsck_ffs(8) properly correct superblock check-hash failures. (authored by mckusick).
Have fsck_ffs(8) properly correct superblock check-hash failures.
Feb 4 2022, 7:48 PM

Feb 1 2022

mckusick accepted D34126: ufs, msdosfs: do not record witness order when creating vnode.

I agree with this change.

Feb 1 2022, 7:38 AM

Jan 31 2022

mckusick added a comment to D34089: Introduce sys/kassert.h.

Eivind Eklund was the person that first added KASSERT which was the start of what probably should have been called kassert.h. Many others added to it over time probably putting more effort into than he did. But I am inclined to give him credit for starting the ball rolling. He was an active committer from February 1997 until June 2005 (461 base, 69 ports, 26 doc). I note that he still has a freefall account.

Jan 31 2022, 6:30 AM
mckusick added a comment to D34089: Introduce sys/kassert.h.
In D34089#770782, @kib wrote:

I copied license from systm.h, but clearly UCB has no relations to this relatively modern stuff at all. Not sure what to do there.

Jan 31 2022, 3:48 AM
mckusick committed rG85f7e9a4f039: In GEOM debugging output, show consumer for cloned and duplicated bio's. (authored by mckusick).
In GEOM debugging output, show consumer for cloned and duplicated bio's.
Jan 31 2022, 1:22 AM

Jan 30 2022

mckusick accepted D34095: ext2fs: remove remnants of the UFS snapshot code.

Useful cleanup.

Jan 30 2022, 11:09 PM
mckusick accepted D34073: ffs: lock buffers after snaplk with LK_NOWITNESS.

Once passing Peter Holm's testing, this looks good to go.

Jan 30 2022, 10:57 PM

Jan 28 2022

mckusick accepted D34072: Useful changes taken from D33921.

Based on our previous discussions in D33921 these changes improve readability and consistency.

Jan 28 2022, 7:13 AM
mckusick committed rGddf162d1d15f: ufs: handle LoR between snap lock and vnode lock (authored by mckusick).
ufs: handle LoR between snap lock and vnode lock
Jan 28 2022, 7:04 AM
mckusick closed D33946: ufs: handle LoR between snap lock and vnode lock.
Jan 28 2022, 7:04 AM
mckusick added a comment to D33921: ufs: handle LoR between snap lock and buffer lock.
In D33921#770058, @kib wrote:

So more I am trying to fix consequences of the snap relock following Peter reports, more I doubt the original issue.

Lets consider ffs_read() report: we got a locked UFS vnode, which reads some buffer, which is locked to be read. There are two cases: vnode is a snapshot, or it is not. In the second case, the order is right from the start.

In the first case, I claim that all snapshot vnode' buffers are after snaplk: in both ffs_copyonwrite() and ffs_snapblkfree(), we lock snaplk, and then iterate over snapshots taking corresponding buffer locks as needed, and this is IMO the natural order. So in the first case, read from the snapshot vnode, the order is right.

On the other hand, all data blocks are before snaplk. In other words, the order of the locks is (UFS vnode)->(data bufwait)->(snaplk)->(snapshot block bufwait). We could get LoR only in case when data buffer is becoming snapshot data during some of the snapshot low ops (copyonwrite or blkfree). But we never do that rename, we always allocate new block for snapshot and copy data as needed.

Let me summarize: I now think that the original report about LoR in ffs_read() is a false positive from witness, since it cannot distinguish between snap/normal data buffers.

P.S. Even if I am wrong above, I do not think that the approach with relocking of the snaplk lock is workable. For instance, in ffs_balloc_ufs2(), unlocking snaplk allows other thread to create softupdate tracker for allocation of the same logical block which is not yet allocated.

Jan 28 2022, 1:55 AM

Jan 27 2022

mckusick accepted D29181: systat: Include seconds in vmstat timestamp..

I think that this change is an improvement.

Jan 27 2022, 1:17 AM
mckusick accepted D30870: ffs: skip upgrade from ro->rw if namei fails.

This looks good to me.

Jan 27 2022, 1:14 AM

Jan 20 2022

mckusick added a comment to D33921: ufs: handle LoR between snap lock and buffer lock.

Changes to avoid needing to free newb look good. Really glad to not have to figure out how to do that. Other changes look right. Awaiting Peter's tests to see if you have found all the needed changes.

Jan 20 2022, 1:37 AM

Jan 19 2022

mckusick added a comment to D33921: ufs: handle LoR between snap lock and buffer lock.

Generally looks good. Definitely want to see if Peter turns up anything. If Peter clears it, freeing newb will be necessary. Unfortunately freeing newb is going to require writing a bunch of code to unwind a lot of soft update stuff. It will be a lot easier if we reorder the code to get the buffer first and then only allocate the block once we know we will have a buffer for it. Since the buffer is hashed on lbn rather than bn we do not need to have a block allocated before we get its buffer.

Jan 19 2022, 10:26 PM
mckusick requested review of D33946: ufs: handle LoR between snap lock and vnode lock.
Jan 19 2022, 6:58 AM
mckusick accepted D33921: ufs: handle LoR between snap lock and buffer lock.

This patch eliminates my bufwait <-> snaplk LOR warning when doing background fsck.

Jan 19 2022, 12:03 AM

Jan 18 2022

mckusick committed rGd78723738bbc: When doing a read-only mount of a UFS filesystem using gjournal(8), (authored by mckusick).
When doing a read-only mount of a UFS filesystem using gjournal(8),
Jan 18 2022, 11:16 PM
mckusick committed rG18870c75bfa7: systat -vm: Humanize output for ease of reading. (authored by mckusick).
systat -vm: Humanize output for ease of reading.
Jan 18 2022, 11:11 PM

Jan 10 2022

mckusick committed rG7ef56fb04984: Avoid unnecessary setting of UFS flag requesting fsck(8) be run. (authored by mckusick).
Avoid unnecessary setting of UFS flag requesting fsck(8) be run.
Jan 10 2022, 12:19 AM

Jan 6 2022

mckusick committed rGc82df0a0bf28: Whitespace and capitalization cleanups. (authored by mckusick).
Whitespace and capitalization cleanups.
Jan 6 2022, 12:33 AM

Jan 5 2022

mckusick accepted D33721: Improve msdosfs robustness.

Latest updates all look good.

Jan 5 2022, 11:40 PM

Jan 3 2022

mckusick added a comment to D33721: Improve msdosfs robustness.

Spelling nit.

Jan 3 2022, 6:13 PM

Jan 2 2022

mckusick accepted D33721: Improve msdosfs robustness.

Looks good to me. If inspired a comment over msdosfs_remount_ro() would be nice, though the name pretty much says what it does.

Jan 2 2022, 10:43 PM
mckusick committed rG1cd848a3141e: fsutil: forward declare struct fstab (authored by imp).
fsutil: forward declare struct fstab
Jan 2 2022, 10:28 PM
mckusick committed rGfe7121ec5b8b: Update fsck(8) to ignore failures from a check program for a filesystem (authored by mckusick).
Update fsck(8) to ignore failures from a check program for a filesystem
Jan 2 2022, 10:20 PM