linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Filipe David Manana <fdmanana@gmail.com>
To: Wang Shilong <wangshilong1991@gmail.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: fix wrong check for btrfs_force_chunk_alloc()
Date: Tue, 30 Jun 2015 23:25:04 +0100	[thread overview]
Message-ID: <CAL3q7H56kXw3KZ3bOkm71O1wGxxuWBsuZmM73XmSPGMAhp8haQ@mail.gmail.com> (raw)
In-Reply-To: <552A1228.4090700@gmail.com>

On Sun, Apr 12, 2015 at 7:35 AM, Wang Shilong <wangshilong1991@gmail.com> wrote:
> btrfs_force_chunk_alloc() return 1 for allocation chunk successfully.
> This problem exists since commit c87f08ca4.
>
> With this patch, we might fix some enospc problems for balances.
>
> Signed-off-by: Wang Shilong <wangshilong1991@gmail.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Tested-by: Filipe Manana <fdmanana@suse.com>

> ---
>  fs/btrfs/relocation.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
> index d830853..c453464 100644
> --- a/fs/btrfs/relocation.c
> +++ b/fs/btrfs/relocation.c
> @@ -4037,7 +4037,7 @@ restart:
>         if (trans && progress && err == -ENOSPC) {
>                 ret = btrfs_force_chunk_alloc(trans, rc->extent_root,
>                                               rc->block_group->flags);
> -               if (ret == 0) {
> +               if (ret == 1) {
>                         err = 0;
>                         progress = 0;
>                         goto restart;
> --
> 1.7.12.4
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

  reply	other threads:[~2015-06-30 22:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-12  6:35 [PATCH] Btrfs: fix wrong check for btrfs_force_chunk_alloc() Wang Shilong
2015-06-30 22:25 ` Filipe David Manana [this message]
2015-07-01  2:49   ` Wang Shilong

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=CAL3q7H56kXw3KZ3bOkm71O1wGxxuWBsuZmM73XmSPGMAhp8haQ@mail.gmail.com \
    --to=fdmanana@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wangshilong1991@gmail.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;
as well as URLs for NNTP newsgroup(s).