Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs filesystem show _exact_ freaking size?
Date: Tue, 18 Nov 2014 12:41:55 +0000 (UTC)	[thread overview]
Message-ID: <pan$9f136$52d63466$99e9041e$481f97b4@cox.net> (raw)
In-Reply-To: 546B21F4.8060203@pobox.com

Robert White posted on Tue, 18 Nov 2014 02:39:48 -0800 as excerpted:

> How does one get the exact size (in blocks preferably, but bytes okay)
> of the filesystem inside a partition? I know how to get the partition
> size, but that's not useful when shrinking a partition...

> There needs to be an option to btrfs filesystem show that will tell you
> XXXXXblocks, not Y.ZZ terabytes.

While having a btrfs fi show option for that would be nice, take a look 
at the output of btrfs-show-super.

The dev_item.total_bytes line appears to be the total filesystem bytes -- 
at least here on my exactly-8-GiB partitions, that's /exactly/ what it 
shows, 8589934592, which is 8*1024*1024*1024, and my /exactly/ 256 MiB 
partition shows 268435456, /exactly/ 256 MiB, as well.

The total_bytes line is the full /filesystem/ size, which should be the 
same as the dev_item.total_bytes number on a single-device-filesystem.  
Of course on my two-device btrfs filesystems here it's showing double the 
single-device size, which is as it should be.

But you're correct, having a btrfs fi show option for that would be more 
end-user friendly.  The btrfs-show-super output is rather low-level for 
that, but it does work.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


      parent reply	other threads:[~2014-11-18 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18 10:39 btrfs filesystem show _exact_ freaking size? Robert White
2014-11-18 10:59 ` Hugo Mills
2014-11-18 11:26 ` Gabriel de Perthuis
2014-11-18 12:41 ` Duncan [this message]

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='pan$9f136$52d63466$99e9041e$481f97b4@cox.net' \
    --to=1i5t5.duncan@cox.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox