From owner-p4-projects@FreeBSD.ORG Fri Jul 13 23:26:33 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 1028516A406; Fri, 13 Jul 2007 23:26:33 +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 BC43F16A403; Fri, 13 Jul 2007 23:26:32 +0000 (UTC) (envelope-from tanarri@geri.cc.fer.hr) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.121]) by mx1.freebsd.org (Postfix) with ESMTP id 4642513C461; Fri, 13 Jul 2007 23:26:32 +0000 (UTC) (envelope-from tanarri@geri.cc.fer.hr) Received: from geri.cc.fer.hr (localhost.cc.fer.hr [127.0.0.1]) by geri.cc.fer.hr (8.13.8/8.13.8) with ESMTP id l6DMq18u080227; Sat, 14 Jul 2007 00:52:01 +0200 (CEST) (envelope-from tanarri@geri.cc.fer.hr) Received: from localhost (tanarri@localhost) by geri.cc.fer.hr (8.13.8/8.13.8/Submit) with ESMTP id l6DMq0IR080224; Sat, 14 Jul 2007 00:52:00 +0200 (CEST) (envelope-from tanarri@geri.cc.fer.hr) Date: Sat, 14 Jul 2007 00:52:00 +0200 (CEST) From: Sonja Milicic To: Ulf Lilleengen In-Reply-To: <20070713140842.GA5140@stud.ntnu.no> Message-ID: <20070714004719.I79152@geri.cc.fer.hr> References: <200707131310.l6DDAHSO085838@repoman.freebsd.org> <20070713140842.GA5140@stud.ntnu.no> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (geri.cc.fer.hr [127.0.0.1]); Sat, 14 Jul 2007 00:52:01 +0200 (CEST) Cc: Perforce Change Reviews , Sonja Milicic Subject: Re: PERFORCE change 123439 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, 13 Jul 2007 23:26:33 -0000 On Fri, 13 Jul 2007, Ulf Lilleengen wrote: > On fre, jul 13, 2007 at 01:10:17 +0000, Sonja Milicic wrote: >> http://perforce.freebsd.org/chv.cgi?CH=123439 >> >> Change 123439 by smilicic@tanarri_marilith on 2007/07/13 13:09:48 >> >> added license statements to files that didn't have them >> fixed a bug in g_log_access >> redirecting write requests to log file now works >> >> Affected files ... >> >> .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/geom_log_so.c#2 edit >> .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog.c#7 edit >> .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.c#2 edit >> .. //depot/projects/soc2007/smilicic_glog/sys/geom/log/glog_fileops.h#2 edit >> >> Differences ... >> >> ==== //depot/projects/soc2007/smilicic_glog/sys/geom/log/geom_log_so.c#2 (text+ko) ==== >> >> > *SNIP* >> bp->bio_to->error, bp->bio_to->name)); >> >> G_LOG_LOGREQ(DBG_NOTICE, bp, "Request received."); >> - g_io_deliver(bp, ENXIO); >> - return; >> switch(bp->bio_cmd) { >> case BIO_WRITE: >> + G_LOG_DEBUG(0, "Write request received."); >> g_log_post_event(&sc->sc_events, GLOG_EVWRITE, GLOG_FLAG_WAKEUP_SC, bp, 0); >> break; >> case BIO_READ: >> + g_io_deliver(bp, ENXIO); >> + return; >> g_log_post_event(&sc->sc_events, GLOG_EVREAD, GLOG_FLAG_WAKEUP_SC, bp, 0); > This will never be reached. I know. I haven't written the code to handle read requests just yet and it caused some errors, so I just put g_io_deliver there to avoid such errors for the time being. Of course it won't be there in the final version :) > >> break; >> default: >> - break; >> + g_io_deliver(bp, ENXIO); >> + return; >> } > *SNIP* >> - } >> + >> + err = g_access(cp, dr ,dw, de); >> + >> + G_LOG_DEBUG(0, "access done, %d", err); >> return err; > Just a quick note from style(9): return values should be enclosed in parantheses > like this: return (err); Will change that before the next submit :)