btrfs: fix stat blocks accounting
authorDavid Sterba <dsterba@suse.cz>
Sun, 20 Nov 2011 12:33:38 +0000 (07:33 -0500)
committerChris Mason <chris.mason@oracle.com>
Sun, 20 Nov 2011 12:42:15 +0000 (07:42 -0500)
commitfadc0d8be4dfca80f6c568bc5874931893c6709b
treea73dd18819b86cc14a1f01a7f58e34d94b8d84da
parent52621cb6ed0e0e14358bb317bda7cd5fbd5c2a27
btrfs: fix stat blocks accounting

Round inode bytes and delalloc bytes up to real blocksize before
converting to sector size. Otherwise eg. files smaller than 512
are reported with zero blocks due to incorrect rounding.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c