linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Btrfs: do not use extent commit root for sending
@ 2014-01-14 16:26 Wang Shilong
  2014-01-14 16:26 ` [PATCH] Btrfs: fix wrong search path initialization before searching tree root Wang Shilong
  2014-01-28 14:37 ` [PATCH v2] Btrfs: do not use extent commit root for sending Josef Bacik
  0 siblings, 2 replies; 4+ messages in thread
From: Wang Shilong @ 2014-01-14 16:26 UTC (permalink / raw)
  To: linux-btrfs

From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>

Now we have kicked off transaction from btrfs send, it is not safe
that we use extent commit root to search.

I happended to catch this problem when running sending and snapshot
in my desktop.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
---
Changelog v1->v2:
	extent_from_logical() also search extent tree, we should also
	take care of that part.
---
 fs/btrfs/send.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 591063d..54665d4 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -1142,7 +1142,7 @@ static int find_extent_clone(struct send_ctx *sctx,
 	int compressed;
 	u32 i;
 
-	tmp_path = alloc_path_for_send();
+	tmp_path = btrfs_alloc_path();
 	if (!tmp_path)
 		return -ENOMEM;
 
@@ -1225,7 +1225,7 @@ static int find_extent_clone(struct send_ctx *sctx,
 
 	extent_item_pos = logical - found_key.objectid;
 	ret = iterate_extent_inodes(sctx->send_root->fs_info,
-					found_key.objectid, extent_item_pos, 1,
+					found_key.objectid, extent_item_pos, 0,
 					__iterate_backrefs, backref_ctx);
 
 	if (ret < 0)
-- 
1.8.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-28 15:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14 16:26 [PATCH v2] Btrfs: do not use extent commit root for sending Wang Shilong
2014-01-14 16:26 ` [PATCH] Btrfs: fix wrong search path initialization before searching tree root Wang Shilong
2014-01-28 14:37 ` [PATCH v2] Btrfs: do not use extent commit root for sending Josef Bacik
2014-01-28 15:04   ` Wang Shilong

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).