PERFORCE change 123439 for review

Sonja Milicic tanarri at geri.cc.fer.hr
Fri Jul 13 23:26:33 UTC 2007



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 at 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 :)



More information about the p4-projects mailing list