* [PATCH] Btrfs: don't miss roots in deletion during walking backrefs
@ 2014-01-14 12:36 Wang Shilong
2014-01-15 12:57 ` Wang Shilong
0 siblings, 1 reply; 2+ messages in thread
From: Wang Shilong @ 2014-01-14 12:36 UTC (permalink / raw)
To: linux-btrfs
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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Btrfs: don't miss roots in deletion during walking backrefs
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
0 siblings, 0 replies; 2+ messages in thread
From: Wang Shilong @ 2014-01-15 12:57 UTC (permalink / raw)
To: linux-btrfs
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-15 12:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.