diff options
author | Josef Bacik <jbacik@redhat.com> | 2007-08-29 15:56:44 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-08-29 15:56:44 -0400 |
commit | ffaff17911e4eb0c6177aa4661f90734f7af7b54 (patch) | |
tree | 2397e812d960a76464f987465b9663e1152b5875 /ctree.h | |
parent | dbd1848d1ffa2e4e00b49e7766c46f0ba512a8aa (diff) | |
download | btrfs-progs-ffaff17911e4eb0c6177aa4661f90734f7af7b54.tar.gz |
btrfs-progs support for root block accountingv0.8
This adds support for keeping track of the number of blocks used by
root_item's. This makes it so that mkfs lays down the "default" subvol with
the correct block accounting in place. Thank you,
Diffstat (limited to 'ctree.h')
-rw-r--r-- | ctree.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -784,6 +784,17 @@ static inline void btrfs_set_root_flags(struct btrfs_root_item *item, u32 val) item->flags = cpu_to_le32(val); } +static inline void btrfs_set_root_blocks_used(struct btrfs_root_item *item, + u64 val) +{ + item->blocks_used = cpu_to_le64(val); +} + +static inline u64 btrfs_root_blocks_used(struct btrfs_root_item *item) +{ + return le64_to_cpu(item->blocks_used); +} + static inline u64 btrfs_super_blocknr(struct btrfs_super_block *s) { return le64_to_cpu(s->blocknr); |