NetBSD Problem Report #39609
From jmcneill@black.invisible.ca Mon Sep 22 11:40:23 2008
Return-Path: <jmcneill@black.invisible.ca>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id DBE4963B884
for <gnats-bugs@gnats.NetBSD.org>; Mon, 22 Sep 2008 11:40:23 +0000 (UTC)
Message-Id: <20080922114016.D98BB7D99A9@black.invisible.ca>
Date: Mon, 22 Sep 2008 07:40:16 -0400 (EDT)
From: jmcneill@invisible.ca
Reply-To: jmcneill@invisible.ca
To: gnats-bugs@gnats.NetBSD.org
Subject: wapbl "replaying log to disk" message is potentially misleading
X-Send-Pr-Version: 3.95
>Number: 39609
>Category: kern
>Synopsis: wapbl "replaying log to disk" message is potentially misleading
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Sep 22 11:45:00 +0000 2008
>Closed-Date: Sat Feb 11 18:37:09 +0000 2012
>Last-Modified: Sat Feb 11 18:37:09 +0000 2012
>Originator: Jared D. McNeill
>Release: NetBSD 4.99.72
>Organization:
>Environment:
System: NetBSD black.invisible.ca 4.99.72 NetBSD 4.99.72 (GENERIC) #91: Sat Sep 20 20:27:12 EDT 2008 jmcneill@black.invisible.ca:/export/home/jmcneill/branches/HEAD/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
The wapbl "replaying log to disk" message uses the last mount point
instead of the current mount point in its printf, which scared
the heck out of me when mounting a removable drive that was the
root filesystem of another machine on my laptop.
>How-To-Repeat:
Take the root filesystem from another drive and mount it on /mnt:
# mount /dev/ld0a /mnt
/: replaying log to disk
The printf in ffs_vfsops.c uses fs_fsmnt, but this is the
last mounted point, not the current mount point.
>Fix:
Any of the following messages would be much more informative (and
a lot less scary).
/dev/ld0a (last mounted on /): replaying log to disk
/dev/ld0a: replaying log to disk
/mnt: replaying log to disk
>Release-Note:
>Audit-Trail:
From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/39609: wapbl "replaying log to disk" message is potentially
misleading
Date: Tue, 3 Jan 2012 07:14:27 -0800 (PST)
Seems to me that the following simple patch would take care of this pronlem:
Index: ffs_vfsops.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ffs/ffs_vfsops.c,v
retrieving revision 1.271
diff -u -p -r1.271 ffs_vfsops.c
--- ffs_vfsops.c 14 Nov 2011 18:35:14 -0000 1.271
+++ ffs_vfsops.c 3 Jan 2012 14:26:27 -0000
@@ -524,7 +524,7 @@ ffs_mount(struct mount *mp, const char *
#ifdef WAPBL
if (fs->fs_flags & FS_DOWAPBL) {
printf("%s: replaying log to disk\n",
- fs->fs_fsmnt);
+ mp->mnt_stat.f_mntonname);
KDASSERT(mp->mnt_wapbl_replay);
error =
wapbl_replay_write(mp->mnt_wapbl_replay,
devvp);
Any objection to committing this?
-------------------------------------------------------------------------
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer | | pgoyette at netbsd.org |
-------------------------------------------------------------------------
From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39609 CVS commit: src/sys/ufs/ffs
Date: Tue, 3 Jan 2012 15:44:00 +0000
Module Name: src
Committed By: pgoyette
Date: Tue Jan 3 15:44:00 UTC 2012
Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c
Log Message:
Display current mount point, rather than previous one, when printing
the "replaying log to disk" message.
OK dholland@
Fixes PR kern/39609
To generate a diff of this commit:
cvs rdiff -u -r1.271 -r1.272 src/sys/ufs/ffs/ffs_vfsops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Tue, 03 Jan 2012 15:47:20 +0000
State-Changed-Why:
Patched - please confirm that it addresses your concern.
From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: Re: kern/39609: wapbl "replaying log to disk" message is potentially
misleading
Date: Tue, 3 Jan 2012 06:55:01 -0800 (PST)
(Resending with corrected subject line)
Seems to me that the following simple patch would take care of this pronlem:
Index: ffs_vfsops.c
===================================================================
RCS file: /cvsroot/src/sys/ufs/ffs/ffs_vfsops.c,v
retrieving revision 1.271
diff -u -p -r1.271 ffs_vfsops.c
--- ffs_vfsops.c 14 Nov 2011 18:35:14 -0000 1.271
+++ ffs_vfsops.c 3 Jan 2012 14:26:27 -0000
@@ -524,7 +524,7 @@ ffs_mount(struct mount *mp, const char *
#ifdef WAPBL
if (fs->fs_flags & FS_DOWAPBL) {
printf("%s: replaying log to disk\n",
- fs->fs_fsmnt);
+ mp->mnt_stat.f_mntonname);
KDASSERT(mp->mnt_wapbl_replay);
error = wapbl_replay_write(mp->mnt_wapbl_replay,
devvp);
Any objection to committing this?
-------------------------------------------------------------------------
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer | | pgoyette at netbsd.org |
-------------------------------------------------------------------------
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 11 Feb 2012 18:37:09 +0000
State-Changed-Why:
committed and as jmcneill resigned, let's not wait for feedback
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.