From: Eric Sandeen <sandeen@redhat.com>
To: Daniel Drake <dsd@laptop.org>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Determining if an ext4 fs uses the whole partition
Date: Mon, 30 Apr 2012 13:26:04 -0500 [thread overview]
Message-ID: <4F9ED93C.2060308@redhat.com> (raw)
In-Reply-To: <CAMLZHHQUQKK10XQ2WZdgoMO9PPTmP2tNYL5xN2aQirD+TLSzbA@mail.gmail.com>
On 4/30/12 1:18 PM, Daniel Drake wrote:
...
> Trying the statfs approach (the fs in question is already mounted):
>
> # dumpe2fs -h /dev/mmcblk0p2 | grep "Block count\|Block size"
> dumpe2fs 1.42 (29-Nov-2011)
> Block count: 949248
> Block size: 4096
>
> # stat -f /
> File: "/"
> ID: f09a7645207bdd68 Namelen: 255 Type: ext2/ext3
> Block size: 4096 Fundamental block size: 4096
> Blocks: Total: 934935 Free: 198205 Available: 188947
> Inodes: Total: 227824 Free: 133103
>
> The numbers don't agree.
>
> (Not a big deal, since I can use the other 2 approaches you mentioned,
> just wanted to point it out)
Oh, that's because statfs on extN subtracts out the "overhead" from superblocks,
block group descriptors, etc. I guess that's a reasonable interpretation
of "/* total data blocks in file system */" but honestly I forgot that
it did that... TBH, not entirely sure why it does.
-Eric
next prev parent reply other threads:[~2012-04-30 18:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 17:19 Determining if an ext4 fs uses the whole partition Daniel Drake
2012-04-30 17:29 ` Eric Sandeen
2012-04-30 17:37 ` Jeff Moyer
2012-04-30 19:01 ` Ted Ts'o
2012-04-30 18:18 ` Daniel Drake
2012-04-30 18:26 ` Eric Sandeen [this message]
2012-04-30 17:33 ` djwong
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=4F9ED93C.2060308@redhat.com \
--to=sandeen@redhat.com \
--cc=dsd@laptop.org \
--cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).