aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2008-07-24 12:12:38 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:05 -0400
commitaec7477b3b0e8ec93f6d274f25ba40b0665134d4 (patch)
tree2f689681e2f1b48d1c42b2242e21cbf456ec4c55 /fs/btrfs/ctree.h
parent3eaa2885276fd6dac7b076a793932428b7168e74 (diff)
Btrfs: Implement new dir index format
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 6675e916ebcd..beb05b1de54c 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -372,6 +372,7 @@ struct btrfs_dev_extent {
372} __attribute__ ((__packed__)); 372} __attribute__ ((__packed__));
373 373
374struct btrfs_inode_ref { 374struct btrfs_inode_ref {
375 __le64 index;
375 __le16 name_len; 376 __le16 name_len;
376 /* name goes here */ 377 /* name goes here */
377} __attribute__ ((__packed__)); 378} __attribute__ ((__packed__));
@@ -902,6 +903,7 @@ BTRFS_SETGET_STACK_FUNCS(block_group_flags,
902 903
903/* struct btrfs_inode_ref */ 904/* struct btrfs_inode_ref */
904BTRFS_SETGET_FUNCS(inode_ref_name_len, struct btrfs_inode_ref, name_len, 16); 905BTRFS_SETGET_FUNCS(inode_ref_name_len, struct btrfs_inode_ref, name_len, 16);
906BTRFS_SETGET_FUNCS(inode_ref_index, struct btrfs_inode_ref, index, 64);
905 907
906/* struct btrfs_inode_item */ 908/* struct btrfs_inode_item */
907BTRFS_SETGET_FUNCS(inode_generation, struct btrfs_inode_item, generation, 64); 909BTRFS_SETGET_FUNCS(inode_generation, struct btrfs_inode_item, generation, 64);
@@ -1528,7 +1530,7 @@ int btrfs_find_dead_roots(struct btrfs_root *root, u64 objectid,
1528/* dir-item.c */ 1530/* dir-item.c */
1529int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root 1531int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
1530 *root, const char *name, int name_len, u64 dir, 1532 *root, const char *name, int name_len, u64 dir,
1531 struct btrfs_key *location, u8 type); 1533 struct btrfs_key *location, u8 type, u64 index);
1532struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, 1534struct btrfs_dir_item *btrfs_lookup_dir_item(struct btrfs_trans_handle *trans,
1533 struct btrfs_root *root, 1535 struct btrfs_root *root,
1534 struct btrfs_path *path, u64 dir, 1536 struct btrfs_path *path, u64 dir,
@@ -1566,11 +1568,11 @@ int btrfs_find_highest_inode(struct btrfs_root *fs_root, u64 *objectid);
1566int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans, 1568int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans,
1567 struct btrfs_root *root, 1569 struct btrfs_root *root,
1568 const char *name, int name_len, 1570 const char *name, int name_len,
1569 u64 inode_objectid, u64 ref_objectid); 1571 u64 inode_objectid, u64 ref_objectid, u64 index);
1570int btrfs_del_inode_ref(struct btrfs_trans_handle *trans, 1572int btrfs_del_inode_ref(struct btrfs_trans_handle *trans,
1571 struct btrfs_root *root, 1573 struct btrfs_root *root,
1572 const char *name, int name_len, 1574 const char *name, int name_len,
1573 u64 inode_objectid, u64 ref_objectid); 1575 u64 inode_objectid, u64 ref_objectid, u64 *index);
1574int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans, 1576int btrfs_insert_empty_inode(struct btrfs_trans_handle *trans,
1575 struct btrfs_root *root, 1577 struct btrfs_root *root,
1576 struct btrfs_path *path, u64 objectid); 1578 struct btrfs_path *path, u64 objectid);