Re: [PATCH Version 1 11/11] NFSv4.1 de reference a disconnected data server client record

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2012-03-15 at 14:40 -0400, andros@xxxxxxxxxx wrote:
> From: Andy Adamson <andros@xxxxxxxxxx>
> 
> When the last DS io is processed, the data server client record will be
> freed.
> 
> Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
> ---
>  fs/nfs/nfs4filelayout.c    |    4 ++++
>  fs/nfs/nfs4filelayout.h    |    1 +
>  fs/nfs/nfs4filelayoutdev.c |   17 +++++++++++++++++
>  3 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
> index 4c846cb..28b71bf 100644
> --- a/fs/nfs/nfs4filelayout.c
> +++ b/fs/nfs/nfs4filelayout.c
> @@ -209,10 +209,12 @@ static int filelayout_read_done_cb(struct rpc_task *task,
>  			reset, data->ds_clp, data->ds_clp->cl_session);
>  
>  		if (test_bit(NFS4_RESET_TO_MDS, &reset)) {
> +			struct nfs_client *clp = data->ds_clp;
>  			filelayout_reset_read(task, data);
>  			if (test_bit(NFS4_RESET_DEVICEID, &reset)) {
>  				filelayout_mark_devid_invalid(devid);
>  				rpc_drain_queue(&tbl->slot_tbl_waitq);
> +				nfs4_ds_disconnect(clp);
>  			}
>  		}
>  		rpc_restart_call_prepare(task);
> @@ -310,10 +312,12 @@ static int filelayout_write_done_cb(struct rpc_task *task,
>  			reset, data->ds_clp, data->ds_clp->cl_session);
>  
>  		if (test_bit(NFS4_RESET_TO_MDS, &reset)) {
> +			struct nfs_client *clp = data->ds_clp;
>  			filelayout_reset_write(task, data);
>  			if (test_bit(NFS4_RESET_DEVICEID, &reset)) {
>  				filelayout_mark_devid_invalid(devid);
>  				rpc_drain_queue(&tbl->slot_tbl_waitq);
> +				nfs4_ds_disconnect(clp);

What guarantees at this point that all the RPC calls have terminated?


-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux