Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147039592
D54576.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D54576.diff
View Options
diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8
--- a/sbin/newfs/newfs.8
+++ b/sbin/newfs/newfs.8
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 23, 2025
+.Dd January 7, 2026
.Dt NEWFS 8
.Os
.Sh NAME
@@ -33,7 +33,7 @@
.Nd construct a new UFS1/UFS2 file system
.Sh SYNOPSIS
.Nm
-.Op Fl EJNUjlnt
+.Op Fl EJNUjlntu
.Op Fl L Ar volname
.Op Fl O Ar filesystem-type
.Op Fl S Ar sector-size
@@ -98,10 +98,20 @@
For backward compatibility.
.It Fl U
Enable soft updates on the new file system.
-Soft updates are enabled by default for UFS2 format file systems.
-Use
-.Xr tunefs 8
-to disable soft updates if they are not wanted.
+If neither
+.Fl U
+nor
+.Fl u
+is specified, soft updates are enabled by default for UFS2 format file
+systems and disabled otherwise.
+.It Fl u
+Do not enable soft updates on the new file system.
+If neither
+.Fl U
+nor
+.Fl u
+is specified, soft updates are enabled by default for UFS2 format file
+systems and disabled otherwise.
.It Fl a Ar maxcontig
Specify the maximum number of contiguous blocks that will be
laid out before forcing a rotational delay.
@@ -166,6 +176,8 @@
specifies the average file size on the file system.
.It Fl j
Enable soft updates journaling on the new file system.
+This implies
+.Fl U .
This flag is implemented by running the
.Xr tunefs 8
utility found in the user's
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -76,7 +76,7 @@
int Nflag; /* run without writing file system */
int Oflag = 2; /* file system format (1 => UFS1, 2 => UFS2) */
int Rflag; /* regression test */
-int Uflag; /* enable soft updates for file system */
+int Uflag = -1; /* enable soft updates for file system */
int jflag; /* enable soft updates journaling for filesys */
int Xflag = 0; /* exit in middle of newfs for testing */
int Jflag; /* enable gjournal for file system */
@@ -179,6 +179,9 @@
case 'U':
Uflag = 1;
break;
+ case 'u':
+ Uflag = 0;
+ break;
case 'X':
Xflag++;
break;
@@ -386,8 +389,8 @@
opt = FS_OPTSPACE;
}
/* Use soft updates by default for UFS2 and above */
- if (Oflag > 1)
- Uflag = 1;
+ if (Uflag < 0)
+ Uflag = Oflag > 1;
realsectorsize = sectorsize;
if (sectorsize != DEV_BSIZE) { /* XXX */
int secperblk = sectorsize / DEV_BSIZE;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 8, 8:08 PM (10 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29415691
Default Alt Text
D54576.diff (2 KB)
Attached To
Mode
D54576: newfs: Add an option to disable soft updates
Attached
Detach File
Event Timeline
Log In to Comment