Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Mar 2019 21:22:56 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r344731 - head/sbin/tunefs
Message-ID:  <201903022122.x22LMuxB033093@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Sat Mar  2 21:22:56 2019
New Revision: 344731
URL: https://svnweb.freebsd.org/changeset/base/344731

Log:
  The size of the UFS soft-updates journal must be a multiple of the
  filesystem block size. When a size is specified with the -S flag
  to tunefs(8), round it up to the filesystem block size.
  
  Reported by:  Peter Holm
  Tested by:    Peter Holm
  Sponsored by: Netflix

Modified:
  head/sbin/tunefs/tunefs.c

Modified: head/sbin/tunefs/tunefs.c
==============================================================================
--- head/sbin/tunefs/tunefs.c	Sat Mar  2 21:11:46 2019	(r344730)
+++ head/sbin/tunefs/tunefs.c	Sat Mar  2 21:22:56 2019	(r344731)
@@ -971,9 +971,9 @@ journal_alloc(int64_t size)
 		if (size / sblock.fs_fsize > sblock.fs_fpg)
 			size = sblock.fs_fpg * sblock.fs_fsize;
 		size = MAX(SUJ_MIN, size);
-		/* fsck does not support fragments in journal files. */
-		size = roundup(size, sblock.fs_bsize);
 	}
+	/* fsck does not support fragments in journal files. */
+	size = roundup(size, sblock.fs_bsize);
 	resid = blocks = size / sblock.fs_bsize;
 	if (sblock.fs_cstotal.cs_nbfree < blocks) {
 		warn("Insufficient free space for %jd byte journal", size);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903022122.x22LMuxB033093>