Bug#1069744: btrfs-progs: btrfs dev usa as non-root is wrong in every way and should just give an error

2024-06-24 Thread Nicholas D Steeves
Hi Russell,

On Wed, 24 Apr 2024 08:03:59 +1000 Russell Coker  wrote:
> Package: btrfs-progs
> Version: 6.6.3-1.1+b2
> Severity: normal
> Tags: upstream
> 
> Below is an example of comparing btrfs dev usa as root and non-root.  When
> run as non-root it is wrong in every way, there is not a single correct
> value.  I've done this on my laptop (single device) and on a server with 3
> devices and the results were similarly wrong.
> 
> Instead of providing information that is wrong and misleading it should
> just give an error and say that it needs root permissions.
> 
> # btrfs dev usa /
> /dev/mapper/root, ID: 1
>Device size:   476.37GiB
>Device slack:1.50KiB
>Data,single:   170.01GiB
>Metadata,DUP:6.00GiB
>System,DUP: 64.00MiB
>Unallocated:   300.29GiB
> 
> $ btrfs dev usa /
> WARNING: cannot read detailed chunk info, per-device usage will not be shown, 
> run as root
> /dev/mapper/root, ID: 1
>Device size:   952.73MiB
>Device slack:   16.00EiB
>Unallocated:   476.37GiB

I agree 100%.  Would you please forward this upstream?

Regards,
Nicholas


signature.asc
Description: PGP signature


Bug#1069744: btrfs-progs: btrfs dev usa as non-root is wrong in every way and should just give an error

2024-04-23 Thread Russell Coker
Package: btrfs-progs
Version: 6.6.3-1.1+b2
Severity: normal
Tags: upstream

Below is an example of comparing btrfs dev usa as root and non-root.  When
run as non-root it is wrong in every way, there is not a single correct
value.  I've done this on my laptop (single device) and on a server with 3
devices and the results were similarly wrong.

Instead of providing information that is wrong and misleading it should
just give an error and say that it needs root permissions.

# btrfs dev usa /
/dev/mapper/root, ID: 1
   Device size:   476.37GiB
   Device slack:1.50KiB
   Data,single:   170.01GiB
   Metadata,DUP:6.00GiB
   System,DUP: 64.00MiB
   Unallocated:   300.29GiB

$ btrfs dev usa /
WARNING: cannot read detailed chunk info, per-device usage will not be shown, 
run as root
/dev/mapper/root, ID: 1
   Device size:   952.73MiB
   Device slack:   16.00EiB
   Unallocated:   476.37GiB

-- System Information:
Debian Release: trixie/sid
Architecture: amd64 (x86_64)

Kernel: Linux 6.7.9-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages btrfs-progs depends on:
ii  libblkid12.40-6
ii  libc62.37-18
ii  libcom-err2  1.47.0-2.4
ii  libext2fs2t641.47.0-2.4
ii  liblzo2-22.10-2+b1
ii  libreiserfscore0t64  1:3.6.27-7.1+b2
ii  libudev1 255.4-1+b1
ii  libuuid1 2.40-6
ii  libzstd1 1.5.5+dfsg2-2
ii  zlib1g   1:1.3.dfsg-3.1

btrfs-progs recommends no packages.

Versions of packages btrfs-progs suggests:
pn  duperemove  

-- debconf-show failed