linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Btrfs-progs: fsck: while checking root refs print readable errors
@ 2014-04-18 23:13 Rakesh Pandit
  0 siblings, 0 replies; only message in thread
From: Rakesh Pandit @ 2014-04-18 23:13 UTC (permalink / raw)
  To: linux-btrfs

Lets use "errors" instead of "error" because more then one ref errors
are possible. Also print error messages for unresolved refs in
check_root_refs.

Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
---
 cmds-check.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cmds-check.c b/cmds-check.c
index 93f9ae6..6ea8c68 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -1610,7 +1610,7 @@ static int check_inode_recs(struct btrfs_root *root,
 			if (!backref->found_inode_ref)
 				backref->errors |= REF_ERR_NO_INODE_REF;
 			fprintf(stderr, "\tunresolved ref dir %llu index %llu"
-				" namelen %u name %s filetype %d error %x",
+				" namelen %u name %s filetype %d errors %x",
 				(unsigned long long)backref->dir,
 				(unsigned long long)backref->index,
 				backref->namelen, backref->name,
@@ -1886,12 +1886,13 @@ static int check_root_refs(struct btrfs_root *root,
 			if (!backref->errors && rec->found_root_item)
 				continue;
 			fprintf(stderr, "\tunresolved ref root %llu dir %llu"
-				" index %llu namelen %u name %s error %x\n",
+				" index %llu namelen %u name %s errors %x\n",
 				(unsigned long long)backref->ref_root,
 				(unsigned long long)backref->dir,
 				(unsigned long long)backref->index,
 				backref->namelen, backref->name,
 				backref->errors);
+			print_ref_error(backref->errors);
 		}
 	}
 	return errors > 0 ? 1 : 0;
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-18 23:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18 23:13 [PATCH 1/2] Btrfs-progs: fsck: while checking root refs print readable errors Rakesh Pandit

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