[NFS] Missing handling for NFS4ERR_OLD_STATEID in nfs4_handle_exception?

Jeff Layton jlayton at poochiereds.net
Thu Apr 12 13:51:16 EDT 2007


Frank Filz wrote:
> On Thu, 2007-04-12 at 07:59 -0400, Jeff Layton wrote:
>> This looks pretty much correct to me as-is. If we set ret=0 on 
>> -NFS4ERR_OLD_STATEID, then the caller won't get back an error code. This 
>> makes an assumption that every caller of nfs4_handle_exception is 
>> looping based on exception->retry. I'm not sure if that's a safe 
>> assumption. A better idea *might* be to fix up nfs4_map_errors not to 
>> throw the warning for some errors < -1000, but still return an error.
> 
> nfs4_map_errors should warn about errors, because it's a last defense
> against leaking NFS4 error numbers to the rest of the kernel (that
> doesn't recognize them). So before calling nfs4_map_errors(), the error
> code should already be converted to an errno code.
> 
> It looked to me like every caller of nfs4_handle_exception() does loop
> on exception-retry(), and in that case, does not look at the error
> returned.
> 

Yes, that is the current case, but is it safe to assume that it will 
always be that way (I'm not sure, which is why I'm asking)?

I guess I'm not sure what the problem is that you're trying to solve. 
Are you simply attempting to avoid the printk's here? I'm not sure if 
that would be a good thing. I'd think if we're seeing a lot of these 
errors, then having the printk's might be good for helping to identify 
the problem. If there aren't many, then the printks seem fairly harmless...

-- Jeff



More information about the NFSv4 mailing list