Report actual disk space used

Report size based on blocks used, not the "nominal" size.
b/8744465

Change-Id: Idbb72f47af6d475b51305a14be291bf01acb14bb
This commit is contained in:
Marco Nelissen 2013-05-01 10:10:59 -07:00
parent f6d1c3930e
commit 7719b85bf8

View File

@ -24,7 +24,8 @@
int64_t stat_size(struct stat *s) int64_t stat_size(struct stat *s)
{ {
int64_t blksize = s->st_blksize; int64_t blksize = s->st_blksize;
int64_t size = s->st_size; // count actual blocks used instead of nominal file size
int64_t size = s->st_blocks * 512;
if (blksize) { if (blksize) {
/* round up to filesystem block size */ /* round up to filesystem block size */