Whamcloud - gitweb
LU-8658 ptlrpc: Suppress error for flock requests 56/22856/2
authorPatrick Farrell <paf@cray.com>
Fri, 30 Sep 2016 19:12:53 +0000 (14:12 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 8 Oct 2016 16:39:45 +0000 (16:39 +0000)
-EAGAIN is a normal return when requesting POSIX flocks.
We can't recognize exactly that case here, but it's the
only case that should result in -EAGAIN on LDLM_ENQUEUE, so
don't print to console in that case.

Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: Idfbaf671023ac2c3dc84ddd62d2e547427b1f50b
Reviewed-on: http://review.whamcloud.com/22856
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/client.c

index de7e612..f340fc2 100644 (file)
@@ -1254,7 +1254,9 @@ static int ptlrpc_check_status(struct ptlrpc_request *req)
                lnet_nid_t nid = imp->imp_connection->c_peer.nid;
                __u32 opc = lustre_msg_get_opc(req->rq_reqmsg);
 
                lnet_nid_t nid = imp->imp_connection->c_peer.nid;
                __u32 opc = lustre_msg_get_opc(req->rq_reqmsg);
 
-               if (ptlrpc_console_allow(req))
+               /* -EAGAIN is normal when using POSIX flocks */
+               if (ptlrpc_console_allow(req) &&
+                   !(opc == LDLM_ENQUEUE && err == -EAGAIN))
                        LCONSOLE_ERROR_MSG(0x11, "%s: operation %s to node %s "
                                           "failed: rc = %d\n",
                                           imp->imp_obd->obd_name,
                        LCONSOLE_ERROR_MSG(0x11, "%s: operation %s to node %s "
                                           "failed: rc = %d\n",
                                           imp->imp_obd->obd_name,