All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Durgin <josh.durgin@inktank.com>
To: Alex Elder <elder@inktank.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: [PATCH] rbd: ignore zero-overlap parent
Date: Sat, 11 May 2013 12:29:28 -0700	[thread overview]
Message-ID: <518E9C18.5050205@inktank.com> (raw)
In-Reply-To: <518E8203.6050308@inktank.com>

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

On 05/11/2013 10:38 AM, Alex Elder wrote:
> An rbd clone image that has an overlap with its parent of 0 is
> effectively not a layered image at all.  Detect this case and treat
> such an image as non-layered.  Issue a warning to be sure the user
> knows what's going on.
>
> This resolves:
>      http://tracker.ceph.com/issues/5028
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>   drivers/block/rbd.c |   10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index b9221a0..3a8135f 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -3655,9 +3655,13 @@ static int rbd_dev_v2_parent_info(struct
> rbd_device *rbd_dev)
>   	ceph_decode_64_safe(&p, end, parent_spec->snap_id, out_err);
>   	ceph_decode_64_safe(&p, end, overlap, out_err);
>
> -	rbd_dev->parent_overlap = overlap;
> -	rbd_dev->parent_spec = parent_spec;
> -	parent_spec = NULL;	/* rbd_dev now owns this */
> +	if (overlap) {
> +		rbd_dev->parent_spec = parent_spec;
> +		parent_spec = NULL;	/* rbd_dev now owns this */
> +		rbd_dev->parent_overlap = overlap;
> +	} else {
> +		rbd_warn(rbd_dev, "ignoring parent of clone with overlap 0\n");
> +	}
>   out:
>   	ret = 0;
>   out_err:
>


      reply	other threads:[~2013-05-11 19:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-11 17:38 [PATCH] rbd: ignore zero-overlap parent Alex Elder
2013-05-11 19:29 ` Josh Durgin [this message]

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=518E9C18.5050205@inktank.com \
    --to=josh.durgin@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=elder@inktank.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.