Re: [PATCH] NFS: move pnfs layouts to nfs_server structure

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

 



On Wed, 2011-04-27 at 12:44 -0400, Weston Andros Adamson wrote:
> Layouts should be tracked per FSID (aka superblock, aka struct nfs_server)
> instead of per struct nfs_client, which may have multiple FSIDs associated
> with it.
> 
> Signed-off-by: Weston Andros Adamson <dros@xxxxxxxxxx>
> ---
>  fs/nfs/callback_proc.c    |   60 +++++++++++++++++++++++++++-----------------
>  fs/nfs/client.c           |    6 ++--
>  fs/nfs/pnfs.c             |   13 +++++++--
>  include/linux/nfs_fs_sb.h |    2 +-
>  4 files changed, 51 insertions(+), 30 deletions(-)
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index 139be96..f72fd39 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -188,9 +188,6 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_
>  	cred = rpc_lookup_machine_cred();
>  	if (!IS_ERR(cred))
>  		clp->cl_machine_cred = cred;
> -#if defined(CONFIG_NFS_V4_1)
> -	INIT_LIST_HEAD(&clp->cl_layouts);
> -#endif
>  	nfs_fscache_get_client_cookie(clp);
>  
>  	return clp;
> @@ -1060,6 +1057,9 @@ static struct nfs_server *nfs_alloc_server(void)
>  	INIT_LIST_HEAD(&server->client_link);
>  	INIT_LIST_HEAD(&server->master_link);
>  	INIT_LIST_HEAD(&server->delegations);
> +#if defined(CONFIG_NFS_V4_1)
> +	INIT_LIST_HEAD(&server->layouts);
> +#endif

Can we please just drop the #ifdef here?

>  	atomic_set(&server->active, 0);

Otherwise it looks good to me...
-- 
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