CEPH filesystem development
 help / color / mirror / Atom feed
From: Alex Elder <elder@ieee.org>
To: Ilya Dryomov <ilya.dryomov@inktank.com>, ceph-devel@vger.kernel.org
Cc: Olivier Bonvalet <ceph.list@daevel.fr>
Subject: Re: [PATCH] rbd: assert next_completion under completion_lock
Date: Tue, 25 Mar 2014 10:25:12 -0500	[thread overview]
Message-ID: <53319FD8.9020200@ieee.org> (raw)
In-Reply-To: <1395755268-11908-1-git-send-email-ilya.dryomov@inktank.com>

On 03/25/2014 08:47 AM, Ilya Dryomov wrote:
> completion_lock is there specifically to protect next_completion.
> 
> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>

Reviewed-by: Alex Elder <elder@linaro.org>

> ---
>  drivers/block/rbd.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index fbf41e058bfd..f044fab3da99 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -2123,12 +2123,12 @@ static void rbd_img_obj_callback(struct rbd_obj_request *obj_request)
>  	rbd_assert(img_request->obj_request_count > 0);
>  	rbd_assert(which != BAD_WHICH);
>  	rbd_assert(which < img_request->obj_request_count);
> -	rbd_assert(which >= img_request->next_completion);
>  
>  	spin_lock_irq(&img_request->completion_lock);
> -	if (which != img_request->next_completion)
> +	if (which > img_request->next_completion)
>  		goto out;
>  
> +	rbd_assert(which == img_request->next_completion);
>  	for_each_obj_request_from(img_request, obj_request) {
>  		rbd_assert(more);
>  		rbd_assert(which < img_request->obj_request_count);
> 


      reply	other threads:[~2014-03-25 15:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25 13:47 [PATCH] rbd: assert next_completion under completion_lock Ilya Dryomov
2014-03-25 15:25 ` Alex Elder [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=53319FD8.9020200@ieee.org \
    --to=elder@ieee.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=ceph.list@daevel.fr \
    --cc=ilya.dryomov@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox