Orangefs: improve gossip statements
authorMike Marshall <hubcap@omnibond.com>
Thu, 3 Mar 2016 18:46:48 +0000 (13:46 -0500)
committerMike Marshall <hubcap@omnibond.com>
Thu, 3 Mar 2016 18:46:48 +0000 (13:46 -0500)
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/devorangefs-req.c
fs/orangefs/file.c
fs/orangefs/orangefs-mod.c
fs/orangefs/waitqueue.c

index d50f89ea302e7bfe638fdaf8bb276e592e627f7b..0f9a12ac74588b06b71c8fc5cc54b9be76130ec1 100644 (file)
@@ -245,6 +245,12 @@ restart:
         * it has been sent to the client.
         */
        set_op_state_inprogress(cur_op);
+       gossip_debug(GOSSIP_DEV_DEBUG,
+                    "%s: 1 op:%s: op_state:%d: process:%s:\n",
+                    __func__,
+                    get_opname_string(cur_op),
+                    cur_op->op_state,
+                    current->comm);
        orangefs_devreq_add_op(cur_op);
        spin_unlock(&cur_op->lock);
        spin_unlock(&htable_ops_in_progress_lock);
@@ -262,6 +268,12 @@ error:
        spin_lock(&cur_op->lock);
        if (likely(!op_state_given_up(cur_op))) {
                set_op_state_waiting(cur_op);
+               gossip_debug(GOSSIP_DEV_DEBUG,
+                            "%s: 2 op:%s: op_state:%d: process:%s:\n",
+                            __func__,
+                            get_opname_string(cur_op),
+                            cur_op->op_state,
+                            current->comm);
                list_add(&cur_op->list, &orangefs_request_list);
                spin_unlock(&cur_op->lock);
        } else {
@@ -416,6 +428,12 @@ wakeup:
                complete(&op->waitq);
        } else {
                set_op_state_serviced(op);
+               gossip_debug(GOSSIP_DEV_DEBUG,
+                            "%s: op:%s: op_state:%d: process:%s:\n",
+                            __func__,
+                            get_opname_string(op),
+                            op->op_state,
+                            current->comm);
                spin_unlock(&op->lock);
        }
        return ret;
index 399d5288dc1a4a144c147a7ee1a0b6a9addb9403..6f2e0f745c5d484868b2a65d8dbbb76526437634 100644 (file)
@@ -214,18 +214,14 @@ populate_shared_memory:
                        goto out;
        }
        gossip_debug(GOSSIP_FILE_DEBUG,
-           "%s(%pU): Amount written as returned by the sys-io call:%d\n",
+           "%s(%pU): Amount %s, returned by the sys-io call:%d\n",
            __func__,
            handle,
+           type == ORANGEFS_IO_READ ?  "read" : "written",
            (int)new_op->downcall.resp.io.amt_complete);
 
        ret = new_op->downcall.resp.io.amt_complete;
 
-       /*
-        * tell the device file owner waiting on I/O that this read has
-        * completed and it can return now.
-        */
-
 out:
        if (buffer_index >= 0) {
                orangefs_bufmap_put(buffer_index);
index a4e08dd3e669f5cfc09194414b9883b71d4f4124..91a4293d1cd7b7cc33bbea8c45e53c92f1adbab1 100644 (file)
@@ -261,12 +261,13 @@ void purge_inprogress_ops(void)
                                         next,
                                         &htable_ops_in_progress[i],
                                         list) {
-                       gossip_debug(GOSSIP_INIT_DEBUG,
-                               "pvfs2-client-core: purging in-progress op tag "
-                               "%llu %s\n",
-                               llu(op->tag),
-                               get_opname_string(op));
                        set_op_state_purged(op);
+                       gossip_debug(GOSSIP_DEV_DEBUG,
+                                    "%s: op:%s: op_state:%d: process:%s:\n",
+                                    __func__,
+                                    get_opname_string(op),
+                                    op->op_state,
+                                    current->comm);
                }
                spin_unlock(&htable_ops_in_progress_lock);
        }
index edfd921cf6ec24277ee84e8fb6b152fb76bef1b8..31635bc303fe638f4890457486466fb2a07a849f 100644 (file)
@@ -37,6 +37,12 @@ void purge_waiting_ops(void)
                             llu(op->tag),
                             get_opname_string(op));
                set_op_state_purged(op);
+               gossip_debug(GOSSIP_DEV_DEBUG,
+                            "%s: op:%s: op_state:%d: process:%s:\n",
+                            __func__,
+                            get_opname_string(op),
+                            op->op_state,
+                            current->comm);
        }
        spin_unlock(&orangefs_request_list_lock);
 }
@@ -101,6 +107,12 @@ retry_servicing:
        spin_lock(&orangefs_request_list_lock);
        spin_lock(&op->lock);
        set_op_state_waiting(op);
+       gossip_debug(GOSSIP_DEV_DEBUG,
+                    "%s: op:%s: op_state:%d: process:%s:\n",
+                    __func__,
+                    get_opname_string(op),
+                    op->op_state,
+                    current->comm);
        /* add high priority remount op to the front of the line. */
        if (flags & ORANGEFS_OP_PRIORITY)
                list_add(&op->list, &orangefs_request_list);
@@ -173,7 +185,8 @@ retry_servicing:
 
 out:
        gossip_debug(GOSSIP_WAIT_DEBUG,
-                    "orangefs: service_operation %s returning: %d for %p.\n",
+                    "%s: %s returning: %d for %p.\n",
+                    __func__,
                     op_name,
                     ret,
                     op);
@@ -204,6 +217,12 @@ bool orangefs_cancel_op_in_progress(struct orangefs_kernel_op_s *op)
        }
        spin_lock(&op->lock);
        set_op_state_waiting(op);
+       gossip_debug(GOSSIP_DEV_DEBUG,
+                    "%s: op:%s: op_state:%d: process:%s:\n",
+                    __func__,
+                    get_opname_string(op),
+                    op->op_state,
+                    current->comm);
        list_add(&op->list, &orangefs_request_list);
        spin_unlock(&op->lock);
        spin_unlock(&orangefs_request_list_lock);
@@ -310,9 +329,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
 
        if (unlikely(n < 0)) {
                gossip_debug(GOSSIP_WAIT_DEBUG,
-                            "*** %s:"
-                            " operation interrupted by a signal (tag "
-                            "%llu, op %p)\n",
+                            "%s: operation interrupted, tag %llu, %p\n",
                             __func__,
                             llu(op->tag),
                             op);
@@ -320,9 +337,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
        }
        if (op_state_purged(op)) {
                gossip_debug(GOSSIP_WAIT_DEBUG,
-                            "*** %s:"
-                            " operation purged (tag "
-                            "%llu, %p, att %d)\n",
+                            "%s: operation purged, tag %llu, %p, %d\n",
                             __func__,
                             llu(op->tag),
                             op,
@@ -333,9 +348,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
        }
        /* must have timed out, then... */
        gossip_debug(GOSSIP_WAIT_DEBUG,
-                    "*** %s:"
-                    " operation timed out (tag"
-                    " %llu, %p, att %d)\n",
+                    "%s: operation timed out, tag %llu, %p, %d)\n",
                     __func__,
                     llu(op->tag),
                     op,