From owner-cvs-src@FreeBSD.ORG Sat Oct 23 20:49:18 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CEB416A4CF; Sat, 23 Oct 2004 20:49:18 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EC4043D46; Sat, 23 Oct 2004 20:49:18 +0000 (GMT) (envelope-from phk@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i9NKnHN2027684; Sat, 23 Oct 2004 20:49:17 GMT (envelope-from phk@repoman.freebsd.org) Received: (from phk@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i9NKnHhH027683; Sat, 23 Oct 2004 20:49:17 GMT (envelope-from phk) Message-Id: <200410232049.i9NKnHhH027683@repoman.freebsd.org> From: Poul-Henning Kamp Date: Sat, 23 Oct 2004 20:49:17 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/geom geom_event.c src/sys/sys proc.h src/sys/kern subr_trap.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2004 20:49:18 -0000 phk 2004-10-23 20:49:17 UTC FreeBSD src repository Modified files: sys/geom geom_event.c sys/sys proc.h sys/kern subr_trap.c Log: Add a new per-thread private flag: TDP_GEOM. This flag gets set whenever the thread posts an event on the GEOM event queue, and if the flag is set when the thread is prepared to return to userland from the kernel, g_waitidle() will be called to make sure that the posted events have completed. This can replace an insufficient number of g_waitidle() calls in various other places, and has the advantage of being failsafe: Any system call which does a VOP_OPEN()/VOP_CLOSE will now correctly wait for any geom events it posted as part of spoils or tastes. Assert that topology and Giant is not held in g_waitidle(). Revision Changes Path 1.51 +8 -1 src/sys/geom/geom_event.c 1.276 +7 -0 src/sys/kern/subr_trap.c 1.411 +1 -0 src/sys/sys/proc.h