From owner-cvs-src@FreeBSD.ORG Mon May 3 11:24:41 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 E215A16A4CF; Mon, 3 May 2004 11:24:41 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D47F243D1F; Mon, 3 May 2004 11:24:41 -0700 (PDT) (envelope-from pjd@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i43IOfGe089632; Mon, 3 May 2004 11:24:41 -0700 (PDT) (envelope-from pjd@repoman.freebsd.org) Received: (from pjd@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i43IOfYQ089631; Mon, 3 May 2004 11:24:41 -0700 (PDT) (envelope-from pjd) Message-Id: <200405031824.i43IOfYQ089631@repoman.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 3 May 2004 11:24:41 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/ggate/ggatec ggatec.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: Mon, 03 May 2004 18:24:42 -0000 pjd 2004/05/03 11:24:41 PDT FreeBSD src repository Modified files: sbin/ggate/ggatec ggatec.c Log: Don't repeat handshake. This little thing can cause a deadlock, because taste mechanism start to work after creation of ggate provider and I/O requests are sent from other classes from the g_event thread, so number of pending events isn't 0. Now ggatec(8) start second handshake and ggated(8) is trying to open GEOM provider (for example md(4)) and it can't, because it hangs on g_waitidle() in g_dev_open(). g_waitidle() cannot finish because there is a pending read on event queue, and this read can't be finished, because ggated(8) can't open target device. GEOM Gate will recover from this deadlock, because requests will timeout, but it of course isn't the best solution and I don't know better one for now, so we should avoid opening GEOM providers while there are pending requests in event queue. Revision Changes Path 1.3 +4 -4 src/sbin/ggate/ggatec/ggatec.c