All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs-progs: fsck: fix wrong return value in check_block()
@ 2014-02-24 11:55 Wang Shilong
  2014-02-24 23:03 ` Mitch Harder
  0 siblings, 1 reply; 5+ messages in thread
From: Wang Shilong @ 2014-02-24 11:55 UTC (permalink / raw)
  To: linux-btrfs

We found btrfsck will output backrefs mismatch while the filesystem
is defenitely ok.

The problem is that check_block() don't return right value,which
makes btrfsck won't walk all tree blocks thus we don't get a consistent
filesystem, we will fail to check extent refs etc.

Reported-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
---
 cmds-check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmds-check.c b/cmds-check.c
index a2afae6..253569f 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -2477,7 +2477,7 @@ static int check_block(struct btrfs_trans_handle *trans,
 	struct cache_extent *cache;
 	struct btrfs_key key;
 	enum btrfs_tree_block_status status;
-	int ret = 1;
+	int ret = 0;
 	int level;
 
 	cache = lookup_cache_extent(extent_cache, buf->start, buf->len);
-- 
1.9.0


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

end of thread, other threads:[~2014-02-26  1:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-24 11:55 [PATCH] Btrfs-progs: fsck: fix wrong return value in check_block() Wang Shilong
2014-02-24 23:03 ` Mitch Harder
2014-02-25  1:38   ` Wang Shilong
2014-02-25 21:39     ` Mitch Harder
2014-02-26  1:19       ` 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.