Re: [PATCH 3/8] NFS: Introduce nfs4_proc_get_mig_status()

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

 



On Thu, 2011-03-10 at 12:29 -0500, Chuck Lever wrote: 
> @@ -5915,6 +5962,37 @@ out:
>  	return status;
>  }
>  
> +/*
> + * Decode migration status probe
> + */
> +static int nfs4_xdr_dec_get_mig_status(struct rpc_rqst *req,
> +				       struct xdr_stream *xdr,
> +				       struct nfs4_fs_locations_res *res)
> +{
> +	struct compound_hdr hdr;
> +	int status;
> +
> +	status = decode_compound_hdr(xdr, &hdr);
> +	if (status)
> +		goto out;
> +	status = decode_sequence(xdr, &res->seq_res, req);
> +	if (status)
> +		goto out;
> +	status = decode_putfh(xdr);
> +	if (status)
> +		goto out;
> +	xdr_enter_page(xdr, PAGE_SIZE);
> +	status = decode_getfattr(xdr, &res->fs_locations->fattr,
> +				 res->fs_locations->server,
> +				 !RPC_IS_ASYNC(req->rq_task));
> +	if (status)
> +		goto out;
> +	if (res->renew)
> +		status = decode_renew(xdr);
> +out:
> +	return status;
> +}
> +
>  #if defined(CONFIG_NFS_V4_1)
>  /*
>   * Decode EXCHANGE_ID response
> @@ -6255,6 +6333,7 @@ struct rpc_procinfo	nfs4_procedures[] = {
>  	PROC(GETACL,		enc_getacl,		dec_getacl),
>  	PROC(SETACL,		enc_setacl,		dec_setacl),
>  	PROC(FS_LOCATIONS,	enc_fs_locations,	dec_fs_locations),
> +	PROC(GET_MIG_STATUS,	enc_get_mig_status,	dec_get_mig_status)

Yet more trouble for nfsstat...

> ,
>  	PROC(RELEASE_LOCKOWNER,	enc_release_lockowner,	dec_release_lockowner),
>  #if defined(CONFIG_NFS_V4_1)
>  	PROC(EXCHANGE_ID,	enc_exchange_id,	dec_exchange_id),

So looking at what you are doing in GET_MIG_STATUS, it appears to me
that

1) We don't need it for NFSv4.1: the existing fs_locations request just
works for that.
2) The only new thing in NFSv4.0 is the renew operation...

So how about if we just modify the existing fs_locations call to append
a RENEW request if/when we supply a clientid?

Cheers
  Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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