aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/newfs/newfs.814
-rw-r--r--sbin/newfs/newfs.c4
2 files changed, 13 insertions, 5 deletions
diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8
index 6416e0f0ec8d..3aa3890479bf 100644
--- 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 7, 2026
+.Dd March 20, 2026
.Dt NEWFS 8
.Os
.Sh NAME
@@ -84,6 +84,8 @@ Enable journaling on the new file system via gjournal.
See
.Xr gjournal 8
for details.
+This is incompatible with soft updates
+.Pq Fl U .
.It Fl L Ar volname
Add a volume label to the new file system.
Legal characters are alphanumerics, dashes, and underscores.
@@ -98,12 +100,14 @@ The default format is UFS2.
For backward compatibility.
.It Fl U
Enable soft updates on the new file system.
+This is incompatible with GEOM journaling
+.Pq Fl J .
If neither
.Fl U
nor
.Fl u
is specified, soft updates are enabled by default for UFS2 format file
-systems and disabled otherwise.
+systems unless GEOM journaling was requested and disabled otherwise.
.It Fl u
Do not enable soft updates on the new file system.
If neither
@@ -176,8 +180,10 @@ One inode is required for each distinct file, so this value effectively
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 implies soft updates
+.Pq Fl U
+and is incompatible with GEOM journaling
+.Pq Fl J .
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
index 78f0bfcf458d..a54aae6ef6fc 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -390,7 +390,9 @@ main(int argc, char *argv[])
}
/* Use soft updates by default for UFS2 and above */
if (Uflag < 0)
- Uflag = Oflag > 1;
+ Uflag = Oflag > 1 && !Jflag;
+ if (Uflag && Jflag)
+ errx(1, "Cannot enable both soft updates and GEOM journaling");
realsectorsize = sectorsize;
if (sectorsize != DEV_BSIZE) { /* XXX */
int secperblk = sectorsize / DEV_BSIZE;