Re: [PATCH] nfsd: export proper maximum file size to the client

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

 



On Thu, Nov 14, 2013 at 05:50:10AM -0800, Christoph Hellwig wrote:
> I noticed that we export a way to high value for the maxfilesize
> attribute when debugging a client issue.  The issue didn't turn
> out to be related to it, but I think we should export it, so that
> clients can limit what write sizes they accept before hitting
> the server.

Thanks, applying.--b.

>     
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 9423522..a3c9347 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -2488,7 +2488,7 @@ out_acl:
>  	if (bmval0 & FATTR4_WORD0_MAXFILESIZE) {
>  		if ((buflen -= 8) < 0)
>  			goto out_resource;
> -		WRITE64(~(u64)0);
> +		WRITE64(exp->ex_path.mnt->mnt_sb->s_maxbytes);
>  	}
>  	if (bmval0 & FATTR4_WORD0_MAXLINK) {
>  		if ((buflen -= 4) < 0)
--
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