git: 1fbcaa13b033 - main - When doing a read-only mount of a UFS filesystem using gjournal(8), suppress error message about a missing gjournal provider.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Jan 2022 22:04:53 UTC
The branch main has been updated by mckusick:
URL: https://cgit.FreeBSD.org/src/commit/?id=1fbcaa13b033230c52487a270803bd0f7723e107
commit 1fbcaa13b033230c52487a270803bd0f7723e107
Author: Kirk McKusick <mckusick@FreeBSD.org>
AuthorDate: 2022-01-02 22:04:06 +0000
Commit: Kirk McKusick <mckusick@FreeBSD.org>
CommitDate: 2022-01-02 22:04:39 +0000
When doing a read-only mount of a UFS filesystem using gjournal(8),
suppress error message about a missing gjournal provider.
Submitted by: Andreas Longwitz
MFC after: 2 weeks
Sponsored by: Netflix
---
sys/ufs/ffs/ffs_vfsops.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index f9fb854c9640..131bdc33f427 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1015,9 +1015,10 @@ ffs_mountfs(odevvp, mp, td)
mp->mnt_flag |= MNT_GJOURNAL;
MNT_IUNLOCK(mp);
} else {
- printf("WARNING: %s: GJOURNAL flag on fs "
- "but no gjournal provider below\n",
- mp->mnt_stat.f_mntonname);
+ if ((mp->mnt_flag & MNT_RDONLY) == 0)
+ printf("WARNING: %s: GJOURNAL flag on fs "
+ "but no gjournal provider below\n",
+ mp->mnt_stat.f_mntonname);
free(mp->mnt_gjprovider, M_UFSMNT);
mp->mnt_gjprovider = NULL;
}