All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: nfs@lists.sourceforge.net
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Subject: Re: Killed process on NFS client can result in lost lock on server
Date: 30 Sep 2003 16:52:11 -0400	[thread overview]
Message-ID: <shspthi0zk4.fsf@charged.uio.no> (raw)
In-Reply-To: <87r81y11og.fsf@ceramic.fifi.org>

>>>>> " " == Philippe Troin <phil@fifi.org> writes:

     > While trying to make this test program, I've noticed that the
     > problem only occurs while I/O is done on the locked file. Note
     > the write() in a while loop in the test program. I could not
     > get the bad behavior to show up if no I/O is going on.

Yep. It's the same problem as in nlmclnt_proc(): we have to clean up
all locks come rain or shine when the process exits.

Cheers,
  Trond

--- linux-2.4.23-pre5/fs/nfs/file.c.orig	2003-07-09 14:10:21.000000000 -0400
+++ linux-2.4.23-pre5/fs/nfs/file.c	2003-09-30 16:48:52.000000000 -0400
@@ -293,7 +293,8 @@
 	status2 = filemap_fdatawait(inode->i_mapping);
 	if (status2 && !status)
 		status = status2;
-	if (status < 0)
+	/* Note: Ignore status if we're cleaning up locks on process exit */
+	if (status < 0 && !(current->flags & PF_EXITING))
 		return status;
 
 	lock_kernel();




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2003-09-30 20:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-30 20:06 Killed process on NFS client can result in lost lock on server Philippe Troin
2003-09-30 20:52 ` Trond Myklebust [this message]
2003-09-30 22:35   ` Philippe Troin
2003-09-30 22:36     ` Trond Myklebust
2003-10-01  6:38     ` Philippe Troin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=shspthi0zk4.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.