allocator improvements, inode block groups

This commit is contained in:
Chris Mason 2007-04-30 15:25:49 -04:00 committed by David Woodhouse
parent 5856b7e124
commit 007e5efb9b
2 changed files with 14 additions and 1 deletions

12
ctree.h
View File

@ -167,6 +167,7 @@ struct btrfs_inode_item {
__le64 generation;
__le64 size;
__le64 nblocks;
__le64 block_group;
__le32 nlink;
__le32 uid;
__le32 gid;
@ -392,6 +393,17 @@ static inline void btrfs_set_inode_nblocks(struct btrfs_inode_item *i, u64 val)
i->nblocks = cpu_to_le64(val);
}
static inline u64 btrfs_inode_block_group(struct btrfs_inode_item *i)
{
return le64_to_cpu(i->block_group);
}
static inline void btrfs_set_inode_block_group(struct btrfs_inode_item *i,
u64 val)
{
i->block_group = cpu_to_le64(val);
}
static inline u32 btrfs_inode_nlink(struct btrfs_inode_item *i)
{
return le32_to_cpu(i->nlink);

View File

@ -59,9 +59,10 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
switch (type) {
case BTRFS_INODE_ITEM_KEY:
ii = btrfs_item_ptr(l, i, struct btrfs_inode_item);
printf("\t\tinode generation %Lu size %Lu mode %o\n",
printf("\t\tinode generation %Lu size %Lu block group %Lu mode %o\n",
btrfs_inode_generation(ii),
btrfs_inode_size(ii),
btrfs_inode_block_group(ii),
btrfs_inode_mode(ii));
break;
case BTRFS_DIR_ITEM_KEY: