Page MenuHomeFreeBSD

makefs: Add soft-updates options
ClosedPublic

Authored by manu on May 17 2017, 2:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 10 2024, 9:32 PM
Unknown Object (File)
Feb 2 2024, 10:44 PM
Unknown Object (File)
Dec 27 2023, 6:14 PM
Unknown Object (File)
Dec 20 2023, 6:17 AM
Unknown Object (File)
Nov 26 2023, 4:54 AM
Unknown Object (File)
Nov 22 2023, 5:44 PM
Unknown Object (File)
Nov 12 2023, 11:57 PM
Unknown Object (File)
Nov 10 2023, 7:05 PM

Details

Summary

Add the ffs option to enable soft-updates.
The option is only processed is ufs2 has been selected.

Test Plan

Creates some image, check mount(8) output.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.May 17 2017, 2:36 PM
manu edited edge metadata.

Forgot to bump manpage date.

This revision now requires review to proceed.May 17 2017, 2:39 PM
This revision is now accepted and ready to land.May 17 2017, 2:42 PM
kib added inline comments.
usr.sbin/makefs/ffs/mkfs.c
157 ↗(On Diff #28462)

If you keep the previous initialization to zero, I argue that this line should use '|='.

usr.sbin/makefs/ffs/mkfs.c
157 ↗(On Diff #28462)

True, I'll update the diff.

usr.sbin/makefs/ffs.h
67 ↗(On Diff #28462)

I suspect the option (and command line arg etc.) should be "softupdates" - see for example the description in the tunefs man page for -n Turn on/off soft updates

usr.sbin/makefs/ffs/mkfs.c
284 ↗(On Diff #28462)

isn't this always setting the flag, not just when requested?

usr.sbin/makefs/ffs.h
67 ↗(On Diff #28462)

Agreed, I'll change that

usr.sbin/makefs/ffs/mkfs.c
284 ↗(On Diff #28462)

That was my quick hack ... will update the diff without it

manu edited edge metadata.

Rename softupdate to softupdates
Remove hack

This revision now requires review to proceed.May 17 2017, 3:09 PM
manu marked 3 inline comments as done.May 17 2017, 3:10 PM
This revision is now accepted and ready to land.May 17 2017, 3:39 PM
usr.sbin/makefs/ffs.c
179 ↗(On Diff #28463)

Note that the option framework has OPT_BOOL see e.g. iso9660 allow-deep-trees. Based on that example I think this could be -soft-updates, which does not take a parameter and just enables SU if specified?

usr.sbin/makefs/ffs.h
67 ↗(On Diff #28463)

comment ought to be "soft updates' too :-)

manu edited edge metadata.

Correct comment : soft update -> soft updates

This revision now requires review to proceed.May 18 2017, 8:02 AM
manu marked 2 inline comments as done.May 18 2017, 8:03 AM
manu added inline comments.
usr.sbin/makefs/ffs.c
179 ↗(On Diff #28463)

OPT_BOOL just define a INT32 with values from 0 to 1.
-o softupdates works and is equivalent to -o softupdates=1

usr.sbin/makefs/ffs.c
154 ↗(On Diff #28504)

Unrelated to the review at hands, would be nice to switch ffs_options to use designated initializers.

This revision is now accepted and ready to land.May 18 2017, 1:35 PM
This revision was automatically updated to reflect the committed changes.
manu marked an inline comment as done.