Page MenuHomeFreeBSD

newfs: Add an option to disable soft updates
ClosedPublic

Authored by des on Wed, Jan 7, 4:30 PM.
Tags
None
Referenced Files
F141964868: D54576.diff
Wed, Jan 14, 6:37 AM
Unknown Object (File)
Tue, Jan 13, 12:09 AM
Unknown Object (File)
Sat, Jan 10, 2:07 PM
Unknown Object (File)
Thu, Jan 8, 7:27 AM
Unknown Object (File)
Thu, Jan 8, 6:07 AM
Unknown Object (File)
Thu, Jan 8, 1:10 AM
Unknown Object (File)
Thu, Jan 8, 12:54 AM
Unknown Object (File)
Wed, Jan 7, 11:52 PM
Subscribers

Details

Summary

A previous commit turned soft updates on by default for UFS2 without
providing a way to turn them off. This corrects that by adding a new -u
flag which forces soft updates (and soft updates journaling) off.

MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Fixes: 61dece6d27fb ("Enable soft updates by default for UFS2 filesystems.")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Wed, Jan 7, 4:30 PM

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.

sbin/newfs/newfs.8
101–115

You have this same sentence twice. I suggest deleting this first instance of it.

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.

That is deliberate and consistent with other utilities. For instance, df does not error out if you specify more than one of -k, -m, -g, -h, but simply obeys whichever one was specified last.

sbin/newfs/newfs.8
101–115

The duplication is deliberate and consistent with our other manual pages.

sbin/newfs/newfs.8
101–115

Give me an example where the same sentence appears with just one short sentence between it. This reads horribly.

des marked an inline comment as done.Fri, Jan 9, 10:39 AM
des added inline comments.
sbin/newfs/newfs.8
101–115

It reads horribly in the mandoc source, but less so in the rendered result:

-U      Enable soft updates on the new file system.  If neither -U nor -u
        is specified, soft updates are enabled by default for UFS2 format
        file systems and disabled otherwise.

-u      Do not enable soft updates on the new file system.  If neither -U
        nor -u is specified, soft updates are enabled by default for UFS2
        format file systems and disabled otherwise.

Again, compare with df(1), which repeats “This overrides any BLOCKSIZE specification from the environment” for every option for which that applies.

This revision is now accepted and ready to land.Fri, Jan 9, 7:29 PM
This revision was automatically updated to reflect the committed changes.