summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRakesh Pandit <rakesh@tuxera.com>2014-04-19 02:13:55 +0300
committerDavid Sterba <dsterba@suse.cz>2014-05-02 17:03:27 +0200
commit275fd93826bdd1f20e34f2a0fe6d8a3f03767908 (patch)
treebaeefe95d714fbcd90c652922e1d25a558422ab6
parent1e6195885baa1d3aea7b75c6fb752ce293e1b936 (diff)
Btrfs-progs: fsck: while checking root refs print readable errors
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> Signed-off-by: David Sterba <dsterba@suse.cz>
-rw-r--r--cmds-check.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmds-check.c b/cmds-check.c
index d195e7a4..3e089128 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -1605,7 +1605,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,
@@ -1881,12 +1881,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;