summaryrefslogtreecommitdiff
path: root/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-12-12 14:39:36 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-12-12 14:39:36 -0500
commitfba66bd8652b954be7e98699d81c8e57222b77e4 (patch)
tree18408392b6a0a95e60b6806e00c6ba94515102c2 /ctree.h
parent66d0930cf68e6acf62bd505e0365e783bd14f981 (diff)
Add back pointers from the inode to the directory that referenced it
Diffstat (limited to 'ctree.h')
-rw-r--r--ctree.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/ctree.h b/ctree.h
index 174fb239..adf09735 100644
--- a/ctree.h
+++ b/ctree.h
@@ -192,6 +192,11 @@ struct btrfs_extent_ref {
__le64 offset;
} __attribute__ ((__packed__));
+struct btrfs_inode_ref {
+ __le16 name_len;
+ /* name goes here */
+} __attribute__ ((__packed__));
+
struct btrfs_inode_timespec {
__le64 sec;
__le32 nsec;
@@ -352,7 +357,8 @@ struct btrfs_root {
* the FS
*/
#define BTRFS_INODE_ITEM_KEY 1
-#define BTRFS_XATTR_ITEM_KEY 2
+#define BTRFS_INODE_REF_KEY 2
+#define BTRFS_XATTR_ITEM_KEY 8
/* reserve 3-15 close to the inode for later flexibility */
@@ -556,6 +562,10 @@ static inline void btrfs_set_timespec_nsec(struct btrfs_inode_timespec *ts,
BTRFS_SETGET_STACK_FUNCS(extent_refs, struct btrfs_extent_item, refs, 32);
+BTRFS_SETGET_STACK_FUNCS(inode_ref_name_len, struct btrfs_inode_ref,
+ name_len, 16);
+
+
BTRFS_SETGET_STACK_FUNCS(ref_root, struct btrfs_extent_ref, root, 64);
BTRFS_SETGET_STACK_FUNCS(ref_generation, struct btrfs_extent_ref,
generation, 64);