mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
newfs: Don't combine GEOM journaling with SU
GEOM journaling shouldn't be used at the same time as soft updates, so don't enable soft updates if GEOM journaling has been requested, and error out if both are explicitly requested. MFC after: 1 week PR: 293896 Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D55999
This commit is contained in:
+10
-4
@@ -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
|
||||
|
||||
+3
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user