From: Vitaly Fertman Date: Sun, 21 Feb 2016 01:35:20 +0000 (+0300) Subject: LU-7434 ptlrpc: Early Reply vs Reply MDunlink X-Git-Tag: 2.8.53~31 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=14ba724a62b55b27f2a9c9611e15879207d78b43 LU-7434 ptlrpc: Early Reply vs Reply MDunlink 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 Change-Id: I98a939e54d5d9298f217761c8c7289843e46162d 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 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Chris Horn Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index 035aa47..3932e2d 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -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;