mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
Btrfs: Allow tree blocks larger than the page size
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
1a5bc167f6
commit
db94535db7
15 changed files with 738 additions and 497 deletions
|
@ -303,10 +303,12 @@ static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||
{
|
||||
struct btrfs_root *root = btrfs_sb(dentry->d_sb);
|
||||
struct btrfs_super_block *disk_super = &root->fs_info->super_copy;
|
||||
int bits = dentry->d_sb->s_blocksize_bits;
|
||||
|
||||
buf->f_namelen = BTRFS_NAME_LEN;
|
||||
buf->f_blocks = btrfs_super_total_blocks(disk_super);
|
||||
buf->f_bfree = buf->f_blocks - btrfs_super_blocks_used(disk_super);
|
||||
buf->f_blocks = btrfs_super_total_bytes(disk_super) >> bits;
|
||||
buf->f_bfree = buf->f_blocks -
|
||||
(btrfs_super_bytes_used(disk_super) >> bits);
|
||||
buf->f_bavail = buf->f_bfree;
|
||||
buf->f_bsize = dentry->d_sb->s_blocksize;
|
||||
buf->f_type = BTRFS_SUPER_MAGIC;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue