Date: Wed, 14 Dec 2022 23:35:00 GMT From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 09d7e0d71060 - stable/13 - Provide more precise mount(8) failure message. Message-ID: <202212142335.2BENZ0BX066280@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=09d7e0d710609f2650094b2aabee405aa64857cd commit 09d7e0d710609f2650094b2aabee405aa64857cd Author: Kirk McKusick <mckusick@FreeBSD.org> AuthorDate: 2022-12-05 22:47:24 +0000 Commit: Kirk McKusick <mckusick@FreeBSD.org> CommitDate: 2022-12-14 23:34:50 +0000 Provide more precise mount(8) failure message. PR: 19683 (cherry picked from commit 08e5f519b21dfcc7543c41c14d066b2d015fbf5c) --- sys/ufs/ffs/ffs_vfsops.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 3dc6f6d9ee23..754a6bedee13 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -631,11 +631,12 @@ ffs_mount(struct mount *mp) (FS_SUJ | FS_NEEDSFSCK)) == 0 && (fs->fs_flags & FS_DOSOFTDEP))) { printf("WARNING: %s was not properly " - "dismounted\n", fs->fs_fsmnt); + "dismounted\n", + mp->mnt_stat.f_mntonname); } else { vfs_mount_error(mp, "R/W mount of %s denied. %s.%s", - fs->fs_fsmnt, + mp->mnt_stat.f_mntonname, "Filesystem is not clean - run fsck", (fs->fs_flags & FS_SUJ) == 0 ? "" : " Forced mount will invalidate" @@ -836,8 +837,8 @@ ffs_reload(struct mount *mp, int flags) UFS_LOCK(ump); if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) { printf("WARNING: %s: reload pending error: blocks %jd " - "files %d\n", fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks, - fs->fs_pendinginodes); + "files %d\n", mp->mnt_stat.f_mntonname, + (intmax_t)fs->fs_pendingblocks, fs->fs_pendinginodes); fs->fs_pendingblocks = 0; fs->fs_pendinginodes = 0; } @@ -1000,10 +1001,11 @@ ffs_mountfs(struct vnode *odevvp, struct mount *mp, struct thread *td) ((fs->fs_flags & (FS_SUJ | FS_NEEDSFSCK)) == 0 && (fs->fs_flags & FS_DOSOFTDEP))) { printf("WARNING: %s was not properly dismounted\n", - fs->fs_fsmnt); + mp->mnt_stat.f_mntonname); } else { - vfs_mount_error(mp, "R/W mount of %s denied. %s%s", - fs->fs_fsmnt, "Filesystem is not clean - run fsck.", + vfs_mount_error(mp, "R/W mount on %s denied. " + "Filesystem is not clean - run fsck.%s", + mp->mnt_stat.f_mntonname, (fs->fs_flags & FS_SUJ) == 0 ? "" : " Forced mount will invalidate journal contents"); error = EPERM; @@ -1012,7 +1014,8 @@ ffs_mountfs(struct vnode *odevvp, struct mount *mp, struct thread *td) if ((fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) && (mp->mnt_flag & MNT_FORCE)) { printf("WARNING: %s: lost blocks %jd files %d\n", - fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks, + mp->mnt_stat.f_mntonname, + (intmax_t)fs->fs_pendingblocks, fs->fs_pendinginodes); fs->fs_pendingblocks = 0; fs->fs_pendinginodes = 0; @@ -1020,8 +1023,8 @@ ffs_mountfs(struct vnode *odevvp, struct mount *mp, struct thread *td) } if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) { printf("WARNING: %s: mount pending error: blocks %jd " - "files %d\n", fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks, - fs->fs_pendinginodes); + "files %d\n", mp->mnt_stat.f_mntonname, + (intmax_t)fs->fs_pendingblocks, fs->fs_pendinginodes); fs->fs_pendingblocks = 0; fs->fs_pendinginodes = 0; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212142335.2BENZ0BX066280>