Linux NFS development
 help / color / mirror / Atom feed
* the inode semaphore
@ 2003-02-11 17:17 Wendy Cheng
  0 siblings, 0 replies; 2+ messages in thread
From: Wendy Cheng @ 2003-02-11 17:17 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

We're working on a high availability experiment
project for our linux-based server and the nfsds hang 
from times to times. It is observed that the version 3 
procedure 12/13 (rmdir and remove) obtains an inode 
semaphore within fh_lock()/nfsd_unlink() but never 
releases it. Theoretically this inode is going to get 
released but what can prevent the following two cases 
that would end up hanging the nfsd ?

1. Due to slow network and/or system, the client re-
sends the same request but using a different xid. The 
nfsd that accepts the new request would be stuck in 
nfsd_unlink() waiting for the inode semaphore. 
2. A "create" immediately follows the "remove" for the 
same file. 

There is a flag called fh_locked but it is passed in 
from each individual nfs request (a local copy, not 
from dcache) that doesn't help. I also browse thru 
some file system's (say ext3) inode free code but 
can't find anywhere this semaphore gets released. 
We're still debugging our failover logic but if 
someone could confirm the above are indeed a bug (or 
explain why it will not happen) would be of great 
helps.

Or should this semaphore get "zero"ed out by file 
system (say, ext3) ? 

We're on 2.4.19 kernel.

Thanks for the help.

Wendy

[-- Attachment #2: Type: text/html, Size: 2019 bytes --]

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

* Re: the inode semaphore
@ 2003-02-12 18:45 Wendy Cheng
  0 siblings, 0 replies; 2+ messages in thread
From: Wendy Cheng @ 2003-02-12 18:45 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]

Adding fh_put() to release the semaphore after
nfsd_unlink() within nfs3proc.c does make the
hang disappear. Hope we can see this get fixed
in the future code.

wendy
  ----- Original Message ----- 
  From: Wendy Cheng 
  To: nfs@lists.sourceforge.net 
  Sent: Tuesday, February 11, 2003 12:17 PM
  Subject: the inode semaphore


  We're working on a high availability experiment
  project for our linux-based server and the nfsds hang 
  from times to times. It is observed that the version 3 
  procedure 12/13 (rmdir and remove) obtains an inode 
  semaphore within fh_lock()/nfsd_unlink() but never 
  releases it. Theoretically this inode is going to get 
  released but what can prevent the following two cases 
  that would end up hanging the nfsd ?

  1. Due to slow network and/or system, the client re-
  sends the same request but using a different xid. The 
  nfsd that accepts the new request would be stuck in 
  nfsd_unlink() waiting for the inode semaphore. 
  2. A "create" immediately follows the "remove" for the 
  same file. 

  There is a flag called fh_locked but it is passed in 
  from each individual nfs request (a local copy, not 
  from dcache) that doesn't help. I also browse thru 
  some file system's (say ext3) inode free code but 
  can't find anywhere this semaphore gets released. 
  We're still debugging our failover logic but if 
  someone could confirm the above are indeed a bug (or 
  explain why it will not happen) would be of great 
  helps.

  Or should this semaphore get "zero"ed out by file 
  system (say, ext3) ? 

  We're on 2.4.19 kernel.

  Thanks for the help.

  Wendy

[-- Attachment #2: Type: text/html, Size: 3322 bytes --]

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

end of thread, other threads:[~2003-02-12 18:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-12 18:45 the inode semaphore Wendy Cheng
  -- strict thread matches above, loose matches on Subject: below --
2003-02-11 17:17 Wendy Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox