Subject: kern/18973: lfs_sync wrong wait point
To: None <gnats-bugs@gnats.netbsd.org>
From: None <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 11/09/2002 01:31:07
>Number: 18973
>Category: kern
>Synopsis: lfs_sync wrong wait point
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 08 08:55:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release: NetBSD 1.6K
>Organization:
>Environment:
System: NetBSD kaeru 1.6K NetBSD 1.6K (build.kaeru) #170: Sat Nov 9 00:41:22 JST 2002 takashi@kaeru:/usr/home/takashi/work/kernel/build.kaeru i386
Architecture: i386
Machine: i386
>Description:
it seems lfs_sync waits on wrong address.
>How-To-Repeat:
>Fix:
Index: lfs_vfsops.c
===================================================================
RCS file: /cvs/NetBSD/syssrc/sys/ufs/lfs/lfs_vfsops.c,v
retrieving revision 1.82
diff -u -p -r1.82 lfs_vfsops.c
--- lfs_vfsops.c 2002/09/27 15:38:07 1.82
+++ lfs_vfsops.c 2002/10/26 11:34:01
@@ -1313,7 +1313,7 @@ lfs_sync(struct mount *mp, int waitfor,
if (fs->lfs_ronly)
return 0;
while (fs->lfs_dirops)
- error = tsleep(&fs->lfs_dirops, PRIBIO + 1, "lfs_dirops", 0);
+ error = tsleep(&fs->lfs_writer, PRIBIO + 1, "lfs_dirops", 0);
fs->lfs_writer++;
/* All syncs must be checkpoints until roll-forward is implemented. */
>Release-Note:
>Audit-Trail:
>Unformatted: