linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] NFS remove duplicate clientid in nfs_client
@ 2011-02-24 10:11 andros
  2011-02-24 10:11 ` [PATCH 2/4] SQUASHME: NFSv4.1: DS only check andros
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: andros @ 2011-02-24 10:11 UTC (permalink / raw)
  To: iisaman; +Cc: linux-nfs, Andy Adamson

From: Andy Adamson <andros@netapp.com>

Signed-off-by: Andy Adamson <andros@netapp.com>
---
 fs/nfs/nfs4xdr.c          |    4 ++--
 include/linux/nfs_fs_sb.h |    2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index c35880c..0f2dcfb 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1664,7 +1664,7 @@ static void encode_create_session(struct xdr_stream *xdr,
 
 	p = reserve_space(xdr, 20 + 2*28 + 20 + len + 12);
 	*p++ = cpu_to_be32(OP_CREATE_SESSION);
-	p = xdr_encode_hyper(p, clp->cl_ex_clid);
+	p = xdr_encode_hyper(p, clp->cl_clientid);
 	*p++ = cpu_to_be32(clp->cl_seqid);			/*Sequence id */
 	*p++ = cpu_to_be32(args->flags);			/*flags */
 
@@ -4699,7 +4699,7 @@ static int decode_exchange_id(struct xdr_stream *xdr,
 	p = xdr_inline_decode(xdr, 8);
 	if (unlikely(!p))
 		goto out_overflow;
-	xdr_decode_hyper(p, &clp->cl_ex_clid);
+	xdr_decode_hyper(p, &clp->cl_clientid);
 	p = xdr_inline_decode(xdr, 12);
 	if (unlikely(!p))
 		goto out_overflow;
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 7f71698..e52f010 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -73,8 +73,6 @@ struct nfs_client {
 #endif /* CONFIG_NFS_V4 */
 
 #ifdef CONFIG_NFS_V4_1
-	/* clientid returned from EXCHANGE_ID, used by session operations */
-	u64			cl_ex_clid;
 	/* The sequence id to use for the next CREATE_SESSION */
 	u32			cl_seqid;
 	/* The flags used for obtaining the clientid during EXCHANGE_ID */
-- 
1.7.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] SQUASHME: NFSv4.1: DS only check
  2011-02-24 10:11 [PATCH 1/4] NFS remove duplicate clientid in nfs_client andros
@ 2011-02-24 10:11 ` andros
  2011-02-25 18:03   ` Fred Isaman
  2011-02-27 12:45   ` Benny Halevy
  2011-02-24 10:11 ` [PATCH 3/4] NFSv4.1 reclaim complete must wait for completion andros
  2011-02-24 10:11 ` [PATCH 4/4] SQUASHME put_lseg before setting pointer to NULL andros
  2 siblings, 2 replies; 7+ messages in thread
From: andros @ 2011-02-24 10:11 UTC (permalink / raw)
  To: iisaman; +Cc: linux-nfs, Andy Adamson

From: Andy Adamson <andros@netapp.com>

squash into fdd1e4e137c75a69a274acc680706906c72344e1
NFSv4.1: add MDS mount DS only check

Signed-off-by: Andy Adamson <andros@netapp.com>
---
 fs/nfs/client.c    |   10 ++++------
 fs/nfs/nfs4state.c |    2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 738f624..6dd50ac 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1400,12 +1400,6 @@ static int nfs4_set_client(struct nfs_server *server,
 		goto error;
 	}
 
-	/* Cannot mount a DS only server */
-	if (is_ds_only_client(clp)) {
-		error = -ENODEV;
-		goto error;
-	}
-
 	/*
 	 * Query for the lease time on clientid setup or renewal
 	 *
@@ -1500,6 +1494,10 @@ static int nfs4_server_common_setup(struct nfs_server *server,
 	BUG_ON(!server->nfs_client->rpc_ops);
 	BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
 
+	/* data servers support only a subset of NFSv4.1 */
+	if (is_ds_only_client(server->nfs_client))
+		return -EPROTONOSUPPORT;
+
 	fattr = nfs_alloc_fattr();
 	if (fattr == NULL)
 		return -ENOMEM;
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 6da026a..0021f40 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -153,7 +153,7 @@ static int nfs41_setup_state_renewal(struct nfs_client *clp)
 	int status;
 	struct nfs_fsinfo fsinfo;
 
-	if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state)) {
+	if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state))
 		nfs4_schedule_state_renewal(clp);
 		return 0;
 	}
-- 
1.7.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] NFSv4.1 reclaim complete must wait for completion
  2011-02-24 10:11 [PATCH 1/4] NFS remove duplicate clientid in nfs_client andros
  2011-02-24 10:11 ` [PATCH 2/4] SQUASHME: NFSv4.1: DS only check andros
@ 2011-02-24 10:11 ` andros
  2011-02-27 12:44   ` Benny Halevy
  2011-02-24 10:11 ` [PATCH 4/4] SQUASHME put_lseg before setting pointer to NULL andros
  2 siblings, 1 reply; 7+ messages in thread
From: andros @ 2011-02-24 10:11 UTC (permalink / raw)
  To: iisaman; +Cc: linux-nfs, Andy Adamson

From: Andy Adamson <andros@netapp.com>

Signed-off-by: Andy Adamson <andros@netapp.com>
Reported-by: Trond Myklebust <trond.myklebust@netapp.com>
---
 fs/nfs/nfs4proc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 7d80e78..388817b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5385,6 +5385,9 @@ static int nfs41_proc_reclaim_complete(struct nfs_client *clp)
 		status = PTR_ERR(task);
 		goto out;
 	}
+        status = nfs4_wait_for_completion_rpc_task(task);
+        if (status == 0)
+                status = task->tk_status;
 	rpc_put_task(task);
 	return 0;
 out:
-- 
1.7.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] SQUASHME put_lseg before setting pointer to NULL
  2011-02-24 10:11 [PATCH 1/4] NFS remove duplicate clientid in nfs_client andros
  2011-02-24 10:11 ` [PATCH 2/4] SQUASHME: NFSv4.1: DS only check andros
  2011-02-24 10:11 ` [PATCH 3/4] NFSv4.1 reclaim complete must wait for completion andros
@ 2011-02-24 10:11 ` andros
  2 siblings, 0 replies; 7+ messages in thread
From: andros @ 2011-02-24 10:11 UTC (permalink / raw)
  To: iisaman; +Cc: linux-nfs, Andy Adamson

From: Andy Adamson <andros@netapp.com>

Signed-off-by: Andy Adamson <andros@netapp.com>
---
 fs/nfs/pnfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 58217dd..cbeb873 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -910,8 +910,8 @@ pnfs_try_to_write_data(struct nfs_write_data *wdata,
 
 	trypnfs = nfss->pnfs_curr_ld->write_pagelist(wdata, how);
 	if (trypnfs == PNFS_NOT_ATTEMPTED) {
-		wdata->lseg = NULL;
 		put_lseg(wdata->lseg);
+		wdata->lseg = NULL;
 	} else
 		nfs_inc_stats(inode, NFSIOS_PNFS_WRITE);
 
-- 
1.7.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] SQUASHME: NFSv4.1: DS only check
  2011-02-24 10:11 ` [PATCH 2/4] SQUASHME: NFSv4.1: DS only check andros
@ 2011-02-25 18:03   ` Fred Isaman
  2011-02-27 12:45   ` Benny Halevy
  1 sibling, 0 replies; 7+ messages in thread
From: Fred Isaman @ 2011-02-25 18:03 UTC (permalink / raw)
  To: andros; +Cc: linux-nfs


On Feb 24, 2011, at 2:11 AM, andros@netapp.com wrote:

> From: Andy Adamson <andros@netapp.com>
> 
> squash into fdd1e4e137c75a69a274acc680706906c72344e1
> NFSv4.1: add MDS mount DS only check
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
> fs/nfs/client.c    |   10 ++++------
> fs/nfs/nfs4state.c |    2 +-
> 2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index 738f624..6dd50ac 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -1400,12 +1400,6 @@ static int nfs4_set_client(struct nfs_server *server,
> 		goto error;
> 	}
> 
> -	/* Cannot mount a DS only server */
> -	if (is_ds_only_client(clp)) {
> -		error = -ENODEV;
> -		goto error;
> -	}
> -
> 	/*
> 	 * Query for the lease time on clientid setup or renewal
> 	 *
> @@ -1500,6 +1494,10 @@ static int nfs4_server_common_setup(struct nfs_server *server,
> 	BUG_ON(!server->nfs_client->rpc_ops);
> 	BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
> 
> +	/* data servers support only a subset of NFSv4.1 */
> +	if (is_ds_only_client(server->nfs_client))
> +		return -EPROTONOSUPPORT;
> +
> 	fattr = nfs_alloc_fattr();
> 	if (fattr == NULL)
> 		return -ENOMEM;
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index 6da026a..0021f40 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -153,7 +153,7 @@ static int nfs41_setup_state_renewal(struct nfs_client *clp)
> 	int status;
> 	struct nfs_fsinfo fsinfo;
> 
> -	if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state)) {
> +	if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state))
> 		nfs4_schedule_state_renewal(clp);
> 		return 0;
> 	}
> -- 

