linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: handle balance and replace concurrency
Date: Tue, 15 Jan 2019 18:32:04 +0100	[thread overview]
Message-ID: <20190115173204.GJ2900@twin.jikos.cz> (raw)
In-Reply-To: <1545148904-32714-1-git-send-email-anand.jain@oracle.com>

On Wed, Dec 19, 2018 at 12:01:44AM +0800, Anand Jain wrote:
> Test case:
> Run replace
>  btrfs repl start -B -f /dev/sdd /dev/sdb /btrfs;
> while replace is still running, from another terminal try to start
> balance
>  btrfs bal start  --full-balance /btrfs; echo ...:$?
>  Done, had to relocate 0 out of 0 chunks
>  ...:0
> 
> which fails to report that balance failed to relocate because another
> exclusive operation is running.
> In fact kernel ioctl BTRFS_IOC_BALANCE(_V2) does return error code 8,
> but progs recast it to 0. Fix it by checking for the error code > 0.
> 
> After:
>  btrfs bal start --full-balance /btrfs; echo ...:$?
>  ERROR: balance: add/delete/balance/replace/resize operation in progress
>  ...:8
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Applied, thanks.

      reply	other threads:[~2019-01-15 17:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18 16:01 [PATCH] btrfs-progs: handle balance and replace concurrency Anand Jain
2019-01-15 17:32 ` David Sterba [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=20190115173204.GJ2900@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).