summaryrefslogtreecommitdiff
path: root/inode-item.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2008-07-24 12:13:32 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-07-24 12:13:32 -0400
commit059c20b3846fb02ce999265820a2c3856f3692aa (patch)
treefcf61abc3be4c546f4ed13fe4e040e05353fa205 /inode-item.c
parent9864c90760e7c0f287cc616d5f71a674efbbc5ea (diff)
btrfs-progs new dir index support
Diffstat (limited to 'inode-item.c')
-rw-r--r--inode-item.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/inode-item.c b/inode-item.c
index 706cfce5..28865f7c 100644
--- a/inode-item.c
+++ b/inode-item.c
@@ -106,7 +106,7 @@ out:
int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
const char *name, int name_len,
- u64 inode_objectid, u64 ref_objectid)
+ u64 inode_objectid, u64 ref_objectid, u64 index)
{
struct btrfs_path *path;
struct btrfs_key key;
@@ -138,6 +138,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans,
struct btrfs_inode_ref);
ref = (struct btrfs_inode_ref *)((unsigned long)ref + old_size);
btrfs_set_inode_ref_name_len(path->nodes[0], ref, name_len);
+ btrfs_set_inode_ref_index(path->nodes[0], ref, index);
ptr = (unsigned long)(ref + 1);
ret = 0;
} else if (ret < 0) {
@@ -146,6 +147,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans,
ref = btrfs_item_ptr(path->nodes[0], path->slots[0],
struct btrfs_inode_ref);
btrfs_set_inode_ref_name_len(path->nodes[0], ref, name_len);
+ btrfs_set_inode_ref_index(path->nodes[0], ref, index);
ptr = (unsigned long)(ref + 1);
}
write_extent_buffer(path->nodes[0], name, ptr, name_len);