From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752415AbcFTCKW (ORCPT ); Sun, 19 Jun 2016 22:10:22 -0400 Received: from linuxhacker.ru ([217.76.32.60]:55952 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752026AbcFTCJ3 (ORCPT ); Sun, 19 Jun 2016 22:09:29 -0400 From: Oleg Drokin To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Lustre Development List , Vitaly Fertman , Oleg Drokin Subject: [PATCH 09/28] staging/lustre/ptlrpc: Early Reply vs Reply MDunlink Date: Sun, 19 Jun 2016 22:07:24 -0400 Message-Id: <1466388463-1817551-10-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vitaly Fertman A race between unregister_reply & early reply. When buffers are busy for the early transfer, they cannon be unlinked by unregister_reply, so the RPC gets into UNREGISTERING state. The coming reply_in_callback for the early RPC already has unlinked flag set due to previous mdunlink attempt, but we handle it properly only for UNILNK event, whereas this is PUT in this case. Signed-off-by: Vitaly Fertman Seagate-bug-id: MRP-3323 Reviewed-by: Alexey Leonidovich Lyashkov Reviewed-by: Andriy Skulysh Tested-by: Parinay Vijayprakash Kondekar Reviewed-on: http://review.whamcloud.com/18934 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7434 Reviewed-by: Chris Horn Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ptlrpc/events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c index a243342..b1ce725 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c @@ -137,7 +137,8 @@ void reply_in_callback(lnet_event_t *ev) req->rq_early_count++; /* number received, client side */ - if (req->rq_replied) /* already got the real reply */ + /* already got the real reply or buffers are already unlinked */ + if (req->rq_replied || req->rq_reply_unlinked == 1) goto out_wake; req->rq_early = 1; -- 2.7.4