linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>,
	Jeff Layton <jlayton@redhat.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: NFSd state: nfs4_lock_state() and nfs4_lock_state()
Date: Fri, 16 Nov 2012 15:25:34 +0400	[thread overview]
Message-ID: <50A622AE.3080809@parallels.com> (raw)

Hello, guys.
Right now I'm looking how client_mutex can be containerised.
And it looks like this mutex is too widely used. And I can't get what it 
protects exactly.

I'd like to hear your opinions about the following:
1) Why do we need to use this mutex in nfsd4_load_reboot_recovery_data()? This 
function is called only once on NFS server start before launching kthreads.

2) Look like using of this mutex can be easely moved out from read, write and 
setattr functions in nfs4proc.c to nfs4_preprocess_stateid_op() in nfs4state.c. 
It it also could be removed from nfs4_open(), then nfs4_lock_state() and 
nfs4_lock_state() can become static.

So the question is: why this mutex covers that much different code in 
nfsd4_open() call?

-- 
Best regards,
Stanislav Kinsbursky

             reply	other threads:[~2012-11-16 11:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 11:25 Stanislav Kinsbursky [this message]
2012-11-16 16:58 ` NFSd state: nfs4_lock_state() and nfs4_lock_state() bfields
2012-11-19  8:39   ` Stanislav Kinsbursky
2012-11-19 12:46     ` bfields
2012-11-23 11:31       ` Stanislav Kinsbursky
2012-11-26 22:36         ` bfields
2012-11-27  7:54           ` Stanislav Kinsbursky
2012-11-27 22:09             ` bfields

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=50A622AE.3080809@parallels.com \
    --to=skinsbursky@parallels.com \
    --cc=bfields@fieldses.org \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).