[pnfs] [PATCH] Set the right size for sockaddr.
Marc Eshel
eshel at almaden.ibm.com
Wed Apr 30 23:03:50 EDT 2008
nfs4_set_client() was called with length of hostname instead of
sizeof(struct sockaddr), so if you are lucky and your hostname was long
enough it worked fine but if you had a short hostname rpc_create would
hang trying to connect to the DS.
Marc.
Marc Eshel <eshel at almaden.ibm.com> wrote on 04/30/2008 07:52:57 PM:
> From: Marc Eshel <eshel at almaden.ibm.com>
>
>
> ---
>
> fs/nfs/nfs4filelayoutdev.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c
> index 59ca50a..aee5425 100644
> --- a/fs/nfs/nfs4filelayoutdev.c
> +++ b/fs/nfs/nfs4filelayoutdev.c
> @@ -240,7 +240,7 @@ nfs4_pnfs_ds_create(struct nfs_server *mds_srv,
> struct nfs4_pnfs_ds *ds)
> err = nfs4_set_client(&tmp,
> mds_srv->nfs_client->cl_hostname,
> (struct sockaddr *)&sin,
> - addrlen,
> + sizeof(struct sockaddr),
> ip_addr,
> RPC_AUTH_UNIX,
> IPPROTO_TCP,
More information about the pNFS
mailing list