From patchwork Sun Jun 5 15:43:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 849842 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p55Fi5fB024694 for ; Sun, 5 Jun 2011 15:44:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753721Ab1FEPoB (ORCPT ); Sun, 5 Jun 2011 11:44:01 -0400 Received: from 178.141.211.66.inaddr.G4.NET ([66.211.141.178]:48628 "EHLO Dobby.Home.4dicksons.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753211Ab1FEPoA (ORCPT ); Sun, 5 Jun 2011 11:44:00 -0400 Received: from tophat.home.4dicksons.org ([192.168.62.20] helo=tophat.home.4dicksons.org.home.4dicksons.org) by Dobby.Home.4dicksons.org with esmtp (Exim 4.63) (envelope-from ) id 1QTFUc-00029z-Dg; Sun, 05 Jun 2011 11:43:58 -0400 From: Steve Dickson To: Libtirpc Devel List Cc: Linux NFS Mailing List Subject: [PATCH] Do not skip records with nonblocking connections Date: Sun, 5 Jun 2011 11:43:58 -0400 Message-Id: <1307288638-32215-1-git-send-email-steved@redhat.com> X-Mailer: git-send-email 1.7.4.4 X-Spam-Score: 1.7 (+) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 05 Jun 2011 15:44:06 +0000 (UTC) With non-blocking connections, do not skip records when receiving the streams since entire value messages can be ignored which in cause the entire stream to become out of sync. For example, two mounts simultaneously send two unmaps commands. The first one is read, then the second thrown away due to skipping the record. Skipping this record will cause XDR error later in processing of the stream. Signed-off-by: Steve Dickson --- src/svc_vc.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/svc_vc.c b/src/svc_vc.c index aaaf2d7..15dac18 100644 --- a/src/svc_vc.c +++ b/src/svc_vc.c @@ -610,6 +610,11 @@ svc_vc_recv(xprt, msg) } xdrs->x_op = XDR_DECODE; + /* + * No need skip records with nonblocking connections + */ + if (cd->nonblock == FALSE) + (void)xdrrec_skiprecord(xdrs); (void)xdrrec_skiprecord(xdrs); if (xdr_callmsg(xdrs, msg)) { cd->x_id = msg->rm_xid;