5fbc7c59fd22c5a6531b40b0759624b680a95e52 ubuntu_btrfs_kernel_fixes btrfs scrub fails with n/fips
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-kernel-tests |
New
|
Undecided
|
Unassigned |
Bug Description
This issue can be found on noble/fips since version 6.8.0-31.31+fips3 from the d2024.02.29 cycle on openstack instances.
We get the following output:
Invoking test 5fbc7c59fd22c5a
fix 5fbc7c59fd22c5a
Btrfs: fix unfinished readahead thread for raid5/6 degraded mounting
Steps to reproduce:
# mkfs.btrfs -f /dev/sd[b-f] -m raid5 -d raid5
# mkfs.ext4 /dev/sdc --->corrupt one of btrfs device
# mount /dev/sdb /mnt -o degraded
# btrfs scrub start -BRd /mnt
This is because readahead would skip missing device, this is not true
for RAID5/6, because REQ_GET_
mapping. If expected data locates in missing device, readahead thread
would not call __readahead_hook() which makes event @rc->elems=0
wait forever.
Fix this problem by checking return value of btrfs_map_
can only skip missing device safely if there are several mirrors.
mke2fs 1.47.0 (5-Feb-2023)
Discarding device blocks: 0/524288 done
Creating filesystem with 524288 4k blocks and 131072 inodes
Filesystem UUID: 118d4e8c-
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: 0/16 done
Writing inode tables: 0/16 done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: 0/16 done
WARNING: device 2 not present
ERROR: scrubbing /tmp/mnt-
Starting scrub on devid 1
Starting scrub on devid 2
Starting scrub on devid 3
Starting scrub on devid 4
Starting scrub on devid 5
Scrub device /dev/loop0 (id 1) done
Scrub started: Mon Jul 22 08:14:55 2024
Status: finished
Duration: 0:00:00
data_
tree_
data_
tree_
read_errors: 0
csum_errors: 0
verify_errors: 0
no_csum: 0
csum_discards: 0
super_errors: 0
malloc_errors: 0
uncorrectab
unverified_
corrected_
last_physical: 293732352
Scrub device (id 2) canceled
Scrub started: Mon Jul 22 08:14:55 2024
Status: aborted
Duration: 0:00:00
data_
tree_
data_
tree_
read_errors: 0
csum_errors: 0
verify_errors: 0
no_csum: 0
csum_discards: 0
super_errors: 0
malloc_errors: 0
uncorrectab
unverified_
corrected_
last_physical: 0
Scrub device /dev/loop2 (id 3) done
Scrub started: Mon Jul 22 08:14:55 2024
Status: finished
Duration: 0:00:00
data_
tree_
data_
tree_
read_errors: 0
csum_errors: 0
verify_errors: 0
no_csum: 0
csum_discards: 0
super_errors: 0
malloc_errors: 0
uncorrectab
unverified_
corrected_
last_physical: 272760832
Scrub device /dev/loop3 (id 4) done
Scrub started: Mon Jul 22 08:14:55 2024
Status: finished
Duration: 0:00:00
data_
tree_
data_
tree_
read_errors: 0
csum_errors: 0
verify_errors: 0
no_csum: 0
csum_discards: 0
super_errors: 0
malloc_errors: 0
uncorrectab
unverified_
corrected_
last_physical: 272760832
Scrub device /dev/loop4 (id 5) canceled
Scrub started: Mon Jul 22 08:14:55 2024
Status: aborted
Duration: 0:00:00
data_
tree_
data_
tree_
read_errors: 0
csum_errors: 0
verify_errors: 0
no_csum: 0
csum_discards: 0
super_errors: 0
malloc_errors: 0
uncorrectab
unverified_
corrected_
last_physical: 0
btrfs scrub start on /tmp/mnt-
FAIL: 5fbc7c59fd22c5a
---
LP: #2037064 reports failures with the same testcase, but the error messages are different.