This last bit looks suspicious.  I'll fix it before adding it to my wave4-cthon branch.

Fred

> 1.7.3.1
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/4] NFSv4.1 reclaim complete must wait for completion
  2011-02-24 10:11 ` [PATCH 3/4] NFSv4.1 reclaim complete must wait for completion andros
@ 2011-02-27 12:44   ` Benny Halevy
  0 siblings, 0 replies; 7+ messages in thread
From: Benny Halevy @ 2011-02-27 12:44 UTC (permalink / raw)
  To: andros; +Cc: iisaman, linux-nfs

On 2011-02-24 02:11, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> Reported-by: Trond Myklebust <trond.myklebust@netapp.com>
> ---
>  fs/nfs/nfs4proc.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 7d80e78..388817b 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -5385,6 +5385,9 @@ static int nfs41_proc_reclaim_complete(struct nfs_client *clp)
>  		status = PTR_ERR(task);
>  		goto out;
>  	}
> +        status = nfs4_wait_for_completion_rpc_task(task);
> +        if (status == 0)
> +                status = task->tk_status;

nit: please use tabs rather than spaces to indent.

Benny

>  	rpc_put_task(task);
>  	return 0;
>  out:

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4] SQUASHME: NFSv4.1: DS only check
  2011-02-24 10:11 ` [PATCH 2/4] SQUASHME: NFSv4.1: DS only check andros
  2011-02-25 18:03   ` Fred Isaman
@ 2011-02-27 12:45   ` Benny Halevy
  1 sibling, 0 replies; 7+ messages in thread
From: Benny Halevy @ 2011-02-27 12:45 UTC (permalink / raw)
  To: andros; +Cc: iisaman, linux-nfs

On 2011-02-24 02:11, andros@netapp.com wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> squash into fdd1e4e137c75a69a274acc680706906c72344e1
> NFSv4.1: add MDS mount DS only check
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  fs/nfs/client.c    |   10 ++++------
>  fs/nfs/nfs4state.c |    2 +-
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index 738f624..6dd50ac 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -1400,12 +1400,6 @@ static int nfs4_set_client(struct nfs_server *server,
>  		goto error;
>  	}
>  
> -	/* Cannot mount a DS only server */
> -	if (is_ds_only_client(clp)) {
> -		error = -ENODEV;
> -		goto error;
> -	}
> -
>  	/*
>  	 * Query for the lease time on clientid setup or renewal
>  	 *
> @@ -1500,6 +1494,10 @@ static int nfs4_server_common_setup(struct nfs_server *server,
>  	BUG_ON(!server->nfs_client->rpc_ops);
>  	BUG_ON(!server->nfs_client->rpc_ops->file_inode_ops);
>  
> +	/* data servers support only a subset of NFSv4.1 */
> +	if (is_ds_only_client(server->nfs_client))
> +		return -EPROTONOSUPPORT;
> +
>  	fattr = nfs_alloc_fattr();
>  	if (fattr == NULL)
>  		return -ENOMEM;
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index 6da026a..0021f40 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -153,7 +153,7 @@ static int nfs41_setup_state_renewal(struct nfs_client *clp)
>  	int status;
>  	struct nfs_fsinfo fsinfo;
>  
> -	if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state)) {
> +	if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state))

eh? :)

>  		nfs4_schedule_state_renewal(clp);
>  		return 0;
>  	}

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-27 12:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24 10:11 [PATCH 1/4] NFS remove duplicate clientid in nfs_client andros
2011-02-24 10:11 ` [PATCH 2/4] SQUASHME: NFSv4.1: DS only check andros
2011-02-25 18:03   ` Fred Isaman
2011-02-27 12:45   ` Benny Halevy
2011-02-24 10:11 ` [PATCH 3/4] NFSv4.1 reclaim complete must wait for completion andros
2011-02-27 12:44   ` Benny Halevy
2011-02-24 10:11 ` [PATCH 4/4] SQUASHME put_lseg before setting pointer to NULL andros

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).