aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-09-10 00:17:29 -0400
committerIlya Dryomov <idryomov@redhat.com>2014-10-14 13:03:23 -0400
commitb9a678994b4a64b1106ab2cf7cfe7cbc10bb6f40 (patch)
treeeddb79372ab905331c38cdda791a24d793c50a86 /net
parent5d23371fdb7dc03fa6fe054da3467efb0d347945 (diff)
libceph: Convert pr_warning to pr_warn
Use the more common pr_warn. Other miscellanea: o Coalesce formats o Realign arguments Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/ceph_common.c15
-rw-r--r--net/ceph/messenger.c18
-rw-r--r--net/ceph/mon_client.c8
-rw-r--r--net/ceph/osd_client.c15
-rw-r--r--net/ceph/osdmap.c20
5 files changed, 39 insertions, 37 deletions
diff --git a/net/ceph/ceph_common.c b/net/ceph/ceph_common.c
index 1675021d8c12..58fbfe134f93 100644
--- a/net/ceph/ceph_common.c
+++ b/net/ceph/ceph_common.c
@@ -293,17 +293,20 @@ static int get_secret(struct ceph_crypto_key *dst, const char *name) {
293 key_err = PTR_ERR(ukey); 293 key_err = PTR_ERR(ukey);
294 switch (key_err) { 294 switch (key_err) {
295 case -ENOKEY: 295 case -ENOKEY:
296 pr_warning("ceph: Mount failed due to key not found: %s\n", name); 296 pr_warn("ceph: Mount failed due to key not found: %s\n",
297 name);
297 break; 298 break;
298 case -EKEYEXPIRED: 299 case -EKEYEXPIRED:
299 pr_warning("ceph: Mount failed due to expired key: %s\n", name); 300 pr_warn("ceph: Mount failed due to expired key: %s\n",
301 name);
300 break; 302 break;
301 case -EKEYREVOKED: 303 case -EKEYREVOKED:
302 pr_warning("ceph: Mount failed due to revoked key: %s\n", name); 304 pr_warn("ceph: Mount failed due to revoked key: %s\n",
305 name);
303 break; 306 break;
304 default: 307 default:
305 pr_warning("ceph: Mount failed due to unknown key error" 308 pr_warn("ceph: Mount failed due to unknown key error %d: %s\n",
306 " %d: %s\n", key_err, name); 309 key_err, name);
307 } 310 }
308 err = -EPERM; 311 err = -EPERM;
309 goto out; 312 goto out;
@@ -433,7 +436,7 @@ ceph_parse_options(char *options, const char *dev_name,
433 436
434 /* misc */ 437 /* misc */
435 case Opt_osdtimeout: 438 case Opt_osdtimeout:
436 pr_warning("ignoring deprecated osdtimeout option\n"); 439 pr_warn("ignoring deprecated osdtimeout option\n");
437 break; 440 break;
438 case Opt_osdkeepalivetimeout: 441 case Opt_osdkeepalivetimeout:
439 opt->osd_keepalive_timeout = intval; 442 opt->osd_keepalive_timeout = intval;
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index b2f571dd933d..e7d94113f2d6 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1937,11 +1937,11 @@ static int process_banner(struct ceph_connection *con)
1937 sizeof(con->peer_addr)) != 0 && 1937 sizeof(con->peer_addr)) != 0 &&
1938 !(addr_is_blank(&con->actual_peer_addr.in_addr) && 1938 !(addr_is_blank(&con->actual_peer_addr.in_addr) &&
1939 con->actual_peer_addr.nonce == con->peer_addr.nonce)) { 1939 con->actual_peer_addr.nonce == con->peer_addr.nonce)) {
1940 pr_warning("wrong peer, want %s/%d, got %s/%d\n", 1940 pr_warn("wrong peer, want %s/%d, got %s/%d\n",
1941 ceph_pr_addr(&con->peer_addr.in_addr), 1941 ceph_pr_addr(&con->peer_addr.in_addr),
1942 (int)le32_to_cpu(con->peer_addr.nonce), 1942 (int)le32_to_cpu(con->peer_addr.nonce),
1943 ceph_pr_addr(&con->actual_peer_addr.in_addr), 1943 ceph_pr_addr(&con->actual_peer_addr.in_addr),
1944 (int)le32_to_cpu(con->actual_peer_addr.nonce)); 1944 (int)le32_to_cpu(con->actual_peer_addr.nonce));
1945 con->error_msg = "wrong peer at address"; 1945 con->error_msg = "wrong peer at address";
1946 return -1; 1946 return -1;
1947 } 1947 }
@@ -2302,7 +2302,7 @@ static int read_partial_message(struct ceph_connection *con)
2302 2302
2303 BUG_ON(!con->in_msg ^ skip); 2303 BUG_ON(!con->in_msg ^ skip);
2304 if (con->in_msg && data_len > con->in_msg->data_length) { 2304 if (con->in_msg && data_len > con->in_msg->data_length) {
2305 pr_warning("%s skipping long message (%u > %zd)\n", 2305 pr_warn("%s skipping long message (%u > %zd)\n",
2306 __func__, data_len, con->in_msg->data_length); 2306 __func__, data_len, con->in_msg->data_length);
2307 ceph_msg_put(con->in_msg); 2307 ceph_msg_put(con->in_msg);
2308 con->in_msg = NULL; 2308 con->in_msg = NULL;
@@ -2712,7 +2712,7 @@ static bool con_sock_closed(struct ceph_connection *con)
2712 CASE(OPEN); 2712 CASE(OPEN);
2713 CASE(STANDBY); 2713 CASE(STANDBY);
2714 default: 2714 default:
2715 pr_warning("%s con %p unrecognized state %lu\n", 2715 pr_warn("%s con %p unrecognized state %lu\n",
2716 __func__, con, con->state); 2716 __func__, con, con->state);
2717 con->error_msg = "unrecognized con state"; 2717 con->error_msg = "unrecognized con state";
2718 BUG(); 2718 BUG();
@@ -2828,8 +2828,8 @@ static void con_work(struct work_struct *work)
2828 */ 2828 */
2829static void con_fault(struct ceph_connection *con) 2829static void con_fault(struct ceph_connection *con)
2830{ 2830{
2831 pr_warning("%s%lld %s %s\n", ENTITY_NAME(con->peer_name), 2831 pr_warn("%s%lld %s %s\n", ENTITY_NAME(con->peer_name),
2832 ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg); 2832 ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
2833 dout("fault %p state %lu to peer %s\n", 2833 dout("fault %p state %lu to peer %s\n",
2834 con, con->state, ceph_pr_addr(&con->peer_addr.in_addr)); 2834 con, con->state, ceph_pr_addr(&con->peer_addr.in_addr));
2835 2835
diff --git a/net/ceph/mon_client.c b/net/ceph/mon_client.c
index 61fcfc304f68..a83062ceeec9 100644
--- a/net/ceph/mon_client.c
+++ b/net/ceph/mon_client.c
@@ -1182,10 +1182,10 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con,
1182 pr_info("alloc_msg unknown type %d\n", type); 1182 pr_info("alloc_msg unknown type %d\n", type);
1183 *skip = 1; 1183 *skip = 1;
1184 } else if (front_len > m->front_alloc_len) { 1184 } else if (front_len > m->front_alloc_len) {
1185 pr_warning("mon_alloc_msg front %d > prealloc %d (%u#%llu)\n", 1185 pr_warn("mon_alloc_msg front %d > prealloc %d (%u#%llu)\n",
1186 front_len, m->front_alloc_len, 1186 front_len, m->front_alloc_len,
1187 (unsigned int)con->peer_name.type, 1187 (unsigned int)con->peer_name.type,
1188 le64_to_cpu(con->peer_name.num)); 1188 le64_to_cpu(con->peer_name.num));
1189 ceph_msg_put(m); 1189 ceph_msg_put(m);
1190 m = ceph_msg_new(type, front_len, GFP_NOFS, false); 1190 m = ceph_msg_new(type, front_len, GFP_NOFS, false);
1191 } 1191 }
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 84b02242b724..01aeddf28469 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1819,8 +1819,8 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
1819 } 1819 }
1820 bytes = le32_to_cpu(msg->hdr.data_len); 1820 bytes = le32_to_cpu(msg->hdr.data_len);
1821 if (payload_len != bytes) { 1821 if (payload_len != bytes) {
1822 pr_warning("sum of op payload lens %d != data_len %d", 1822 pr_warn("sum of op payload lens %d != data_len %d\n",
1823 payload_len, bytes); 1823 payload_len, bytes);
1824 goto bad_put; 1824 goto bad_put;
1825 } 1825 }
1826 1826
@@ -2842,10 +2842,10 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
2842 ceph_msg_revoke_incoming(req->r_reply); 2842 ceph_msg_revoke_incoming(req->r_reply);
2843 2843
2844 if (front_len > req->r_reply->front_alloc_len) { 2844 if (front_len > req->r_reply->front_alloc_len) {
2845 pr_warning("get_reply front %d > preallocated %d (%u#%llu)\n", 2845 pr_warn("get_reply front %d > preallocated %d (%u#%llu)\n",
2846 front_len, req->r_reply->front_alloc_len, 2846 front_len, req->r_reply->front_alloc_len,
2847 (unsigned int)con->peer_name.type, 2847 (unsigned int)con->peer_name.type,
2848 le64_to_cpu(con->peer_name.num)); 2848 le64_to_cpu(con->peer_name.num));
2849 m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front_len, GFP_NOFS, 2849 m = ceph_msg_new(CEPH_MSG_OSD_OPREPLY, front_len, GFP_NOFS,
2850 false); 2850 false);
2851 if (!m) 2851 if (!m)
@@ -2868,8 +2868,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
2868 if (osd_data->pages && 2868 if (osd_data->pages &&
2869 unlikely(osd_data->length < data_len)) { 2869 unlikely(osd_data->length < data_len)) {
2870 2870
2871 pr_warning("tid %lld reply has %d bytes " 2871 pr_warn("tid %lld reply has %d bytes we had only %llu bytes ready\n",
2872 "we had only %llu bytes ready\n",
2873 tid, data_len, osd_data->length); 2872 tid, data_len, osd_data->length);
2874 *skip = 1; 2873 *skip = 1;
2875 ceph_msg_put(m); 2874 ceph_msg_put(m);
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index ec4d9e24dcf9..b8c3fde5b04f 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -521,11 +521,11 @@ static int decode_pool(void **p, void *end, struct ceph_pg_pool_info *pi)
521 ev = ceph_decode_8(p); /* encoding version */ 521 ev = ceph_decode_8(p); /* encoding version */
522 cv = ceph_decode_8(p); /* compat version */ 522 cv = ceph_decode_8(p); /* compat version */
523 if (ev < 5) { 523 if (ev < 5) {
524 pr_warning("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv); 524 pr_warn("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv);
525 return -EINVAL; 525 return -EINVAL;
526 } 526 }
527 if (cv > 9) { 527 if (cv > 9) {
528 pr_warning("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv); 528 pr_warn("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv);
529 return -EINVAL; 529 return -EINVAL;
530 } 530 }
531 len = ceph_decode_32(p); 531 len = ceph_decode_32(p);
@@ -729,9 +729,9 @@ static int get_osdmap_client_data_v(void **p, void *end,
729 729
730 ceph_decode_8_safe(p, end, struct_compat, e_inval); 730 ceph_decode_8_safe(p, end, struct_compat, e_inval);
731 if (struct_compat > OSDMAP_WRAPPER_COMPAT_VER) { 731 if (struct_compat > OSDMAP_WRAPPER_COMPAT_VER) {
732 pr_warning("got v %d cv %d > %d of %s ceph_osdmap\n", 732 pr_warn("got v %d cv %d > %d of %s ceph_osdmap\n",
733 struct_v, struct_compat, 733 struct_v, struct_compat,
734 OSDMAP_WRAPPER_COMPAT_VER, prefix); 734 OSDMAP_WRAPPER_COMPAT_VER, prefix);
735 return -EINVAL; 735 return -EINVAL;
736 } 736 }
737 *p += 4; /* ignore wrapper struct_len */ 737 *p += 4; /* ignore wrapper struct_len */
@@ -739,9 +739,9 @@ static int get_osdmap_client_data_v(void **p, void *end,
739 ceph_decode_8_safe(p, end, struct_v, e_inval); 739 ceph_decode_8_safe(p, end, struct_v, e_inval);
740 ceph_decode_8_safe(p, end, struct_compat, e_inval); 740 ceph_decode_8_safe(p, end, struct_compat, e_inval);
741 if (struct_compat > OSDMAP_CLIENT_DATA_COMPAT_VER) { 741 if (struct_compat > OSDMAP_CLIENT_DATA_COMPAT_VER) {
742 pr_warning("got v %d cv %d > %d of %s ceph_osdmap client data\n", 742 pr_warn("got v %d cv %d > %d of %s ceph_osdmap client data\n",
743 struct_v, struct_compat, 743 struct_v, struct_compat,
744 OSDMAP_CLIENT_DATA_COMPAT_VER, prefix); 744 OSDMAP_CLIENT_DATA_COMPAT_VER, prefix);
745 return -EINVAL; 745 return -EINVAL;
746 } 746 }
747 *p += 4; /* ignore client data struct_len */ 747 *p += 4; /* ignore client data struct_len */
@@ -751,8 +751,8 @@ static int get_osdmap_client_data_v(void **p, void *end,
751 *p -= 1; 751 *p -= 1;
752 ceph_decode_16_safe(p, end, version, e_inval); 752 ceph_decode_16_safe(p, end, version, e_inval);
753 if (version < 6) { 753 if (version < 6) {
754 pr_warning("got v %d < 6 of %s ceph_osdmap\n", version, 754 pr_warn("got v %d < 6 of %s ceph_osdmap\n",
755 prefix); 755 version, prefix);
756 return -EINVAL; 756 return -EINVAL;
757 } 757 }
758 758