All of lore.kernel.org
 help / color / mirror / Atom feed
* How NLM support posix threads?
@ 2017-02-10  9:21 Pankaj Singh
  2017-02-10 15:10 ` Trond Myklebust
  0 siblings, 1 reply; 7+ messages in thread
From: Pankaj Singh @ 2017-02-10  9:21 UTC (permalink / raw)
  To: linux-nfs

Hi,

I am getting a strange problem where locks are denied by NFSv3 server
even though no locks on same file where taken.

While looking at the code it seems like NLM compares a lock by using
"pid" and other options like form - to file offset, type of lock etc.
But we are interested in "pid" because other comparison can be same
for different file_locks.

 As we know posix threads use tgid as pid for all its thread hence
NFSv3 server will can get lock request from different posix thread but
with same pid. Hence NLM  will treat the locking request as they are
coming from same process. This may result in following problems

1. Different threads of same process can get lock on same file.
2. During "fl_grant" callback wrong "block" will be compared hence
this will result in lock failure even if lock is actually granted.

Is this a limitation of NLM?

-- 
Regards,
Pankaj SIngh
Phone No: 8826266889

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-16  6:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-10  9:21 How NLM support posix threads? Pankaj Singh
2017-02-10 15:10 ` Trond Myklebust
2017-02-11  6:19   ` Pankaj Singh
2017-02-11 12:50     ` Jeff Layton
2017-02-11 15:45     ` Trond Myklebust
2017-02-13 13:47       ` Pankaj Singh
2017-02-16  6:56       ` Pankaj Singh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.