Date: Mon, 21 Jun 2010 18:47:27 +0100 From: Bruce Cran <bruce@cran.org.uk> To: freebsd-fs@freebsd.org Subject: Patch to fix reported mountpoint when mounting dirty filesystem Message-ID: <201006211847.27788.bruce@cran.org.uk>
next in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006211847.27788.bruce>