Page MenuHomeFreeBSD

D56002.diff
No OneTemporary

D56002.diff

diff --git a/sbin/tunefs/tunefs.8 b/sbin/tunefs/tunefs.8
--- a/sbin/tunefs/tunefs.8
+++ b/sbin/tunefs/tunefs.8
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd November 17, 2023
+.Dd March 20, 2026
.Dt TUNEFS 8
.Os
.Sh NAME
@@ -92,6 +92,8 @@
Specify the expected average file size.
.It Fl j Cm enable | disable
Turn on/off soft updates journaling.
+Enabling soft updates journaling implies enabling soft updates and is
+incompatible with GEOM journaling.
.Pp
Enabling journaling reduces the time spent by
.Xr fsck_ffs 8
@@ -128,7 +130,8 @@
Running a full fsck on a UFS filesystem is the equivalent of
running a scrub on a ZFS filesystem.
.It Fl J Cm enable | disable
-Turn on/off gjournal flag.
+Turn on/off GEOM journaling.
+GEOM journaling is incompatible with soft updates.
.It Fl k Ar held-for-metadata-blocks
Set the amount of space to be held for metadata blocks.
When set, the file system preference routines will try to save
@@ -171,6 +174,7 @@
Turn on/off the administrative NFSv4 ACL enable flag.
.It Fl n Cm enable | disable
Turn on/off soft updates.
+Soft updates are incompatible with GEOM journaling.
.It Fl o Cm space | time
The file system can either try to minimize the time spent
allocating blocks, or it can attempt to minimize the space
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c
--- a/sbin/tunefs/tunefs.c
+++ b/sbin/tunefs/tunefs.c
@@ -358,6 +358,9 @@
if ((sblock.fs_flags & (FS_DOSOFTDEP | FS_SUJ)) ==
(FS_DOSOFTDEP | FS_SUJ)) {
warnx("%s remains unchanged as enabled", name);
+ } else if (sblock.fs_flags & FS_GJOURNAL) {
+ warnx("%s cannot be enabled while GEOM "
+ "journaling is enabled", name);
} else if (sblock.fs_clean == 0) {
warnx("%s cannot be enabled until fsck is run",
name);
@@ -386,6 +389,9 @@
if (strcmp(Jvalue, "enable") == 0) {
if (sblock.fs_flags & FS_GJOURNAL) {
warnx("%s remains unchanged as enabled", name);
+ } if (sblock.fs_flags & FS_DOSOFTDEP) {
+ warnx("%s cannot be enabled while soft "
+ "updates are enabled", name);
} else {
sblock.fs_flags |= FS_GJOURNAL;
warnx("%s set", name);
@@ -403,9 +409,9 @@
}
if (kflag) {
name = "space to hold for metadata blocks";
- if (sblock.fs_metaspace == kvalue)
+ if (sblock.fs_metaspace == kvalue) {
warnx("%s remains unchanged as %d", name, kvalue);
- else {
+ } else {
kvalue = blknum(&sblock, kvalue);
if (kvalue > sblock.fs_fpg / 2) {
kvalue = blknum(&sblock, sblock.fs_fpg / 2);
@@ -477,9 +483,12 @@
if (nflag) {
name = "soft updates";
if (strcmp(nvalue, "enable") == 0) {
- if (sblock.fs_flags & FS_DOSOFTDEP)
+ if (sblock.fs_flags & FS_DOSOFTDEP) {
warnx("%s remains unchanged as enabled", name);
- else if (sblock.fs_clean == 0) {
+ } else if (sblock.fs_flags & FS_GJOURNAL) {
+ warnx("%s cannot be enabled while GEOM "
+ "journaling is enabled", name);
+ } else if (sblock.fs_clean == 0) {
warnx("%s cannot be enabled until fsck is run",
name);
} else {

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 26, 12:02 PM (5 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34331518
Default Alt Text
D56002.diff (3 KB)

Event Timeline