On 8/31/25 8:07 PM, Qu Wenruo wrote:
Hi,
Recently generic/563 is failing on btrfs and ext4, and it turns out the
losetup inside _create_loop_device_like_bdev() is not properly creating
a valid loopback device if a block device file is passed in:
E.g:
# lsblk /dev/test/scratch1
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
test-scratch1 253:2 0 10G 0 lvm
# losetup -f --show /dev/test/scratch1
/dev/loop0
# lsblk /dev/loop0
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 0B 0 loop
Thus all filesystems, not only btrfs is affected.
This looks like a regression in loopback device size handling.
What should we as the next step? Waiting for loopback fix or start using
files inside TEST_MNT as a workaround?
This looks like it might be the same thing that Lennart references here:
https://lore.kernel.org/linux-block/1182267c-d291-47bc-8e5f-2e11aa93421b@xxxxxxxxx/
Which should be fixed in -rc4 according to that email.
Hope this helps;
Sweet Tea