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>
- 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);
+ }
+ }
* locked.
*/
n_print(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;
}
dump_stack();
return 0;
}
*/
if (unlikely(iobuf == NULL)) {
*/
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,
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,
static
int simple_get_bytes(char **buf, __u32 *buflen, void *res, __u32 reslen)
{
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;
}
/****************************************
}
/****************************************
len = cfs_size_round4(obj->len);
if (*buflen < 4 + len) {
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);
__u32 len;
if (*buflen < sizeof(__u32)) {
__u32 len;
if (*buflen < sizeof(__u32)) {
- CERROR("buflen %u\n", *buflen);
+ CERROR("too short buflen: %u\n", *buflen);
len = local ? obj->len : cfs_size_round4(obj->len);
if (*buflen < len) {
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;
}
obj->len = 0;
return -EINVAL;
}
if (netobj->len == 0)
return 0;
if (netobj->len == 0)
return 0;
OBD_ALLOC_LARGE(rawobj->data, netobj->len);
if (rawobj->data == NULL)
return -ENOMEM;
OBD_ALLOC_LARGE(rawobj->data, netobj->len);
if (rawobj->data == NULL)
return -ENOMEM;
void *res, __u32 reslen)
{
if (*buflen < reslen) {
void *res, __u32 reslen)
{
if (*buflen < reslen) {
- CERROR("buflen %u < %u\n", *buflen, reslen);
+ CERROR("shorter buflen than expected: %u < %u\n",
+ *buflen, reslen);