Bug#1043079: btrfs filesystem usage errors out on 6.1 kernel (?)

2023-08-05 Thread Uwe Kleine-König

Hello,

On 8/5/23 22:30, Uwe Kleine-König wrote:

Package: btrfs-progs
Version: 6.2-1
Severity: normal
X-Debbugs-Cc: uklei...@debian.org

Hello,

root@crater:~# btrfs fi us /srv
ERROR: unexpected number of devices: 0 != 1
ERROR: cannot get space info on '/srv': No such file or directory

running above command under strace, it ends with:

ioctl(3, BTRFS_IOC_FS_INFO, {max_id=1, num_devices=1, 
fsid=fa02b5e9-5456-48fe-b8a6-a67252d798af, nodesize=16384, sectorsize=4096, 
clone_alignment=4096, flags=0}) = 0
ioctl(3, BTRFS_IOC_DEV_INFO, {devid=makedev(0, 0)}) = -1 ENODEV (No 
such device)
ioctl(3, BTRFS_IOC_DEV_INFO, {devid=makedev(0, 0x1)} => 
{uuid=65b29ebe-fd15-4f0a-bc13-530741e65d32, bytes_used=1662227841024, 
total_bytes=199336448, path="/dev/sda1"}) = 0
ioctl(3, BTRFS_IOC_FS_INFO, {max_id=1, num_devices=1, 
fsid=fa02b5e9-5456-48fe-b8a6-a67252d798af, nodesize=16384, sectorsize=4096, 
clone_alignment=4096, flags=0}) = 0
openat(AT_FDCWD, 
"/sys/fs/btrfs/fa02b5e9-5456-48fe-b8a6-a67252d798af/devinfo/1/fsid", 
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
write(2, "ERROR: ", 7)  = 7
write(2, "unexpected number of devices: 0 "..., 36) = 36
write(2, "\n", 1)   = 1
ioctl(3, BTRFS_IOC_SPACE_INFO, {space_slots=0} => {total_spaces=4}) = 0
ioctl(3, BTRFS_IOC_SPACE_INFO, {space_slots=4} => {total_spaces=4, 
...}) = 0
write(2, "ERROR: ", 7)  = 7
write(2, "cannot get space info on '/srv':"..., 58) = 58
write(2, "\n", 1)   = 1
close(3)= 0
exit_group(1)   = ?
+++ exited with 1 +++

The directory
/sys/fs/btrfs/fa02b5e9-5456-48fe-b8a6-a67252d798af/devinfo/1/ exists,
but it only contains the following files:

in_fs_metadata
missing
replace_target
writeable

I suspect btrfs-progs 6.2 depend on a newer kernel than the one in
Debian stable? Or maybe a kernel switch is missing?

Note that btrfs 5.10.1-2 from bullseye works fine:

root@crater:~# btrfs-5.10.1-2 fi us /srv
Overall:
Device size:   1.82TiB
Device allocated:  1.51TiB
Device unallocated:  314.57GiB
Device missing:  0.00B
Used:  1.47TiB
Free (estimated):347.22GiB  (min: 189.93GiB)
Free (statfs, df):   347.21GiB
Data ratio:   1.00
Metadata ratio:   2.00
Global reserve:  512.00MiB  (used: 0.00B)
Multiple profiles:  no

Data,single: Size:1.50TiB, Used:1.46TiB (97.87%)
   /dev/sda1   1.50TiB

Metadata,DUP: Size:8.00GiB, Used:5.73GiB (71.65%)
   /dev/sda1  16.00GiB

System,DUP: Size:32.00MiB, Used:192.00KiB (0.59%)
   /dev/sda1  64.00MiB

Unallocated:
   /dev/sda1 314.57GiB


As expressed in the Subject line I thought I run a 6.1 kernel, but 
indeed I will still on 5.10 from bullseye :-\. Booting a 6.1 kernel made 
btrfs fi us work as expected.


So this is not as worse as I thought, but maybe still cherry-pick 
https://github.com/kdave/btrfs-progs/commit/8e11c0726976797e1c2c2fe93011038722c56a22 
for stable?


Best regards
Uwe



Bug#1043079: btrfs filesystem usage errors out on 6.1 kernel (?)

2023-08-05 Thread Uwe Kleine-König
Package: btrfs-progs
Version: 6.2-1
Severity: normal
X-Debbugs-Cc: uklei...@debian.org

Hello,

root@crater:~# btrfs fi us /srv
ERROR: unexpected number of devices: 0 != 1
ERROR: cannot get space info on '/srv': No such file or directory

running above command under strace, it ends with:

ioctl(3, BTRFS_IOC_FS_INFO, {max_id=1, num_devices=1, 
fsid=fa02b5e9-5456-48fe-b8a6-a67252d798af, nodesize=16384, sectorsize=4096, 
clone_alignment=4096, flags=0}) = 0
ioctl(3, BTRFS_IOC_DEV_INFO, {devid=makedev(0, 0)}) = -1 ENODEV (No 
such device)
ioctl(3, BTRFS_IOC_DEV_INFO, {devid=makedev(0, 0x1)} => 
{uuid=65b29ebe-fd15-4f0a-bc13-530741e65d32, bytes_used=1662227841024, 
total_bytes=199336448, path="/dev/sda1"}) = 0
ioctl(3, BTRFS_IOC_FS_INFO, {max_id=1, num_devices=1, 
fsid=fa02b5e9-5456-48fe-b8a6-a67252d798af, nodesize=16384, sectorsize=4096, 
clone_alignment=4096, flags=0}) = 0
openat(AT_FDCWD, 
"/sys/fs/btrfs/fa02b5e9-5456-48fe-b8a6-a67252d798af/devinfo/1/fsid", 
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
write(2, "ERROR: ", 7)  = 7
write(2, "unexpected number of devices: 0 "..., 36) = 36
write(2, "\n", 1)   = 1
ioctl(3, BTRFS_IOC_SPACE_INFO, {space_slots=0} => {total_spaces=4}) = 0
ioctl(3, BTRFS_IOC_SPACE_INFO, {space_slots=4} => {total_spaces=4, 
...}) = 0
write(2, "ERROR: ", 7)  = 7
write(2, "cannot get space info on '/srv':"..., 58) = 58
write(2, "\n", 1)   = 1
close(3)= 0
exit_group(1)   = ?
+++ exited with 1 +++

The directory
/sys/fs/btrfs/fa02b5e9-5456-48fe-b8a6-a67252d798af/devinfo/1/ exists,
but it only contains the following files:

in_fs_metadata
missing
replace_target
writeable

I suspect btrfs-progs 6.2 depend on a newer kernel than the one in
Debian stable? Or maybe a kernel switch is missing?

Note that btrfs 5.10.1-2 from bullseye works fine:

root@crater:~# btrfs-5.10.1-2 fi us /srv
Overall:
Device size:   1.82TiB
Device allocated:  1.51TiB
Device unallocated:  314.57GiB
Device missing:  0.00B
Used:  1.47TiB
Free (estimated):347.22GiB  (min: 189.93GiB)
Free (statfs, df):   347.21GiB
Data ratio:   1.00
Metadata ratio:   2.00
Global reserve:  512.00MiB  (used: 0.00B)
Multiple profiles:  no

Data,single: Size:1.50TiB, Used:1.46TiB (97.87%)
   /dev/sda1   1.50TiB

Metadata,DUP: Size:8.00GiB, Used:5.73GiB (71.65%)
   /dev/sda1  16.00GiB

System,DUP: Size:32.00MiB, Used:192.00KiB (0.59%)
   /dev/sda1  64.00MiB

Unallocated:
   /dev/sda1 314.57GiB

Best regards
Uwe

-- System Information:
Debian Release: 12.1
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable-debug'), (500, 
'oldstable-updates'), (500, 'oldstable-security'), (500, 'stable'), (500, 
'oldstable')
Architecture: armhf (armv7l)

Kernel: Linux 5.10.0-22-armmp (SMP w/1 CPU thread)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages btrfs-progs depends on:
ii  libblkid12.38.1-5+b1
ii  libc62.36-9+deb12u1
ii  libcom-err2  1.47.0-2
ii  libext2fs2   1.47.0-2
ii  liblzo2-22.10-2
ii  libudev1 252.12-1~deb12u1
ii  libuuid1 2.38.1-5+b1
ii  libzstd1 1.5.4+dfsg2-5
ii  zlib1g   1:1.2.13.dfsg-1

btrfs-progs recommends no packages.

Versions of packages btrfs-progs suggests:
pn  duperemove  

-- no debconf information