From patchwork Mon Mar 10 15:38:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Derr X-Patchwork-Id: 3804131 X-Patchwork-Delegate: ericvh@gmail.com Return-Path: X-Original-To: patchwork-v9fs-devel@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 CA5A39F1CD for ; Mon, 10 Mar 2014 16:11:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 039EF202A1 for ; Mon, 10 Mar 2014 16:11:43 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FFF6201ED for ; Mon, 10 Mar 2014 16:11:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WN2nQ-0000kn-It; Mon, 10 Mar 2014 16:11:20 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WN2nP-0000kY-6f for v9fs-developer@lists.sourceforge.net; Mon, 10 Mar 2014 16:11:19 +0000 X-ACL-Warn: Received: from ecfrec.frec.bull.fr ([129.183.4.8]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1WN2nJ-0002NW-Ew for v9fs-developer@lists.sourceforge.net; Mon, 10 Mar 2014 16:11:19 +0000 Received: from atlas.frec.bull.fr (atlas.frec.bull.fr [129.183.91.13]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id E24216F59E; Mon, 10 Mar 2014 16:39:11 +0100 (CET) Received: from atlas.frec.bull.fr (localhost [127.0.0.1]) by atlas.frec.bull.fr (Postfix) with ESMTP id 32D7FA1851; Mon, 10 Mar 2014 16:39:10 +0100 (CET) Received: (from derr@localhost) by atlas.frec.bull.fr (8.14.4/8.14.4/Submit) id s2AFdAqT015180; Mon, 10 Mar 2014 16:39:10 +0100 From: Simon Derr To: v9fs-developer@lists.sourceforge.net Date: Mon, 10 Mar 2014 16:38:50 +0100 Message-Id: <1394465932-11520-3-git-send-email-simon.derr@bull.net> X-Mailer: git-send-email 1.7.10.1 In-Reply-To: <1394465932-11520-1-git-send-email-simon.derr@bull.net> References: <1394465932-11520-1-git-send-email-simon.derr@bull.net> X-Spam-Score: -0.0 (/) X-Headers-End: 1WN2nJ-0002NW-Ew Subject: [V9fs-developer] [PATCH 2/4] 9pnet_rdma: update request status during send X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 This will be needed by the flush logic. Signed-off-by: Simon Derr --- net/9p/trans_rdma.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c index f127ae5..b374c57 100644 --- a/net/9p/trans_rdma.c +++ b/net/9p/trans_rdma.c @@ -510,6 +510,11 @@ dont_need_post_recv: goto send_error; } + /* Mark request as `sent' *before* we actually send it, + * because doing if after could erase the REQ_STATUS_RCVD + * status in case of a very fast reply. + */ + req->status = REQ_STATUS_SENT; err = ib_post_send(rdma->qp, &wr, &bad_wr); if (err) goto send_error; @@ -519,6 +524,7 @@ dont_need_post_recv: /* Handle errors that happened during or while preparing the send: */ send_error: + req->status = REQ_STATUS_ERROR; kfree(c); p9_debug(P9_DEBUG_ERROR, "Error %d in rdma_request()\n", err);