From patchwork Wed May 28 21:08:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Bruce Fields" X-Patchwork-Id: 4257391 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C136E9F358 for ; Wed, 28 May 2014 21:09:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC10C2015E for ; Wed, 28 May 2014 21:09:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63CF320303 for ; Wed, 28 May 2014 21:09:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932348AbaE1VJ2 (ORCPT ); Wed, 28 May 2014 17:09:28 -0400 Received: from fieldses.org ([174.143.236.118]:43343 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753019AbaE1VJF (ORCPT ); Wed, 28 May 2014 17:09:05 -0400 Received: from bfields by fieldses.org with local (Exim 4.76) (envelope-from ) id 1Wpl5n-0007TJ-Hf; Wed, 28 May 2014 17:08:59 -0400 Date: Wed, 28 May 2014 17:08:59 -0400 To: "J. Bruce Fields" Cc: Christoph Hellwig , linux-nfs@vger.kernel.org Subject: Re: [PATCH 41/52] nfsd4: turn off zero-copy-read in exotic cases Message-ID: <20140528210858.GF22210@fieldses.org> References: <1400787148-25941-1-git-send-email-bfields@redhat.com> <1400787148-25941-42-git-send-email-bfields@redhat.com> <20140528080945.GA6797@infradead.org> <20140528140151.GB13012@pad.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140528140151.GB13012@pad.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) From: "J. Bruce Fields" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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);