lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 30 Apr 2012 13:26:04 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	Daniel Drake <dsd@...top.org>
CC:	linux-ext4@...r.kernel.org
Subject: Re: Determining if an ext4 fs uses the whole partition

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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