Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9a67899 authored by Joe Perches's avatar Joe Perches Committed by Ilya Dryomov
Browse files

libceph: Convert pr_warning to pr_warn



Use the more common pr_warn.

Other miscellanea:

o Coalesce formats
o Realign arguments

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
parent 5d23371f
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -293,17 +293,20 @@ static int get_secret(struct ceph_crypto_key *dst, const char *name) {
		key_err = PTR_ERR(ukey);
		switch (key_err) {
		case -ENOKEY:
			pr_warning("ceph: Mount failed due to key not found: %s\n", name);
			pr_warn("ceph: Mount failed due to key not found: %s\n",
				name);
			break;
		case -EKEYEXPIRED:
			pr_warning("ceph: Mount failed due to expired key: %s\n", name);
			pr_warn("ceph: Mount failed due to expired key: %s\n",
				name);
			break;
		case -EKEYREVOKED:
			pr_warning("ceph: Mount failed due to revoked key: %s\n", name);
			pr_warn("ceph: Mount failed due to revoked key: %s\n",
				name);
			break;
		default:
			pr_warning("ceph: Mount failed due to unknown key error"
			       " %d: %s\n", key_err, name);
			pr_warn("ceph: Mount failed due to unknown key error %d: %s\n",
				key_err, name);
		}
		err = -EPERM;
		goto out;
@@ -433,7 +436,7 @@ ceph_parse_options(char *options, const char *dev_name,

			/* misc */
		case Opt_osdtimeout:
			pr_warning("ignoring deprecated osdtimeout option\n");
			pr_warn("ignoring deprecated osdtimeout option\n");
			break;
		case Opt_osdkeepalivetimeout:
			opt->osd_keepalive_timeout = intval;
+9 −9
Original line number Diff line number Diff line
@@ -1937,7 +1937,7 @@ static int process_banner(struct ceph_connection *con)
		   sizeof(con->peer_addr)) != 0 &&
	    !(addr_is_blank(&con->actual_peer_addr.in_addr) &&
	      con->actual_peer_addr.nonce == con->peer_addr.nonce)) {
		pr_warning("wrong peer, want %s/%d, got %s/%d\n",
		pr_warn("wrong peer, want %s/%d, got %s/%d\n",
			ceph_pr_addr(&con->peer_addr.in_addr),
			(int)le32_to_cpu(con->peer_addr.nonce),
			ceph_pr_addr(&con->actual_peer_addr.in_addr),
@@ -2302,7 +2302,7 @@ static int read_partial_message(struct ceph_connection *con)

		BUG_ON(!con->in_msg ^ skip);
		if (con->in_msg && data_len > con->in_msg->data_length) {
			pr_warning("%s skipping long message (%u > %zd)\n",
			pr_warn("%s skipping long message (%u > %zd)\n",
				__func__, data_len, con->in_msg->data_length);
			ceph_msg_put(con->in_msg);
			con->in_msg = NULL;
@@ -2712,7 +2712,7 @@ static bool con_sock_closed(struct ceph_connection *con)
	CASE(OPEN);
	CASE(STANDBY);
	default:
		pr_warning("%s con %p unrecognized state %lu\n",
		pr_warn("%s con %p unrecognized state %lu\n",
			__func__, con, con->state);
		con->error_msg = "unrecognized con state";
		BUG();
@@ -2828,7 +2828,7 @@ static void con_work(struct work_struct *work)
 */
static void con_fault(struct ceph_connection *con)
{
	pr_warning("%s%lld %s %s\n", ENTITY_NAME(con->peer_name),
	pr_warn("%s%lld %s %s\n", ENTITY_NAME(con->peer_name),
		ceph_pr_addr(&con->peer_addr.in_addr), con->error_msg);
	dout("fault %p state %lu to peer %s\n",
	     con, con->state, ceph_pr_addr(&con->peer_addr.in_addr));
+4 −4
Original line number Diff line number Diff line
@@ -1182,7 +1182,7 @@ static struct ceph_msg *mon_alloc_msg(struct ceph_connection *con,
		pr_info("alloc_msg unknown type %d\n", type);
		*skip = 1;
	} else if (front_len > m->front_alloc_len) {
		pr_warning("mon_alloc_msg front %d > prealloc %d (%u#%llu)\n",
		pr_warn("mon_alloc_msg front %d > prealloc %d (%u#%llu)\n",
			front_len, m->front_alloc_len,
			(unsigned int)con->peer_name.type,
			le64_to_cpu(con->peer_name.num));
+7 −8
Original line number Diff line number Diff line
@@ -1819,7 +1819,7 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
	}
	bytes = le32_to_cpu(msg->hdr.data_len);
	if (payload_len != bytes) {
		pr_warning("sum of op payload lens %d != data_len %d",
		pr_warn("sum of op payload lens %d != data_len %d\n",
			payload_len, bytes);
		goto bad_put;
	}
@@ -2842,7 +2842,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
	ceph_msg_revoke_incoming(req->r_reply);

	if (front_len > req->r_reply->front_alloc_len) {
		pr_warning("get_reply front %d > preallocated %d (%u#%llu)\n",
		pr_warn("get_reply front %d > preallocated %d (%u#%llu)\n",
			front_len, req->r_reply->front_alloc_len,
			(unsigned int)con->peer_name.type,
			le64_to_cpu(con->peer_name.num));
@@ -2868,8 +2868,7 @@ static struct ceph_msg *get_reply(struct ceph_connection *con,
			if (osd_data->pages &&
				unlikely(osd_data->length < data_len)) {

				pr_warning("tid %lld reply has %d bytes "
					"we had only %llu bytes ready\n",
				pr_warn("tid %lld reply has %d bytes we had only %llu bytes ready\n",
					tid, data_len, osd_data->length);
				*skip = 1;
				ceph_msg_put(m);
+10 −10
Original line number Diff line number Diff line
@@ -521,11 +521,11 @@ static int decode_pool(void **p, void *end, struct ceph_pg_pool_info *pi)
	ev = ceph_decode_8(p);  /* encoding version */
	cv = ceph_decode_8(p); /* compat version */
	if (ev < 5) {
		pr_warning("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv);
		pr_warn("got v %d < 5 cv %d of ceph_pg_pool\n", ev, cv);
		return -EINVAL;
	}
	if (cv > 9) {
		pr_warning("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv);
		pr_warn("got v %d cv %d > 9 of ceph_pg_pool\n", ev, cv);
		return -EINVAL;
	}
	len = ceph_decode_32(p);
@@ -729,7 +729,7 @@ static int get_osdmap_client_data_v(void **p, void *end,

		ceph_decode_8_safe(p, end, struct_compat, e_inval);
		if (struct_compat > OSDMAP_WRAPPER_COMPAT_VER) {
			pr_warning("got v %d cv %d > %d of %s ceph_osdmap\n",
			pr_warn("got v %d cv %d > %d of %s ceph_osdmap\n",
				struct_v, struct_compat,
				OSDMAP_WRAPPER_COMPAT_VER, prefix);
			return -EINVAL;
@@ -739,7 +739,7 @@ static int get_osdmap_client_data_v(void **p, void *end,
		ceph_decode_8_safe(p, end, struct_v, e_inval);
		ceph_decode_8_safe(p, end, struct_compat, e_inval);
		if (struct_compat > OSDMAP_CLIENT_DATA_COMPAT_VER) {
			pr_warning("got v %d cv %d > %d of %s ceph_osdmap client data\n",
			pr_warn("got v %d cv %d > %d of %s ceph_osdmap client data\n",
				struct_v, struct_compat,
				OSDMAP_CLIENT_DATA_COMPAT_VER, prefix);
			return -EINVAL;
@@ -751,8 +751,8 @@ static int get_osdmap_client_data_v(void **p, void *end,
		*p -= 1;
		ceph_decode_16_safe(p, end, version, e_inval);
		if (version < 6) {
			pr_warning("got v %d < 6 of %s ceph_osdmap\n", version,
				   prefix);
			pr_warn("got v %d < 6 of %s ceph_osdmap\n",
				version, prefix);
			return -EINVAL;
		}