All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org, bo.li.liu@oracle.com
Subject: Re: [PATCH v2 2/5] btrfs: scrub: Fix RAID56 recovery race condition
Date: Mon, 27 Mar 2017 18:47:27 +0200	[thread overview]
Message-ID: <20170327164727.GJ4781@twin.jikos.cz> (raw)
In-Reply-To: <20170324020027.21228-3-quwenruo@cn.fujitsu.com>

On Fri, Mar 24, 2017 at 10:00:24AM +0800, Qu Wenruo wrote:
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -1065,6 +1065,7 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check)
>  	unsigned int have_csum;
>  	struct scrub_block *sblocks_for_recheck; /* holds one for each mirror */
>  	struct scrub_block *sblock_bad;
> +	int lock_ret;

No need to introduce another variable, just use 'ret'.

>  	int ret;
>  	int mirror_index;
>  	int page_num;
> @@ -1428,6 +1440,9 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check)
>  		kfree(sblocks_for_recheck);
>  	}
>  
> +	lock_ret = unlock_full_stripe(fs_info, logical);
> +	if (lock_ret < 0)
> +		return lock_ret;
>  	return 0;

Here.

  reply	other threads:[~2017-03-27 16:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24  2:00 [PATCH v2 0/5] raid56: scrub related fixes Qu Wenruo
2017-03-24  2:00 ` [PATCH v2 1/5] btrfs: scrub: Introduce full stripe lock for RAID56 Qu Wenruo
2017-03-27 16:38   ` David Sterba
2017-03-28  6:24     ` Qu Wenruo
2017-03-24  2:00 ` [PATCH v2 2/5] btrfs: scrub: Fix RAID56 recovery race condition Qu Wenruo
2017-03-27 16:47   ` David Sterba [this message]
2017-03-24  2:00 ` [PATCH v2 3/5] btrfs: scrub: Don't append on-disk pages for raid56 scrub Qu Wenruo
2017-03-24 22:06   ` Liu Bo
2017-03-24  2:00 ` [PATCH v2 4/5] btrfs: dev-replace: Wait flighting bio before removing target device Qu Wenruo
2017-03-24  2:00 ` [PATCH v2 5/5] btrfs: raid56: Use bio_counter to protect scrub Qu Wenruo
2017-03-24 23:21   ` Liu Bo
2017-03-27  1:37     ` Qu Wenruo

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=20170327164727.GJ4781@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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.