mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-15 18:20:58 +00:00
82a9870d48
On aarch64 systems with glibc 2.28, several btrfs-progs test cases are failing because the command 'btrfs inspect dump-super -a <dev>' reports an error when it attempts to read beyond the disk/file-image size. $ btrfs inspect dump-super -a /dev/vdb12 <snap> ERROR: Failed to read the superblock on /dev/vdb12 at 274877906944 And btrfs/184 also fails, as it uses -s 2 option to dump the last super block. $ ./check btrfs/184 FSTYP -- btrfs PLATFORM -- Linux/aarch64 a4k 6.4.0-rc7+ #7 SMP PREEMPT Sat Jun 24 02:47:24 EDT 2023 MKFS_OPTIONS -- /dev/vdb2 MOUNT_OPTIONS -- /dev/vdb2 /mnt/scratch btrfs/184 1s ... [failed, exit status 1]- output mismatch (see /Volumes/ws/xfstests-dev/results//btrfs/184.out.bad) --- tests/btrfs/184.out 2020-03-03 00:26:40.172081468 -0500 +++ /Volumes/ws/xfstests-dev/results//btrfs/184.out.bad 2023-06-24 05:54:40.868210737 -0400 @@ -1,2 +1,3 @@ QA output created by 184 -Silence is golden +Deleted dev superblocks not scratched +(see /Volumes/ws/xfstests-dev/results//btrfs/184.full for details) ... (Run 'diff -u /Volumes/ws/xfstests-dev/tests/btrfs/184.out /Volumes/ws/xfstests-dev/results//btrfs/184.out.bad' to see the entire diff) Ran: btrfs/184 Failures: btrfs/184 Failed 1 of 1 tests This is because `pread()` behaves differently on aarch64 and sets `errno = 2` instead of the usual `errno = 0`. To fix check if the sb offset is beyond the device size or regular file size and skip the corresponding sbread(). Also, move putchar('\n') after a successful call to load_and_dump_sb() to the load_and_dump_sb() itself. Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
balance.c | ||
commands.h | ||
device.c | ||
filesystem-du.c | ||
filesystem-usage.c | ||
filesystem-usage.h | ||
filesystem.c | ||
inspect-dump-super.c | ||
inspect-dump-tree.c | ||
inspect-tree-stats.c | ||
inspect.c | ||
property.c | ||
props.h | ||
qgroup.c | ||
qgroup.h | ||
quota.c | ||
receive-dump.c | ||
receive-dump.h | ||
receive.c | ||
reflink.c | ||
replace.c | ||
rescue-chunk-recover.c | ||
rescue-super-recover.c | ||
rescue.c | ||
rescue.h | ||
restore.c | ||
scrub.c | ||
send.c | ||
subvolume-list.c | ||
subvolume.c |