From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfsd: export proper maximum file size to the client
Date: Thu, 14 Nov 2013 09:18:03 -0500 [thread overview]
Message-ID: <20131114141802.GA20733@fieldses.org> (raw)
In-Reply-To: <20131114135010.GA2869@infradead.org>
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@lst.de>
>
> 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)
prev parent reply other threads:[~2013-11-14 14:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 13:50 [PATCH] nfsd: export proper maximum file size to the client Christoph Hellwig
2013-11-14 14:18 ` J. Bruce Fields [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131114141802.GA20733@fieldses.org \
--to=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).