Btrfs: Use a chunk of the key flags to record the item type.
Add (untested and simple) directory item code
Fix comp_keys to use the new key ordering
Add btrfs_insert_empty_item
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c
index 03aa7c2..a24b472 100644
--- a/fs/btrfs/root-tree.c
+++ b/fs/btrfs/root-tree.c
@@ -27,7 +27,7 @@
l = &path.nodes[0]->leaf;
BUG_ON(path.slots[0] == 0);
slot = path.slots[0] - 1;
- if (btrfs_key_objectid(&l->items[slot].key) != objectid) {
+ if (btrfs_disk_key_objectid(&l->items[slot].key) != objectid) {
ret = 1;
goto out;
}