git: 4391c305e835 - stable/13 - newfs(8): Fix a bug in initialization of sblock.fs_maxbsize .
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Mar 2022 10:00:16 UTC
The branch stable/13 has been updated by hselasky:
URL: https://cgit.FreeBSD.org/src/commit/?id=4391c305e83552ed7801525723ff6c10a4efdf5e
commit 4391c305e83552ed7801525723ff6c10a4efdf5e
Author: Wuyang Chung <wy-chung@outlook.com>
AuthorDate: 2022-03-08 13:52:17 +0000
Commit: Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-03-17 09:54:57 +0000
newfs(8): Fix a bug in initialization of sblock.fs_maxbsize .
Fixes: 1c85e6a35d93195e896b030d9a55f7ac4ccee2c3 (SVN r98542)
Pull Request: https://github.com/freebsd/freebsd-src/pull/587
Sponsored by: NVIDIA Networking
(cherry picked from commit c5f549c1e0c9aa1764e87d55f183053c1545b1fc)
---
sbin/newfs/mkfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index bf5ee60694d0..a6c4ee60c2d5 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -225,7 +225,7 @@ restart:
if (maxbsize < bsize || !POWEROF2(maxbsize)) {
sblock.fs_maxbsize = sblock.fs_bsize;
printf("Extent size set to %d\n", sblock.fs_maxbsize);
- } else if (sblock.fs_maxbsize > FS_MAXCONTIG * sblock.fs_bsize) {
+ } else if (maxbsize > FS_MAXCONTIG * sblock.fs_bsize) {
sblock.fs_maxbsize = FS_MAXCONTIG * sblock.fs_bsize;
printf("Extent size reduced to %d\n", sblock.fs_maxbsize);
} else {