From: "J. Bruce Fields" <bfields@fieldses.org>
To: Wendy Cheng <s.wendy.cheng@gmail.com>
Cc: nfs@lists.sourceforge.net,
Erik Hensema / HostingXS Internet Services
<hensema-yolSOB3tinz/D1n+0JDH9g@public.gmane.org>
Subject: Re: [NFS] Forcefully resetting a lock
Date: Tue, 22 Apr 2008 19:15:20 -0400 [thread overview]
Message-ID: <20080422231520.GI21770@fieldses.org> (raw)
In-Reply-To: <20080418181918.GB24552@fieldses.org>
On Fri, Apr 18, 2008 at 02:19:18PM -0400, bfields wrote:
> Really it should be now, though there's another week or so when we can
> submit stuff if it's in good shape.
>
> But I'm feeling bad about letting this go recently, so I'll look at the
> last couple issues and do some testing over the next few days...
OK, I changed the return value to -EIO in the case locks weren't
unlocked. (Better suggestions welcomed. I notice lockd actually BUG()s
in a similar situation elsewhere in the code, but that's probably not
right.)
I also simplified the nlm_traverse_files() change so now it's just:
@@ -241,6 +248,8 @@ nlm_traverse_files(void *data, nlm_host_match_fn_t match)
mutex_lock(&nlm_file_mutex);
for (i = 0; i < FILE_NRHASH; i++) {
hlist_for_each_entry_safe(file, pos, next, &nlm_files[i], f_list) {
+ if (is_failover_file && !is_failover_file(data, file))
+ continue;
file->f_count++;
mutex_unlock(&nlm_file_mutex);
Since the "continue" happens before we do anything at all with that
file, I believe this is safe, and avoids the need for the extra
nlm_file_inuse() call.
And I split the patch into two (unlock_ip, unlock_fs) and edited the
commit messages a little.
The only testing I've done was just connecthon tests plus a simple
manual test with unlock_filesystem (acquiring a lock from a client,
echoing path to unlock_filesystem, verifying that it's gone from
/proc/locks).
Revised patches follow....
--b.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
_______________________________________________
Please note that nfs@lists.sourceforge.net is being discontinued.
Please subscribe to linux-nfs@vger.kernel.org instead.
http://vger.kernel.org/vger-lists.html#linux-nfs
next prev parent reply other threads:[~2008-04-22 23:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-16 9:17 [NFS] Forcefully resetting a lock Erik Hensema / HostingXS Internet Services
[not found] ` <200804161117.24734.hensema-yolSOB3tinz/D1n+0JDH9g@public.gmane.org>
2008-04-16 11:44 ` Jeff Layton
2008-04-16 15:15 ` Wendy Cheng
2008-04-16 18:42 ` J. Bruce Fields
2008-04-16 19:39 ` Wendy Cheng
2008-04-17 21:52 ` J. Bruce Fields
2008-04-18 14:02 ` Wendy Cheng
2008-04-18 18:19 ` J. Bruce Fields
2008-04-22 23:15 ` J. Bruce Fields [this message]
2008-04-22 23:17 ` [NFS] [PATCH] lockd: unlock lockd locks associated with a given server ip J. Bruce Fields
2008-04-22 23:18 ` [NFS] [PATCH] lockd: unlock lockd locks held for a certain filesystem J. Bruce Fields
2008-04-23 2:57 ` Wendy Cheng
2008-04-23 7:44 ` Christoph Hellwig
2008-04-23 17:12 ` J. Bruce Fields
2008-04-23 17:52 ` Christoph Hellwig
2008-04-23 20:01 ` J. Bruce Fields
2008-04-23 20:39 ` Wendy Cheng
2008-04-23 21:02 ` J. Bruce Fields
2008-04-23 21:17 ` Wendy Cheng
2008-04-23 21:39 ` J. Bruce Fields
2008-04-23 21:44 ` Wendy Cheng
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=20080422231520.GI21770@fieldses.org \
--to=bfields@fieldses.org \
--cc=hensema-yolSOB3tinz/D1n+0JDH9g@public.gmane.org \
--cc=nfs@lists.sourceforge.net \
--cc=s.wendy.cheng@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox