All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <mchristi@redhat.com>
To: Douglas Fuller <dfuller@redhat.com>, ceph-devel@vger.kernel.org
Subject: Re: [PATCHv2 5/6] osd_client: add support for notify payloads via notify event
Date: Mon, 22 Jun 2015 19:20:56 -0500	[thread overview]
Message-ID: <5588A668.5060101@redhat.com> (raw)
In-Reply-To: <c486ba353fea150db8bc78b9ad03f07f03882b46.1434550968.git.dfuller@redhat.com>

On 06/17/2015 09:25 AM, Douglas Fuller wrote:
>  
> @@ -3055,12 +3151,33 @@ static struct ceph_msg *alloc_msg(struct ceph_connection *con,
>  	struct ceph_osd *osd = con->private;
>  	int type = le16_to_cpu(hdr->type);
>  	int front = le32_to_cpu(hdr->front_len);
> +	struct ceph_msg *m;
> +	size_t len = con->in_hdr.data_len;
>  
>  	*skip = 0;
>  	switch (type) {
>  	case CEPH_MSG_OSD_MAP:
>  	case CEPH_MSG_WATCH_NOTIFY:
> -		return ceph_msg_new(type, front, GFP_NOFS, false);
> +		m = ceph_msg_new(type, front, GFP_NOFS, false);
> +		if (!m)
> +			goto out;
> +
> +		if (len > 0) {
> +			struct page **pages;
> +			struct ceph_osd_data osd_data;
> +			pages = ceph_alloc_page_vector(
> +				      calc_pages_for(0, len), GFP_NOFS);
> +			if (!pages)
> +				goto out2;
> +			osd_data.type = CEPH_OSD_DATA_TYPE_PAGES;

Sorry for the late comment. ceph_alloc_page_vector uses ERR_PTR, so the
above check should be

if (IS_ERR(pages))
	goto out2;
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in

  parent reply	other threads:[~2015-06-23  0:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 14:25 [PATCHv2 0/6] support watch/notify version 2 Douglas Fuller
2015-06-17 14:25 ` [PATCHv2 1/6] ceph/rbd: add support for watch notify payloads Douglas Fuller
2015-06-17 14:25 ` [PATCHv2 2/6] ceph/rbd: add support for header version 2 and 3 Douglas Fuller
2015-06-17 14:25 ` [PATCHv2 3/6] ceph/rbd: update watch-notify ceph_osd_op Douglas Fuller
2015-06-17 14:25 ` [PATCHv2 4/6] osd_client, rbd: update event interface for watch/notify2 Douglas Fuller
2016-02-11 17:51   ` David Disseldorp
2015-06-17 14:25 ` [PATCHv2 5/6] osd_client: add support for notify payloads via notify event Douglas Fuller
2015-06-17 16:11   ` Mike Christie
2015-06-17 17:07     ` Douglas Fuller
2015-06-23  0:20   ` Mike Christie [this message]
2015-06-17 14:25 ` [PATCHv2 6/6] osd_client: send watch ping messages Douglas Fuller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5588A668.5060101@redhat.com \
    --to=mchristi@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=dfuller@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.