From owner-p4-projects@FreeBSD.ORG Fri Jul 6 10:02:41 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9A89E16A468; Fri, 6 Jul 2007 10:02:41 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6B61A16A400 for ; Fri, 6 Jul 2007 10:02:41 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from merke.itea.ntnu.no (merke.itea.ntnu.no [129.241.7.61]) by mx1.freebsd.org (Postfix) with ESMTP id 2264713C45D for ; Fri, 6 Jul 2007 10:02:41 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by merke.itea.ntnu.no (Postfix) with ESMTP id 9476E13EAA2; Fri, 6 Jul 2007 12:02:39 +0200 (CEST) Received: from gaupe.stud.ntnu.no (gaupe.stud.ntnu.no [129.241.56.184]) by merke.itea.ntnu.no (Postfix) with ESMTP; Fri, 6 Jul 2007 12:02:39 +0200 (CEST) Received: by gaupe.stud.ntnu.no (Postfix, from userid 2312) id CFDBAD0034; Fri, 6 Jul 2007 12:02:44 +0200 (CEST) Date: Fri, 6 Jul 2007 12:02:44 +0200 From: Ulf Lilleengen To: Sonja Milicic Message-ID: <20070706100244.GB318@stud.ntnu.no> References: <200707050001.l6501ebB054832@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200707050001.l6501ebB054832@repoman.freebsd.org> User-Agent: Mutt/1.5.9i X-Content-Scanned: with sophos and spamassassin at mailgw.ntnu.no. Cc: Perforce Change Reviews Subject: Re: PERFORCE change 122892 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jul 2007 10:02:42 -0000 On tor, jul 05, 2007 at 12:01:40 +0000, Sonja Milicic wrote: > http://perforce.freebsd.org/chv.cgi?CH=122892 > > Change 122892 by smilicic@tanarri_marilith on 2007/07/05 00:01:06 > > fixed a bug with log provider creation and added more details to dumpconf > > Affected files ... > > .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.c#4 edit > Differences ... > > ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.c#4 (text+ko) ==== * SNIP * > g_log_worker_sleep(struct g_log_softc *sc) > { > - if (g_log_no_events(&sc->sc_events)) > - tsleep(sc, PRIBIO, "glogidle", hz); > + if (g_log_no_events(&sc->sc_events)){ > + G_LOG_DEBUG(0, "putting worker to sleep"); > + tsleep(sc, PRIBIO, "glogidle", hz); > + } > } > > /*worker thread*/ > @@ -380,6 +419,7 @@ > panic("No softc!"); You should consider to use KASSERT for this, as you have done en log_post_event. > > while (1){ > + G_LOG_DEBUG(0,"working..."); > ev = g_log_get_event(&sc->sc_events); > + g_log_stop(sc->sc_geom_log, *force); > + else > + panic("Softc is null in ctl_destroy!"); Also a candidate. Also, I noticed that a lot of places you mix whitespaces and tabs. It would be nice if you just used one of them. Anyway, thought I'd just see how the other GEOM student is doing :) Your work looks good so far! -- Ulf Lilleengen