* posix record locking?
@ 2003-11-24 21:29 moiz kohari
2003-11-26 0:50 ` Trond Myklebust
0 siblings, 1 reply; 2+ messages in thread
From: moiz kohari @ 2003-11-24 21:29 UTC (permalink / raw)
To: nfs
Hi,
I am looking at posix record locking with nfs and I have a couple of
questions:
1. The fcntl_setlk() calls nfs_lock() (towards the end of fcntl_setlk by
calling filp->f_op->lock), fcntl_setlk() then calls posix_lock_file()
(where all the vfs magic happens for file locks). If nfs_lock() returns
successful (server has granted the lock) but the subsequent
posix_lock_file() fails (due to deadlock, conflict or low memory), we
never go back to the server to clean up this lock. Is this a problem or
am I missing something?
2. nfs_lock() calls nlmclnt_proc() after we pick up the kernel lock
(lock_kernel()). The nlmclnt_proc() goes on to call:
nlmclnt_lock()
nlmclnt_call()
rpc...
Is this OK? Are we going over the wire while holding the kernel lock?
Thanks for your help and please cc my email on any responses.
Best Regards,
Moiz
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: posix record locking?
2003-11-24 21:29 posix record locking? moiz kohari
@ 2003-11-26 0:50 ` Trond Myklebust
0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2003-11-26 0:50 UTC (permalink / raw)
To: moiz_kohari; +Cc: NFS maillist
>>>>> " " == moiz kohari <moiz_kohari@yahoo.com> writes:
> Hi, I am looking at posix record locking with nfs and I have a
> couple of questions:
> 1. The fcntl_setlk() calls nfs_lock() (towards the end of fcntl_setlk
> by calling filp->f_op->lock), fcntl_setlk() then calls
> posix_lock_file() (where all the vfs magic happens for file
> locks). If nfs_lock() returns successful (server has
> granted the lock) but the subsequent posix_lock_file() fails
> (due to deadlock, conflict or low memory), we never go back
> to the server to clean up this lock. Is this a problem or
> am I missing something?
Low memory is a problem, but how are you going to solve that (RPC
calls require memory too)?
As for the rest: why would the VFS tell us we're
deadlocked/conflicting if the server says we aren't? That would
clearly be a bug.
> 2. nfs_lock() calls nlmclnt_proc() after we pick up the kernel lock
> (lock_kernel()). The nlmclnt_proc() goes on to call:
> nlmclnt_lock() nlmclnt_call() rpc...
> Is this OK? Are we going over the wire while holding the
> kernel lock?
Yes. The BKL is unique as far as spinlocks go in that it allows this
sort of thing.
Cheers,
Trond
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-26 0:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-24 21:29 posix record locking? moiz kohari
2003-11-26 0:50 ` Trond Myklebust
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox