diff mbox

nfs: do not initialize back channel with DS

Message ID 1423501065-14320-1-git-send-email-tigran.mkrtchyan@desy.de (mailing list archive)
State New, archived
Headers show

Commit Message

Mkrtchyan, Tigran Feb. 9, 2015, 4:57 p.m. UTC
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
 fs/nfs/nfs4proc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Trond Myklebust Feb. 9, 2015, 5:38 p.m. UTC | #1
Hi Tigran,

On Mon, Feb 9, 2015 at 11:57 AM, Tigran Mkrtchyan
<tigran.mkrtchyan@desy.de> wrote:
> Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> ---
>  fs/nfs/nfs4proc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 2e7c9f7..7f9674d 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -7236,9 +7236,12 @@ static int _nfs4_proc_create_session(struct nfs_client *clp,
>                 .rpc_cred = cred,
>         };
>         int status;
> +       int flags = SESSION4_PERSIST;
>
>         nfs4_init_channel_attrs(&args);
> -       args.flags = (SESSION4_PERSIST | SESSION4_BACK_CHAN);
> +       if (!is_ds_only_client(clp))
> +               flags |= SESSION4_BACK_CHAN;
> +       args.flags = flags;
>
>         status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
>         trace_nfs4_create_session(clp, status);

Why is this useful? If the server doesn't want to create a back
channel, then it just clears that flag in the csr_flags field in the
reply.

Cheers
  Trond
Mkrtchyan, Tigran Feb. 9, 2015, 6:37 p.m. UTC | #2
----- Original Message -----
> From: "Trond Myklebust" <trond.myklebust@primarydata.com>
> To: "Tigran Mkrtchyan" <tigran.mkrtchyan@desy.de>
> Cc: "Linux NFS Mailing List" <linux-nfs@vger.kernel.org>
> Sent: Monday, February 9, 2015 6:38:35 PM
> Subject: Re: [PATCH] nfs: do not initialize back channel with DS

> Hi Tigran,
> 

Hi Trond,

> On Mon, Feb 9, 2015 at 11:57 AM, Tigran Mkrtchyan
> <tigran.mkrtchyan@desy.de> wrote:
>> Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
>> ---
>>  fs/nfs/nfs4proc.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
>> index 2e7c9f7..7f9674d 100644
>> --- a/fs/nfs/nfs4proc.c
>> +++ b/fs/nfs/nfs4proc.c
>> @@ -7236,9 +7236,12 @@ static int _nfs4_proc_create_session(struct nfs_client
>> *clp,
>>                 .rpc_cred = cred,
>>         };
>>         int status;
>> +       int flags = SESSION4_PERSIST;
>>
>>         nfs4_init_channel_attrs(&args);
>> -       args.flags = (SESSION4_PERSIST | SESSION4_BACK_CHAN);
>> +       if (!is_ds_only_client(clp))
>> +               flags |= SESSION4_BACK_CHAN;
>> +       args.flags = flags;
>>
>>         status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
>>         trace_nfs4_create_session(clp, status);
> 
> Why is this useful? If the server doesn't want to create a back
> channel, then it just clears that flag in the csr_flags field in the
> reply.

You are right, there is no much benefit on the server side. The assumption was
that client allocates some resources (request queue, reply cache) associated with
the back channel.

If it's not the case, then just ignore this change.

Tigran.

> 
> Cheers
>  Trond
> --
> Trond Myklebust
> Linux NFS client maintainer, PrimaryData
> trond.myklebust@primarydata.com
> --
> 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
--
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
diff mbox

Patch

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 2e7c9f7..7f9674d 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -7236,9 +7236,12 @@  static int _nfs4_proc_create_session(struct nfs_client *clp,
 		.rpc_cred = cred,
 	};
 	int status;
+	int flags = SESSION4_PERSIST;
 
 	nfs4_init_channel_attrs(&args);
-	args.flags = (SESSION4_PERSIST | SESSION4_BACK_CHAN);
+	if (!is_ds_only_client(clp))
+		flags |= SESSION4_BACK_CHAN;
+	args.flags = flags;
 
 	status = rpc_call_sync(session->clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
 	trace_nfs4_create_session(clp, status);