login
Header Space

 
 

Re: nfs: infinite loop in fcntl(F_SETLKW)

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Miklos Szeredi <miklos@...>
Cc: <neilb@...>, <akpm@...>, <linux-nfs@...>, <linux-kernel@...>, <linux-fsdevel@...>
Date: Thursday, April 10, 2008 - 5:02 pm

On Thu, 2008-04-10 at 21:51 +0200, Miklos Szeredi wrote:


Wait. There is something really weird going on here.

According to the spec, LCK_DENIED means 'the request failed' (i.e.
ENOLCK is definitely correct)

OTOH, LCK_DENIED_NOLOCKS and LCK_DENIED_GRACE_PERIOD are both temporary
failures, the first because the server had a resource problem, and the
second because the server rebooted and is in the grace period (i.e.
EAGAIN would appear to be more appropriate). See

http://www.opengroup.org/onlinepubs/9629799/chap10.htm#tagcjh_11_02_02_02

AFAICS, the correct thing to do is to fix nlm_stat_to_errno() by
swapping the return values for NLM_LCK_DENIED and
NLM_LCK_DENIED_NOLOCKS/NLM_LCK_DENIED_GRACE_PERIOD.

The problem is that there appears to be a similar confusion on the Linux
server side in nlmsvc_lock(). :-(

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
nfs: infinite loop in fcntl(F_SETLKW), Miklos Szeredi, (Thu Apr 10, 3:51 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), Trond Myklebust, (Thu Apr 10, 5:02 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), Trond Myklebust, (Thu Apr 10, 5:07 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), Trond Myklebust, (Thu Apr 10, 5:20 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), J. Bruce Fields, (Thu Apr 10, 5:54 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), Miklos Szeredi, (Sun Apr 13, 4:28 am)
Re: nfs: infinite loop in fcntl(F_SETLKW), J. Bruce Fields, (Mon Apr 14, 1:19 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), Miklos Szeredi, (Mon Apr 14, 5:15 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), J. Bruce Fields, (Tue Apr 15, 2:58 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), Miklos Szeredi, (Wed Apr 16, 12:28 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), J. Bruce Fields, (Thu Apr 17, 6:26 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), Miklos Szeredi, (Fri Apr 18, 8:47 am)
Re: nfs: infinite loop in fcntl(F_SETLKW), Miklos Szeredi, (Fri Apr 11, 3:12 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), J. Bruce Fields, (Sat Apr 12, 8:08 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), Miklos Szeredi, (Sun Apr 13, 4:13 am)
Re: nfs: infinite loop in fcntl(F_SETLKW), J. Bruce Fields, (Mon Apr 14, 1:07 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), J. Bruce Fields, (Fri Apr 11, 3:19 pm)
Re: nfs: infinite loop in fcntl(F_SETLKW), Miklos Szeredi, (Fri Apr 11, 3:22 pm)
speck-geostationary