MFC of 344731

Roundup tunefs -S logsize to filesystem block size

Sponsored by: Netflix
This commit is contained in:
Kirk McKusick 2019-03-07 00:04:13 +00:00
parent c348fd91e6
commit 2be24a23a3

View File

@ -976,9 +976,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);