aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/mkfs.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-12 12:01:18 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-12 12:01:18 -0400
commit7518a238ea0152dc849d1ed76d3cae8b44e12f46 (patch)
tree97e5c285f10bdb2576046e7bb15d239471815c28 /fs/btrfs/mkfs.c
parent83e15a28e046dbb4534dd263d1d3dc867a8994a2 (diff)
Btrfs: get/set for struct header fields
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/mkfs.c')
-rw-r--r--fs/btrfs/mkfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/mkfs.c b/fs/btrfs/mkfs.c
index fd4e5dea7e1..b2ba9469629 100644
--- a/fs/btrfs/mkfs.c
+++ b/fs/btrfs/mkfs.c
@@ -34,15 +34,15 @@ int mkfs(int fd)
/* create leaves for the tree root and extent root */
memset(&empty_leaf, 0, sizeof(empty_leaf));
- empty_leaf.header.parentid = 1;
- empty_leaf.header.blocknr = 17;
+ btrfs_set_header_parentid(&empty_leaf.header, 1);
+ btrfs_set_header_blocknr(&empty_leaf.header, 17);
ret = pwrite(fd, &empty_leaf, sizeof(empty_leaf), 17 * CTREE_BLOCKSIZE);
if (ret != sizeof(empty_leaf))
return -1;
- empty_leaf.header.parentid = 2;
- empty_leaf.header.blocknr = 18;
- empty_leaf.header.nritems = 3;
+ btrfs_set_header_parentid(&empty_leaf.header, 2);
+ btrfs_set_header_blocknr(&empty_leaf.header, 18);
+ btrfs_set_header_nritems(&empty_leaf.header, 3);
/* item1, reserve blocks 0-16 */
item.key.objectid = 0;