[sheepdog] [PATCH] gateway: use more user friendly outout for poll timeout

Liu Yuan namei.unix at gmail.com
Thu May 23 08:25:02 CEST 2013


On 05/23/2013 02:20 PM, Wenhao wrote:
> On Thu, May 23, 2013 at 2:01 PM, Liu Yuan <namei.unix at gmail.com> wrote:
>> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
>> ---
>>  sheep/gateway.c |    4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/sheep/gateway.c b/sheep/gateway.c
>> index 1a37ad8..d177345 100644
>> --- a/sheep/gateway.c
>> +++ b/sheep/gateway.c
>> @@ -164,7 +164,9 @@ again:
>>
>>                 panic("%m");
>>         } else if (pollret == 0) {
>> -               sd_eprintf("poll timeout %d", wi->nr_sent);
>> +               sd_eprintf("poll timeout %d, the disks of some nodes or "
>> +                          "network is busy. Going to poll-wait again",
>> +                          wi->nr_sent);
>>                 /*
>>                  * If IO NIC is down, epoch isn't incremented, so we can't retry
>>                  * for ever.
> 
> This seems not a good place to print "Going to poll-wait again". I
> guess it should be placed just before
> if (sheep_need_retry(req->rq.epoch) && repeat) {
> 			repeat--;
> 	>>>		goto again;

Ah yeah, well. if not poll again, the request will be retried by
gateway, see gateway_io_done(), so else isn't useful, user are not
interested in it. We print poll timeout just as a suggestion that disks
or network is busy, user might enlarge network bandwidth or add more
nodes to share disk IOs.

Thanks,
Yuan




More information about the sheepdog mailing list