summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-02-01 14:55:03 -0500
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-02-01 14:55:03 -0500
commit633ddb9a90556a3522f00aec54a00cb74ad2c337 (patch)
treefce5aa1e0adc21caf151ebd0d688f829725916e6
parent6f30791b5120b3a4c83ff4a9b451c1647240c480 (diff)
Hash in the owner and offset for file extent backref keys
-rw-r--r--extent-tree.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/extent-tree.c b/extent-tree.c
index 413c8161..056ceefd 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -386,13 +386,12 @@ static u64 hash_extent_ref(u64 root_objectid, u64 ref_generation,
high_crc = crc32c(high_crc, &lenum, sizeof(lenum));
lenum = cpu_to_le64(ref_generation);
low_crc = crc32c(low_crc, &lenum, sizeof(lenum));
-
-#if 0
- lenum = cpu_to_le64(owner);
- low_crc = crc32c(low_crc, &lenum, sizeof(lenum));
- lenum = cpu_to_le64(owner_offset);
- low_crc = crc32c(low_crc, &lenum, sizeof(lenum));
-#endif
+ if (owner >= BTRFS_FIRST_FREE_OBJECTID) {
+ lenum = cpu_to_le64(owner);
+ low_crc = crc32c(low_crc, &lenum, sizeof(lenum));
+ lenum = cpu_to_le64(owner_offset);
+ low_crc = crc32c(low_crc, &lenum, sizeof(lenum));
+ }
return ((u64)high_crc << 32) | (u64)low_crc;
}