aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2011-08-09 18:03:46 -0400
committerSage Weil <sage@newdream.net>2011-10-25 19:10:15 -0400
commitb61c27636fffbaf1980e675282777b9467254a40 (patch)
treebd78cfefda4beb7e3de5fe97dd36fed3dbfa91c1 /fs
parentf6a2f5be07463ef532b9f4e3cb9e42ab9df85832 (diff)
libceph: don't complain on msgpool alloc failures
The pool allocation failures are masked by the pool; there is no need to spam the console about them. (That's the whole point of having the pool in the first place.) Mark msg allocations whose failure is safely handled as such. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/caps.c2
-rw-r--r--fs/ceph/mds_client.c11
2 files changed, 7 insertions, 6 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 8d74ad7ba556..b8731bf3ef1f 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -945,7 +945,7 @@ static int send_cap_msg(struct ceph_mds_session *session,
945 seq, issue_seq, mseq, follows, size, max_size, 945 seq, issue_seq, mseq, follows, size, max_size,
946 xattr_version, xattrs_buf ? (int)xattrs_buf->vec.iov_len : 0); 946 xattr_version, xattrs_buf ? (int)xattrs_buf->vec.iov_len : 0);
947 947
948 msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPS, sizeof(*fc), GFP_NOFS); 948 msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPS, sizeof(*fc), GFP_NOFS, false);
949 if (!msg) 949 if (!msg)
950 return -ENOMEM; 950 return -ENOMEM;
951 951
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 86c59e16ba74..1d72f15fe9f4 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -764,7 +764,8 @@ static struct ceph_msg *create_session_msg(u32 op, u64 seq)
764 struct ceph_msg *msg; 764 struct ceph_msg *msg;
765 struct ceph_mds_session_head *h; 765 struct ceph_mds_session_head *h;
766 766
767 msg = ceph_msg_new(CEPH_MSG_CLIENT_SESSION, sizeof(*h), GFP_NOFS); 767 msg = ceph_msg_new(CEPH_MSG_CLIENT_SESSION, sizeof(*h), GFP_NOFS,
768 false);
768 if (!msg) { 769 if (!msg) {
769 pr_err("create_session_msg ENOMEM creating msg\n"); 770 pr_err("create_session_msg ENOMEM creating msg\n");
770 return NULL; 771 return NULL;
@@ -1240,7 +1241,7 @@ int ceph_add_cap_releases(struct ceph_mds_client *mdsc,
1240 while (session->s_num_cap_releases < session->s_nr_caps + extra) { 1241 while (session->s_num_cap_releases < session->s_nr_caps + extra) {
1241 spin_unlock(&session->s_cap_lock); 1242 spin_unlock(&session->s_cap_lock);
1242 msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPRELEASE, PAGE_CACHE_SIZE, 1243 msg = ceph_msg_new(CEPH_MSG_CLIENT_CAPRELEASE, PAGE_CACHE_SIZE,
1243 GFP_NOFS); 1244 GFP_NOFS, false);
1244 if (!msg) 1245 if (!msg)
1245 goto out_unlocked; 1246 goto out_unlocked;
1246 dout("add_cap_releases %p msg %p now %d\n", session, msg, 1247 dout("add_cap_releases %p msg %p now %d\n", session, msg,
@@ -1652,7 +1653,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc,
1652 if (req->r_old_dentry_drop) 1653 if (req->r_old_dentry_drop)
1653 len += req->r_old_dentry->d_name.len; 1654 len += req->r_old_dentry->d_name.len;
1654 1655
1655 msg = ceph_msg_new(CEPH_MSG_CLIENT_REQUEST, len, GFP_NOFS); 1656 msg = ceph_msg_new(CEPH_MSG_CLIENT_REQUEST, len, GFP_NOFS, false);
1656 if (!msg) { 1657 if (!msg) {
1657 msg = ERR_PTR(-ENOMEM); 1658 msg = ERR_PTR(-ENOMEM);
1658 goto out_free2; 1659 goto out_free2;
@@ -2518,7 +2519,7 @@ static void send_mds_reconnect(struct ceph_mds_client *mdsc,
2518 goto fail_nopagelist; 2519 goto fail_nopagelist;
2519 ceph_pagelist_init(pagelist); 2520 ceph_pagelist_init(pagelist);
2520 2521
2521 reply = ceph_msg_new(CEPH_MSG_CLIENT_RECONNECT, 0, GFP_NOFS); 2522 reply = ceph_msg_new(CEPH_MSG_CLIENT_RECONNECT, 0, GFP_NOFS, false);
2522 if (!reply) 2523 if (!reply)
2523 goto fail_nomsg; 2524 goto fail_nomsg;
2524 2525
@@ -2831,7 +2832,7 @@ void ceph_mdsc_lease_send_msg(struct ceph_mds_session *session,
2831 dnamelen = dentry->d_name.len; 2832 dnamelen = dentry->d_name.len;
2832 len += dnamelen; 2833 len += dnamelen;
2833 2834
2834 msg = ceph_msg_new(CEPH_MSG_CLIENT_LEASE, len, GFP_NOFS); 2835 msg = ceph_msg_new(CEPH_MSG_CLIENT_LEASE, len, GFP_NOFS, false);
2835 if (!msg) 2836 if (!msg)
2836 return; 2837 return;
2837 lease = msg->front.iov_base; 2838 lease = msg->front.iov_base;