[sheepdog] [PATCH 1/3] sheep: print symbolic command names

Liu Yuan namei.unix at gmail.com
Mon Jul 16 07:58:22 CEST 2012


On 07/14/2012 03:39 PM, Christoph Hellwig wrote:
> On Fri, Jul 13, 2012 at 08:00:48PM +0800, Liu Yuan wrote:
>> On 07/13/2012 05:52 PM, Christoph Hellwig wrote:
>>> ===================================================================
>>> --- sheepdog.orig/sheep/sdnet.c	2012-07-13 09:24:16.423304255 +0200
>>> +++ sheepdog/sheep/sdnet.c	2012-07-13 11:31:54.473258506 +0200
>>> @@ -110,16 +110,16 @@ static void local_op_done(struct work *w
>>>  static int check_request_epoch(struct request *req)
>>>  {
>>>  	if (before(req->rq.epoch, sys->epoch)) {
>>> -		eprintf("old node version %u, %u, %x\n",
>>> -			sys->epoch, req->rq.epoch, req->rq.opcode);
>>> +		eprintf("old node version %u, %u (%s)\n",
>>> +			sys->epoch, req->rq.epoch, op_name(req->op));
>>
>> I think better eprintf -> dprintf, not everyone find it useful.
> 
> Can we keep it for?  A lot of these have been useful for debugging,
> so even if you insist on changing it I'd like that to be an easily
> revertable separate commit.
> 

I just meant that use dprintf for debug message and eprintf for error
output (Some places should indeed use eprintf, but in patch 1/3, we
should use dprintf at many places). If you don't want to fold this
patch, please at least change eprintf into dprintf() for debug message.

Thanks,
Yuan



More information about the sheepdog mailing list