Btrfs: Count space allocated to file in bytes

This patch makes btrfs count space allocated to file in bytes instead
of 512 byte sectors.

Everything else in btrfs uses a byte count instead of sector sizes or
blocks sizes, so this fits better.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
This commit is contained in:
Yan Zheng
2008-10-09 11:46:29 -04:00
committed by Chris Mason
parent a62b940160
commit a76a3cd40c
6 changed files with 33 additions and 39 deletions

View File

@@ -3930,7 +3930,7 @@ next:
BUG_ON(ret);
btrfs_release_path(root, path);
inode->i_blocks += extent_len >> 9;
inode_add_bytes(inode, extent_len);
ext_offset = 0;
num_bytes -= extent_len;