All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: don't miss roots in deletion during walking backrefs
Date: Wed, 15 Jan 2014 20:57:23 +0800	[thread overview]
Message-ID: <52D685B3.3080103@cn.fujitsu.com> (raw)
In-Reply-To: <1389703008-1781-1-git-send-email-wangsl.fnst@cn.fujitsu.com>

Please ignore this patch, there is still a race condition between
root deletion and walking backrefs, i will send them together later!

Thanks,
Wang
On 01/14/2014 08:36 PM, Wang Shilong wrote:
> btrfs_read_fs_root_no_name() will check its root refs, and will
> return us ENOENT if this root in deletion.
>
> However, in some case, for example qgroup, we still need to track
> those roots, fix it.
>
> Signed-off-by: Wang Shilong<wangsl.fnst@cn.fujitsu.com>
> ---
>   fs/btrfs/backref.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
> index 835b6c9..ec4a1d2 100644
> --- a/fs/btrfs/backref.c
> +++ b/fs/btrfs/backref.c
> @@ -303,7 +303,7 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,
>   	root_key.objectid = ref->root_id;
>   	root_key.type = BTRFS_ROOT_ITEM_KEY;
>   	root_key.offset = (u64)-1;
> -	root = btrfs_read_fs_root_no_name(fs_info, &root_key);
> +	root = btrfs_get_fs_root(fs_info, &root_key, false);
>   	if (IS_ERR(root)) {
>   		ret = PTR_ERR(root);
>   		goto out;


      reply	other threads:[~2014-01-15 12:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 12:36 [PATCH] Btrfs: don't miss roots in deletion during walking backrefs Wang Shilong
2014-01-15 12:57 ` Wang Shilong [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=52D685B3.3080103@cn.fujitsu.com \
    --to=wangsl.fnst@cn.fujitsu.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 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.