From owner-freebsd-fs@FreeBSD.ORG Mon Jun 21 17:47:32 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FDA1106564A for ; Mon, 21 Jun 2010 17:47:32 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [204.109.60.94]) by mx1.freebsd.org (Postfix) with ESMTP id CD7A98FC13 for ; Mon, 21 Jun 2010 17:47:31 +0000 (UTC) Received: from core.draftnet (87-194-158-129.bethere.co.uk [87.194.158.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id 45F7C5D19 for ; Mon, 21 Jun 2010 17:47:30 +0000 (UTC) From: Bruce Cran To: freebsd-fs@freebsd.org Date: Mon, 21 Jun 2010 18:47:27 +0100 User-Agent: KMail/1.13.3 (FreeBSD/9.0-CURRENT; KDE/4.4.4; amd64; ; ) MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_vW6HMz2ItXB/wwO" Message-Id: <201006211847.27788.bruce@cran.org.uk> Subject: Patch to fix reported mountpoint when mounting dirty filesystem X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2010 17:47:32 -0000 --Boundary-00=_vW6HMz2ItXB/wwO Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I've been investigating PR bin/19683 which is about the fact that when a R/W mount is denied due to the filesystem being dirty, the reported mountpoint is that which has been recorded in the superblock, not the directory that it's currently being mounted on. I've attached a potential patch but I'm not sure if f_mntonname is valid at the first print statement. Also, I tried to replicate the problem with ext2fs but the despite code being present which prints the mountpoint, that code was never hit so I'm not sure if it needs updated too? -- Bruce Cran --Boundary-00=_vW6HMz2ItXB/wwO Content-Type: text/x-patch; charset="us-ascii"; name="ffs_vfsopc.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ffs_vfsopc.c.diff" Index: sys/ufs/ffs/ffs_vfsops.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- sys/ufs/ffs/ffs_vfsops.c (revision 209306) +++ sys/ufs/ffs/ffs_vfsops.c (working copy) @@ -315,7 +315,7 @@ } else { printf( "WARNING: R/W mount of %s denied. Filesystem is not clean - run fsck\n", =2D fs->fs_fsmnt); + mp->mnt_stat.f_mntonname); if (fs->fs_flags & FS_SUJ) printf( "WARNING: Forced mount will invalidated journal contents\n"); @@ -726,7 +726,7 @@ } else { printf( "WARNING: R/W mount of %s denied. Filesystem is not clean - run fsck\n", =2D fs->fs_fsmnt); + mp->mnt_stat.f_mntonname); if (fs->fs_flags & FS_SUJ) printf( "WARNING: Forced mount will invalidated journal contents\n"); --Boundary-00=_vW6HMz2ItXB/wwO--