diff mbox

[41/52] nfsd4: turn off zero-copy-read in exotic cases

Message ID 20140528210858.GF22210@fieldses.org (mailing list archive)
State New, archived
Headers show

Commit Message

J. Bruce Fields May 28, 2014, 9:08 p.m. UTC
On Wed, May 28, 2014 at 10:01:52AM -0400, J. Bruce Fields wrote:
> On Wed, May 28, 2014 at 01:09:45AM -0700, Christoph Hellwig wrote:
> > On Thu, May 22, 2014 at 03:32:16PM -0400, J. Bruce Fields wrote:
> > > Later patches handle those "exotic compounds", this one just makes sure
> > > zero-copy is turned off in those cases.
> > 
> > How did you test these exotic compounds?
> 
> I have is a pynfs test that sends a compound with multiple reads in it.

But, look, it wasn't turned on in my regular tests so, surprise, I
regressed recently without noticing; I intend to fold in the below after
some more testing.

> I don't think that's pushed out to my regular pynfs tree, I'll try to do
> that today.

Still working on that.

--b.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

J. Bruce Fields June 2, 2014, 10:12 p.m. UTC | #1
On Wed, May 28, 2014 at 05:08:59PM -0400, bfields wrote:
> On Wed, May 28, 2014 at 10:01:52AM -0400, J. Bruce Fields wrote:
> > On Wed, May 28, 2014 at 01:09:45AM -0700, Christoph Hellwig wrote:
> > > On Thu, May 22, 2014 at 03:32:16PM -0400, J. Bruce Fields wrote:
> > > > Later patches handle those "exotic compounds", this one just makes sure
> > > > zero-copy is turned off in those cases.
> > > 
> > > How did you test these exotic compounds?
> > 
> > I have is a pynfs test that sends a compound with multiple reads in it.
> 
> But, look, it wasn't turned on in my regular tests so, surprise, I
> regressed recently without noticing; I intend to fold in the below after
> some more testing.
> 
> > I don't think that's pushed out to my regular pynfs tree, I'll try to do
> > that today.
> 
> Still working on that.

I've pushed out some minimal tests of the new xdr code to

	git://linux-nfs.org/~bfields/pynfs.git master

Frank, some of those might not really be appropriate for any server, I'm
not sure.

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 3f8bfb9..3976dc6 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3197,12 +3197,10 @@  nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr,
 		WARN_ON_ONCE(resp->rqstp->rq_splice_ok);
 		return nfserr_resource;
 	}
-
-	if (resp->xdr.buf->page_len) {
-		WARN_ON_ONCE(resp->rqstp->rq_splice_ok);
+	if (resp->xdr.buf->page_len && resp->rqstp->rq_splice_ok) {
+		WARN_ON_ONCE(1);
 		return nfserr_resource;
 	}
-
 	xdr_commit_encode(xdr);
 
 	maxcount = svc_max_payload(resp->rqstp);