allocator improvements, inode block groups
This commit is contained in:
parent
5856b7e124
commit
007e5efb9b
2 changed files with 14 additions and 1 deletions
12
ctree.h
12
ctree.h
|
@ -167,6 +167,7 @@ struct btrfs_inode_item {
|
||||||
__le64 generation;
|
__le64 generation;
|
||||||
__le64 size;
|
__le64 size;
|
||||||
__le64 nblocks;
|
__le64 nblocks;
|
||||||
|
__le64 block_group;
|
||||||
__le32 nlink;
|
__le32 nlink;
|
||||||
__le32 uid;
|
__le32 uid;
|
||||||
__le32 gid;
|
__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);
|
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)
|
static inline u32 btrfs_inode_nlink(struct btrfs_inode_item *i)
|
||||||
{
|
{
|
||||||
return le32_to_cpu(i->nlink);
|
return le32_to_cpu(i->nlink);
|
||||||
|
|
|
@ -59,9 +59,10 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BTRFS_INODE_ITEM_KEY:
|
case BTRFS_INODE_ITEM_KEY:
|
||||||
ii = btrfs_item_ptr(l, i, struct btrfs_inode_item);
|
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_generation(ii),
|
||||||
btrfs_inode_size(ii),
|
btrfs_inode_size(ii),
|
||||||
|
btrfs_inode_block_group(ii),
|
||||||
btrfs_inode_mode(ii));
|
btrfs_inode_mode(ii));
|
||||||
break;
|
break;
|
||||||
case BTRFS_DIR_ITEM_KEY:
|
case BTRFS_DIR_ITEM_KEY:
|
||||||
|
|
Loading…
Reference in a new issue