Re: [PATCH 2/2] mount: take history into account when assessing if an error is permanent.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 02 2016, Steve Dickson wrote:
>>  static int nfs_is_permanent_error(int error)
>>  {
>> +	static int prev_error;
>> +	static int rpt_cnt;
>> +
>> +	if (error == prev_error)
>> +		rpt_cnt += 1;
>> +	else
>> +		rpt_cnt = 1;
>> +	prev_error = error;
>> +
>>  	switch (error) {
>>  	case ESTALE:
>> -	case ETIMEDOUT:
>> +	case EOPNOTSUPP:	/* aka RPC_PROGNOTREGISTERED */
>> +		/* If two in a row, assume permanent */
>> +		return rpt_cnt >= 3;
> This looks good... very clean... and now the time
> out is control by the -o retry setting... Perfect!
>
>>  	case ECONNREFUSED:
>> +		return rpt_cnt >= 5;
> My only question is why mess with this? Over the years 
> we've always time out after 2 mins (the default) and now 
> we are bring that down to 15 secs? I'm think that might
> be a bit short... I seems like we might be fixing something
> that is not broken... 

Because it seemed like the "right" thing to do.  ECONNREFUSED should be
a "permanent" error, except during a small window when the server is
booting.
But following the principle "if it ain't broke, don't fix it", I guess
it should stay as a "temporary" error.  I'll resend.

>
> But again the design is very clever... nice work! 

Thanks!

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux