From nobody Wed Dec 14 23:35:00 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NXWtY1nSbz4krxc; Wed, 14 Dec 2022 23:35:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NXWtY1Dc5z4QgT; Wed, 14 Dec 2022 23:35:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671060901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=piJRM4HmhPcY+3SZ4ffbB6XDYt3Fa7Cu0TZMi/i+rDg=; b=OA9/0AYzgN6pXKcEzfptUooGsr7sO13j9YJJ2SxlGaQkmK3Zsm0x2a7/sJ2i/If0Szjlvn n+1B5jGvBHvV3bNoD03VNATOK9iKC6mupWv+rVScs3nMhAJRJetcudlqXjDz+fip0cz2vl uJOsdr19kgAHwDdb3iU2Nqq0KPBSX6faPb7Te6ZXCsj8DQnNj91VX3ekj5v63bbLFf4YlQ 4qQ4Swd5X7W4OytELoHBHvlJXlWmhR4TxAaCHkr4QePqyTf2721b3K8KiRuk/44Tpcg+R1 XoQAk0i1NuhCjA00Quc8AYGaG+QBQiRMnVN4UaD/jXA02yk/DE8WSlAgKQt77w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671060901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=piJRM4HmhPcY+3SZ4ffbB6XDYt3Fa7Cu0TZMi/i+rDg=; b=wOfsRIhWW7lSk1nVMaW+MtM2Uz3H7unbRazo6Bv4dRhESzGjLwwH8n2RE6nxhUCSDs/ZQu +Q/9ZXCFCpamnyz5zhnuNldn8Ij7FeQx1B3Y9Mz/hMSCWFpYkVomi1Hk/Dbhue+8H3GHUn pndwPnaLYpnL9lioyLyW14UjDr+cRLVQij/gSdNJAMmMN6tSsy0GEtouGXvbVefcJN8MTB HlzqrDRUv34P0HtUqocfcc3H6m74jF4s/yPsuPOXR4+Y0Isfn3FlOA/74bBcmRH/rggPZ1 bYZI8kJQhH9Y6g/3Fpx+W/jIdKlL+q5X33myRZAYl6EVx0v7h3imhzXYK/TCLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671060901; a=rsa-sha256; cv=none; b=wifiMsYe7w+lC1CphOBq2IWmYNbRUcBfTCTZL9aHjehY/6aWwb+nHMQckbgl/YKmbtxsCh GwN50Kg6fVnVoHVxeCHq1dePAhqYJK5kvuRD9CdocU7pZRY0PsXz1FJO1dYwri7uM7ZMoo zHDrJ7Q+FUkSu4BuVlCHmFSNFZgC+6Yh4Pr1EXq2/TxjW+AC27v9BOBW3E02dwFPJI1D0U fzDFJITo1+/ruK43a0t6miplLiRWONLJ1OA1QxsQuMRTzFGl114siOYN/YBpBIUni/S0RU 9MLds/GKI6m4xPwTxLhDsxxtpiKdLmoyp8lduLoROf4n8aqRmo+tTMJtaufZTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NXWtY0JVPz1BRN; Wed, 14 Dec 2022 23:35:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BENZ0YD066281; Wed, 14 Dec 2022 23:35:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BENZ0BX066280; Wed, 14 Dec 2022 23:35:00 GMT (envelope-from git) Date: Wed, 14 Dec 2022 23:35:00 GMT Message-Id: <202212142335.2BENZ0BX066280@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 09d7e0d71060 - stable/13 - Provide more precise mount(8) failure message. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 09d7e0d710609f2650094b2aabee405aa64857cd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=09d7e0d710609f2650094b2aabee405aa64857cd commit 09d7e0d710609f2650094b2aabee405aa64857cd Author: Kirk McKusick AuthorDate: 2022-12-05 22:47:24 +0000 Commit: Kirk McKusick 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; }