aboutsummaryrefslogtreecommitdiffstats
path: root/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2007-08-29 15:56:44 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-08-29 15:56:44 -0400
commitffaff17911e4eb0c6177aa4661f90734f7af7b54 (patch)
tree2397e812d960a76464f987465b9663e1152b5875 /ctree.h
parentdbd1848d1ffa2e4e00b49e7766c46f0ba512a8aa (diff)
downloadbtrfs-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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/ctree.h b/ctree.h
index fc84de32..7be96c44 100644
--- a/ctree.h
+++ b/ctree.h
@@ -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);