Whamcloud - gitweb
LU-7434 ptlrpc: Early Reply vs Reply MDunlink 34/18934/2
authorVitaly Fertman <vitaly.fertman@seagate.com>
Sun, 21 Feb 2016 01:35:20 +0000 (04:35 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 28 Apr 2016 04:23:30 +0000 (04:23 +0000)
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 <vitaly.fertman@seagate.com>
Change-Id: I98a939e54d5d9298f217761c8c7289843e46162d
Seagate-bug-id: MRP-3323
Reviewed-by: Alexey Leonidovich Lyashkov <alexey.lyashkov@seagate.com>
Reviewed-by: Andriy Skulysh <andriy.skulysh@seagate.com>
Tested-by: Parinay Vijayprakash Kondekar <parinay.kondekar@seagate.com>
Reviewed-on: http://review.whamcloud.com/18934
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/events.c

index 035aa47..3932e2d 100644 (file)
@@ -139,8 +139,10 @@ 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 */
-                        goto out_wake;
+               /* 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;
                 req->rq_reply_off = ev->offset;