aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-10-15 16:15:53 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:56 -0400
commitdb94535db75e67fab12ccbb7f5ee548e33fed891 (patch)
tree1ad7dfc82b003294a94ee87d7329b24b902b369f /fs/btrfs/super.c
parent1a5bc167f6707542b79a55452075525620ed43f5 (diff)
Btrfs: Allow tree blocks larger than the page size
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 39a1435c68f1..5c4370f3a5b8 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -303,10 +303,12 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
303{ 303{
304 struct btrfs_root *root = btrfs_sb(dentry->d_sb); 304 struct btrfs_root *root = btrfs_sb(dentry->d_sb);
305 struct btrfs_super_block *disk_super = &root->fs_info->super_copy; 305 struct btrfs_super_block *disk_super = &root->fs_info->super_copy;
306 int bits = dentry->d_sb->s_blocksize_bits;
306 307
307 buf->f_namelen = BTRFS_NAME_LEN; 308 buf->f_namelen = BTRFS_NAME_LEN;
308 buf->f_blocks = btrfs_super_total_blocks(disk_super); 309 buf->f_blocks = btrfs_super_total_bytes(disk_super) >> bits;
309 buf->f_bfree = buf->f_blocks - btrfs_super_blocks_used(disk_super); 310 buf->f_bfree = buf->f_blocks -
311 (btrfs_super_bytes_used(disk_super) >> bits);
310 buf->f_bavail = buf->f_bfree; 312 buf->f_bavail = buf->f_bfree;
311 buf->f_bsize = dentry->d_sb->s_blocksize; 313 buf->f_bsize = dentry->d_sb->s_blocksize;
312 buf->f_type = BTRFS_SUPER_MAGIC; 314 buf->f_type = BTRFS_SUPER_MAGIC;