Btrfs: struct key endian fixes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
diff --git a/fs/btrfs/quick-test.c b/fs/btrfs/quick-test.c
index 07fd71b..ab3bda5 100644
--- a/fs/btrfs/quick-test.c
+++ b/fs/btrfs/quick-test.c
@@ -13,8 +13,8 @@
}
int main(int ac, char **av) {
- struct key ins;
- struct key last = { (u64)-1, 0, 0};
+ struct btrfs_key ins;
+ struct btrfs_key last = { (u64)-1, 0, 0};
char *buf;
int i;
int num;
@@ -146,7 +146,7 @@
slot = path.slots[0];
leaf = &path.nodes[0]->leaf;
- memcpy(&last, &leaf->items[slot].key, sizeof(last));
+ btrfs_disk_key_to_cpu(&last, &leaf->items[slot].key);
if (tree_size % 10000 == 0)
printf("big del %d:%d\n", tree_size, i);
ret = del_item(root, &path);