Whamcloud - gitweb
LU-14475 log: Rewrite some log messages 92/41892/5
authorLei Feng <flei@whamcloud.com>
Fri, 5 Mar 2021 12:01:37 +0000 (20:01 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 10 Oct 2021 03:30:47 +0000 (03:30 +0000)
Some log messages are too short to be meaningful. Rewrite them.

Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial
Change-Id: I9ae7d7da23c7e227c4e2b84010fb0c2a06b8cc87
Reviewed-on: https://review.whamcloud.com/41892
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
lustre/obdclass/lu_object.c
lustre/osd-ldiskfs/osd_iam_lvar.c
lustre/osd-ldiskfs/osd_io.c
lustre/ptlrpc/gss/gss_pipefs.c
lustre/ptlrpc/gss/gss_rawobj.c

index b381cfe..3a07035 100644 (file)
@@ -2277,20 +2277,20 @@ void lu_context_keys_dump(void)
 {
        unsigned int i;
 
-        for (i = 0; i < ARRAY_SIZE(lu_keys); ++i) {
-                struct lu_context_key *key;
+       for (i = 0; i < ARRAY_SIZE(lu_keys); ++i) {
+               struct lu_context_key *key;
 
-                key = lu_keys[i];
-                if (key != NULL) {
-                        CERROR("[%d]: %p %x (%p,%p,%p) %d %d \"%s\"@%p\n",
-                               i, key, key->lct_tags,
-                               key->lct_init, key->lct_fini, key->lct_exit,
-                              key->lct_index, atomic_read(&key->lct_used),
-                               key->lct_owner ? key->lct_owner->name : "",
-                               key->lct_owner);
-                        lu_ref_print(&key->lct_reference);
-                }
-        }
+               key = lu_keys[i];
+               if (key != NULL) {
+                       CERROR("LU context keys [%d]: %p %x (%p,%p,%p) %d %d \"%s\"@%p\n",
+                               i, key, key->lct_tags,
+                               key->lct_init, key->lct_fini, key->lct_exit,
+                               key->lct_index, atomic_read(&key->lct_used),
+                               key->lct_owner ? key->lct_owner->name : "",
+                               key->lct_owner);
+                       lu_ref_print(&key->lct_reference);
+               }
+       }
 }
 
 /**
index 2511176..66aff9e 100644 (file)
@@ -342,7 +342,8 @@ static int n_invariant(const struct iam_leaf *leaf)
                         * locked.
                         */
                        n_print(leaf);
-                       CERROR("%#x < %#x\n", nexthash, starthash);
+                       CERROR("invalid hash value less than start hash: %#x < %#x\n",
+                               nexthash, starthash);
                        dump_stack();
                        return 0;
                }
index 2f3c0ff..ef428ee 100644 (file)
@@ -173,7 +173,7 @@ static void dio_complete_routine(struct bio *bio, int error)
         */
 
        if (unlikely(iobuf == NULL)) {
-               CERROR("***** bio->bi_private is NULL!  This should never happen.  Normally, I would crash here, but instead I will dump the bio contents to the console.  Please report this to <https://jira.whamcloud.com/> , along with any interesting messages leading up to this point (like SCSI errors, perhaps).  Because bi_private is NULL, I can't wake up the thread that initiated this IO - you will probably have to reboot this node.\n");
+               CERROR("***** bio->bi_private is NULL! Dump the bio contents to the console. Please report this to <https://jira.whamcloud.com/>, and probably have to reboot this node.\n");
                CERROR("bi_next: %p, bi_flags: %lx, " __stringify(bi_opf)
                       ": %x, bi_vcnt: %d, bi_idx: %d, bi->size: %d, bi_end_io: %p, bi_cnt: %d, bi_private: %p\n",
                       bio->bi_next, (unsigned long)bio->bi_flags,
index 5e1e7ca..4a21cc7 100644 (file)
@@ -789,15 +789,16 @@ struct gss_upcall_msg * gss_find_upcall(__u32 mechidx, __u32 seq)
 static
 int simple_get_bytes(char **buf, __u32 *buflen, void *res, __u32 reslen)
 {
-        if (*buflen < reslen) {
-                CERROR("buflen %u < %u\n", *buflen, reslen);
-                return -EINVAL;
-        }
+       if (*buflen < reslen) {
+               CERROR("shorter buflen than needed: %u < %u\n",
+                       *buflen, reslen);
+               return -EINVAL;
+       }
 
-        memcpy(res, *buf, reslen);
-        *buf += reslen;
-        *buflen -= reslen;
-        return 0;
+       memcpy(res, *buf, reslen);
+       *buf += reslen;
+       *buflen -= reslen;
+       return 0;
 }
 
 /****************************************
index fd4e390..1400414 100644 (file)
@@ -117,7 +117,8 @@ int rawobj_serialize(rawobj_t *obj, __u32 **buf, __u32 *buflen)
         len = cfs_size_round4(obj->len);
 
         if (*buflen < 4 + len) {
-                CERROR("buflen %u <  %u\n", *buflen, 4 + len);
+                CERROR("shorter buflen than needed: %u < %u\n",
+                        *buflen, 4 + len);
                 return -EINVAL;
         }
 
@@ -135,7 +136,7 @@ static int __rawobj_extract(rawobj_t *obj, __u32 **buf, __u32 *buflen,
         __u32 len;
 
         if (*buflen < sizeof(__u32)) {
-                CERROR("buflen %u\n", *buflen);
+                CERROR("too short buflen: %u\n", *buflen);
                 return -EINVAL;
         }
 
@@ -151,7 +152,8 @@ static int __rawobj_extract(rawobj_t *obj, __u32 **buf, __u32 *buflen,
 
         len = local ? obj->len : cfs_size_round4(obj->len);
         if (*buflen < len) {
-                CERROR("buflen %u < %u\n", *buflen, len);
+                CERROR("shorter buflen than object size: %u < %u\n",
+                        *buflen, len);
                 obj->len = 0;
                 return -EINVAL;
         }
@@ -208,7 +210,7 @@ int rawobj_from_netobj_alloc(rawobj_t *rawobj, netobj_t *netobj)
 
         if (netobj->len == 0)
                 return 0;
-                
+
         OBD_ALLOC_LARGE(rawobj->data, netobj->len);
         if (rawobj->data == NULL)
                 return -ENOMEM;
@@ -226,7 +228,8 @@ int buffer_extract_bytes(const void **buf, __u32 *buflen,
                          void *res, __u32 reslen)
 {
         if (*buflen < reslen) {
-                CERROR("buflen %u < %u\n", *buflen, reslen);
+                CERROR("shorter buflen than expected: %u < %u\n",
+                        *buflen, reslen);
                 return -EINVAL;
         }