linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fred Isaman <iisaman@netapp.com>
To: Benny Halevy <bhalevy@panasas.com>
Cc: andros@netapp.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/3] pnfs_submit: enforce requested DS only pNFS role
Date: Thu, 7 Oct 2010 14:12:02 -0400	[thread overview]
Message-ID: <AANLkTi=sMXvPLyNepS9CqVYX1+gAVhq4uA1t8nT4LA7M@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin6MDKMEPxZR=qcH5gaF0KKpsbg12=w7u8Xm8cN@mail.gmail.com>

On Thu, Oct 7, 2010 at 2:10 PM, Fred Isaman <iisaman@netapp.com> wrote:
> On Thu, Oct 7, 2010 at 1:06 PM, Benny Halevy <bhalevy@panasas.com> wrote:
>> On 2010-10-07 15:37, andros@netapp.com wrote:
>>> From: Andy Adamson <andros@netapp.com>
>>>
>>> Signed-off-by: Andy Adamson <andros@netapp.com>
>>> ---
>>>  fs/nfs/nfs4filelayoutdev.c |    5 -----
>>>  fs/nfs/nfs4state.c         |    5 +++++
>>>  2 files changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
>>> index e0edf93..1f0ab62 100644
>>> --- a/fs/nfs/nfs4filelayoutdev.c
>>> +++ b/fs/nfs/nfs4filelayoutdev.c
>>> @@ -183,11 +183,6 @@ nfs4_pnfs_ds_create(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds)
>>>               goto out_put;
>>>       }
>>>       /*
>>> -      * Mask the (possibly) returned EXCHGID4_FLAG_USE_PNFS_MDS pNFS role
>>> -      * The is_ds_only_session depends on this.
>>> -      */
>>> -     clp->cl_exchange_flags &= ~EXCHGID4_FLAG_USE_PNFS_MDS;
>>> -     /*
>>>        * Set DS lease equal to the MDS lease, renewal is scheduled in
>>>        * create_session
>>>        */
>>> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
>>> index 91584ad..e2fc175 100644
>>> --- a/fs/nfs/nfs4state.c
>>> +++ b/fs/nfs/nfs4state.c
>>> @@ -188,6 +188,7 @@ static int nfs4_begin_drain_session(struct nfs_client *clp)
>>>  int nfs41_init_clientid(struct nfs_client *clp, struct rpc_cred *cred)
>>>  {
>>>       int status;
>>> +     u32 req_exchange_flags = clp->cl_exchange_flags;
>>>
>>>       nfs4_begin_drain_session(clp);
>>>       status = nfs4_proc_exchange_id(clp, cred);
>>> @@ -196,6 +197,10 @@ int nfs41_init_clientid(struct nfs_client *clp, struct rpc_cred *cred)
>>>       status = nfs4_proc_create_session(clp);
>>>       if (status != 0)
>>>               goto out;
>>> +     if (is_ds_only_session(req_exchange_flags))
>>> +             /* Mask the (possibly) returned MDS and non-pNFS roles */
>>
>> This comment does not really add anything substantial that the code doesn't tell you :)
>>
>>> +             clp->cl_exchange_flags &=
>>> +                  ~(EXCHGID4_FLAG_USE_PNFS_MDS | EXCHGID4_FLAG_USE_NON_PNFS);
>>
>> I'm not why you want to mask out EXCHGID4_FLAG_USE_NON_PNFS.
>> If the server is not a DS why not just return an error?
>
> We *know* _USE_PNFS_DS is set.  We just want to mask out
> _USE_NON_PNFS, which  would indicate it is also a 4.0 server.
>

Oops...we *know* _PNFS_DS is set in req_exchange_flags.  As you point
out, we would like to know it is in the reply.

Fred

> Fred
>
>>
>> Benny
>>
>>>       nfs41_setup_state_renewal(clp);
>>>       nfs_mark_client_ready(clp, NFS_CS_READY);
>>>  out:
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

      reply	other threads:[~2010-10-07 18:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 19:37 [PATCH 1/3] pnfs_submit: move layout segment valid test andros
2010-10-07 18:52 ` Benny Halevy
2010-10-07 19:17   ` [PATCH 1/1] SQUASHME: pnfs-submit: do not get_lseg in pnfs_has_layout Benny Halevy
2010-10-07 19:17   ` [PATCH 2/2] SQUASHME: pnfs: get_lseg in nfs4_layoutget_prepare rather than " Benny Halevy
2010-10-07 19:28   ` [PATCH 1/3] pnfs_submit: move layout segment valid test William A. (Andy) Adamson
2010-10-07 19:37 ` [PATCH 2/3] pnfs_submit: fix deadlock in pnfs_clear_lseg_list andros
2010-10-07 19:37   ` [PATCH 3/3] pnfs_submit: enforce requested DS only pNFS role andros
2010-10-07 17:06     ` Benny Halevy
2010-10-07 18:08       ` Benny Halevy
2010-10-07 18:41         ` Benny Halevy
2010-10-07 19:23           ` Benny Halevy
2010-10-07 18:10       ` Fred Isaman
2010-10-07 18:12         ` Fred Isaman [this message]

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='AANLkTi=sMXvPLyNepS9CqVYX1+gAVhq4uA1t8nT4LA7M@mail.gmail.com' \
    --to=iisaman@netapp.com \
    --cc=andros@netapp.com \
    --cc=bhalevy@panasas.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).