Re: [pnfs] [PATCH 2/6] pnfsd: fix NFS4ERR_BADIOMODE in layoutget

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

 



Thanks!

I'm committing everything but patch 6/6 for now.
Please check again the !CONFIG_PNFSD case.
I don't see any problem.

Benny

On Feb. 09, 2010, 19:42 +0200, andros@xxxxxxxxxx wrote:
> From: Andy Adamson <andros@xxxxxxxxxx>
> 
> If an invalid iomode, or an iomode of LAYOUTIOMODE4_ANY is specified, the
> metadata server MUST return NFS4ERR_BADIOMODE.
> 
> Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
> ---
>  fs/nfsd/nfs4proc.c |   11 ++---------
>  1 files changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index 769628f..575e1b6 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -1114,21 +1114,14 @@ nfsd4_layoutget(struct svc_rqst *rqstp,
>  	if (status)
>  		goto out;
>  
> -	status = nfserr_inval;
> +	status = nfserr_badiomode;
>  	if (lgp->lg_seg.iomode != IOMODE_READ &&
> -	    lgp->lg_seg.iomode != IOMODE_RW &&
> -	    lgp->lg_seg.iomode != IOMODE_ANY) {
> +	    lgp->lg_seg.iomode != IOMODE_RW) {
>  		dprintk("pNFS %s: invalid iomode %d\n", __func__,
>  			lgp->lg_seg.iomode);
>  		goto out;
>  	}
>  
> -	status = nfserr_badiomode;
> -	if (lgp->lg_seg.iomode == IOMODE_ANY) {
> -		dprintk("pNFS %s: IOMODE_ANY is not allowed\n", __func__);
> -		goto out;
> -	}
> -
>  	/* Set up arguments so layout can be retrieved at encode time */
>  	lgp->lg_fhp = current_fh;
>  	copy_clientid((clientid_t *)&lgp->lg_seg.clientid, cstate->session);
--
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