From jeremyp@gsmx07.alcatel.com.au  Thu May 30 21:11:08 2002
Return-Path: <jeremyp@gsmx07.alcatel.com.au>
Received: from alcanet.com.au (mail2.alcanet.com.au [203.62.196.17])
	by hub.freebsd.org (Postfix) with ESMTP id D80E037B417
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 30 May 2002 21:10:56 -0700 (PDT)
Received: from mfg1.cim.alcatel.com.au (localhost.localdomain [127.0.0.1])
	by alcanet.com.au (8.12.1/8.12.1/Alcanet1.2) with ESMTP id g4V4AsvW031736
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 31 May 2002 14:10:54 +1000
Received: from gsmx07.alcatel.com.au by cim.alcatel.com.au
 (PMDF V5.2-32 #37641) with ESMTP id <01KIDPBLGR0G8Y6PAZ@cim.alcatel.com.au>
 for FreeBSD-gnats-submit@freebsd.org; Fri, 31 May 2002 14:10:20 +1000
Received: from gsmx07.alcatel.com.au (localhost [127.0.0.1])
	by gsmx07.alcatel.com.au (8.12.3/8.12.3) with ESMTP id g4V4An9l045082; Fri,
 31 May 2002 14:10:50 +1000
Received: (from jeremyp@localhost)
	by gsmx07.alcatel.com.au (8.12.3/8.12.3/Submit) id g4V4Am5i045081; Fri,
 31 May 2002 14:10:48 +1000 (EST)
Message-Id: <200205310410.g4V4Am5i045081@gsmx07.alcatel.com.au>
Date: Fri, 31 May 2002 14:10:48 +1000 (EST)
From: Peter Jeremy <peter.jeremy@alcatel.com.au>
Reply-To: Peter Jeremy <peter.jeremy@alcatel.com.au>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Misleading wait channel name in bwrite()
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38758
>Category:       kern
>Synopsis:       Misleading wait channel name in bwrite()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 30 21:20:01 PDT 2002
>Closed-Date:    Sun Jun 09 05:30:33 PDT 2002
>Last-Modified:  Sun Jun 09 05:30:33 PDT 2002
>Originator:     Peter Jeremy
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Alcatel Australia Limited
>Environment:
System: FreeBSD gsmx07.alcatel.com.au 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Tue May 7 08:15:34 EST 2002 root@:/usr/obj/3.0/cvs/src/sys/gsmx i386


	
>Description:
	When bwrite() is waiting for a background write to complete,
	it uses "biord" as a wait channel.  This seems somewhat
	misleading.  bufwait() uses "biowr" - which seems more reasonable.
	(Alternatively, "biobgwr" or similar would differentiate it from
	the sleep in bufwait().

>How-To-Repeat:
	Code inspection.
>Fix:

Index: vfs_bio.c
===================================================================
RCS file: /home/CVSROOT/src/sys/kern/vfs_bio.c,v
retrieving revision 1.310
diff -u -r1.310 vfs_bio.c
--- vfs_bio.c	4 May 2002 19:24:55 -0000	1.310
+++ vfs_bio.c	31 May 2002 03:51:39 -0000
@@ -758,7 +758,7 @@
 			return (0);
 		}
 		bp->b_xflags |= BX_BKGRDWAIT;
-		tsleep(&bp->b_xflags, PRIBIO, "biord", 0);
+		tsleep(&bp->b_xflags, PRIBIO, "biowr", 0);
 		if (bp->b_xflags & BX_BKGRDINPROG)
 			panic("bwrite: still writing");
 	}



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Sun Jun 9 05:29:07 PDT 2002 
State-Changed-Why:  
Fixed independently in the meantime. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=38758 
>Unformatted:
