mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-16 17:56:51 +00:00
btrfs-progs: dump-super: improve error message on failed read
Add more error information to help debugging: $ ./btrfs inspect-internal dump-super -Ffa /dev/vdb10 Before: ERROR: failed to read the superblock on /dev/vdb10 at 274877906944 After: ERROR: failed to read the superblock on /dev/vdb10 at 274877906944 read 0/4096 bytes Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
b51117d68e
commit
4ab083175a
@ -41,7 +41,8 @@ static int load_and_dump_sb(char *filename, int fd, u64 sb_bytenr, int full,
|
||||
if (ret == 0 && errno == 0)
|
||||
return 0;
|
||||
|
||||
error("failed to read the superblock on %s at %llu", filename, sb_bytenr);
|
||||
error("failed to read the superblock on %s at %llu read %llu/%d bytes",
|
||||
filename, sb_bytenr, ret, BTRFS_SUPER_INFO_SIZE);
|
||||
error("error = '%m', errno = %d", errno);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user