From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>
Cc: Jeff Layton <jlayton@redhat.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: NFSd state: nfs4_lock_state() and nfs4_lock_state()
Date: Fri, 23 Nov 2012 15:31:11 +0400 [thread overview]
Message-ID: <50AF5E7F.2010006@parallels.com> (raw)
In-Reply-To: <20121119124618.GA30084@fieldses.org>
19.11.2012 16:46, bfields@fieldses.org пишет:
> On Mon, Nov 19, 2012 at 12:39:23PM +0400, Stanislav Kinsbursky wrote:
>> 16.11.2012 20:58, bfields@fieldses.org пишет:
>>>
>>> A patch follows: note it's a two-line patch, with 20 lines of changelog
>>> showing that I looked at what state might be shared by other threads and
>>> explaining why I think this is safe.
>>>
>>
>> Acked-by: Stanislav Kinsburskiy <skinsbursky@parallels.com>
>>
>>> I think that's what we need to do: little patches that remove it from
>>> one or another part of the code with careful explanation of why it
>>> works.
>>>
>>
>> Yes, thanks. I'll also try to simplify nfsd_open() by little patches.
>> In general it looks like client_mutex protect two different things:
>> open owner state (which is containerised already, actually) and
>> files access.
>> So, probably, this client mutex have to be converted into two:
>> per-net one, which protects open owner state, and static one, which
>> protects files operations.
>> What do you think about it?
>
> That sounds right.
>
Looked into the code, and few more questions raised.
So, currently, this mutex protects different NFS4 state structures and VFS file operations (like open, read, write, etc.).
I would like this mutex to be converted into per-net one. Since NFS4 state structures are per-net already (with my previous patch set), the only thing left is
VFS operations.
But do we really need to protect them somehow from concurrent access?
I.e. do we have some RPCs, which does more that one file manipulation, but this manipulations sequence have to be "atomic" in NFSd terms?
--
Best regards,
Stanislav Kinsbursky
next prev parent reply other threads:[~2012-11-23 11:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 11:25 NFSd state: nfs4_lock_state() and nfs4_lock_state() Stanislav Kinsbursky
2012-11-16 16:58 ` bfields
2012-11-19 8:39 ` Stanislav Kinsbursky
2012-11-19 12:46 ` bfields
2012-11-23 11:31 ` Stanislav Kinsbursky [this message]
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=50AF5E7F.2010006@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).