Whamcloud - gitweb
LU-1095 debug: Improve messages for fake requests
authorChristopher J. Morrone <morrone2@llnl.gov>
Mon, 27 Feb 2012 00:19:21 +0000 (16:19 -0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 30 Apr 2012 01:12:49 +0000 (21:12 -0400)
Update the console filter to correctly handle fake requests and
squelched the lov_update_create_set() message for the
-ETIMEDOUT/-ENOTCONN case.

 LustreError: 7872:0:(lov_request.c:693:lov_update_create_set()) error
 creating fid 0x104c5e0b sub-object on OST idx 53/2: rc = -107

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Change-Id: I5f37f585566b053d515665fcddbcc8a3e653d89a
Reviewed-on: http://review.whamcloud.com/2203
Tested-by: Hudson
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lov_request.c
lustre/ptlrpc/client.c

index 4c5e1b3..5d2334e 100644 (file)
@@ -551,8 +551,11 @@ static int lov_update_create_set(struct lov_request_set *set,
 
         if (rc && lov->lov_tgts[req->rq_idx] &&
             lov->lov_tgts[req->rq_idx]->ltd_active) {
-                CERROR("error creating fid "LPX64" sub-object"
-                       " on OST idx %d/%d: rc = %d\n",
+                /* Pre-creating objects may timeout via -ETIMEDOUT or
+                 * -ENOTCONN both are always non-critical events. */
+                CDEBUG(rc == -ETIMEDOUT || rc == -ENOTCONN ? D_HA : D_ERROR,
+                       "error creating fid "LPX64" sub-object "
+                       "on OST idx %d/%d: rc = %d\n",
                        set->set_oi->oi_oa->o_id, req->rq_idx,
                        lsm->lsm_stripe_count, rc);
                 if (rc > 0) {
index 30c7cfe..85db559 100644 (file)
@@ -1100,9 +1100,16 @@ static int ptlrpc_import_delay_req(struct obd_import *imp,
  */
 static int ptlrpc_console_allow(struct ptlrpc_request *req)
 {
-        __u32 opc = lustre_msg_get_opc(req->rq_reqmsg);
+        __u32 opc;
         int err;
 
+        /* Fake requests include no rq_reqmsg */
+        if (req->rq_fake)
+                return 0;
+
+        LASSERT(req->rq_reqmsg != NULL);
+        opc = lustre_msg_get_opc(req->rq_reqmsg);
+
         /* Suppress particular reconnect errors which are to be expected.  No
          * errors are suppressed for the initial connection on an import */
         if ((lustre_handle_is_used(&req->rq_import->imp_remote_handle)) &&