All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell Coker <russell@coker.com.au>
To: linux-btrfs@vger.kernel.org
Subject: btrfs-progs: btrfs dev usa as non-root is wrong and should just abort
Date: Wed, 10 Jul 2024 21:52:14 +1000	[thread overview]
Message-ID: <2159193.PIDvDuAF1L@cupcakke> (raw)

Below is the difference between running btrfs dev usa as root and non-root on 
a laptop with kernel 6.8.12-amd64.  When run as non-root it gets everything 
wrong and in my tests I have never been able to see it give nay accurate data 
as non-root.  I think it should just abort with an error in that situation, 
there's no point in giving a wrong answer.

# btrfs dev usa /
/dev/mapper/root, ID: 1
   Device size:           476.37GiB
   Device slack:            1.50KiB
   Data,single:           216.01GiB
   Metadata,DUP:            6.00GiB
   System,DUP:             64.00MiB
   Unallocated:           254.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

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/




             reply	other threads:[~2024-07-10 11:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 11:52 Russell Coker [this message]
2024-07-10 16:29 ` btrfs-progs: btrfs dev usa as non-root is wrong and should just abort Boris Burkov
2024-07-11  3:50   ` Russell Coker
2024-07-10 21:13 ` Qu Wenruo
2024-07-11  3:42   ` Russell Coker
2024-07-11  3:47     ` Qu Wenruo
2024-07-11  3:55       ` Russell Coker
2024-07-11  3:58         ` Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2159193.PIDvDuAF1L@cupcakke \
    --to=russell@coker.com.au \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.