diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-04-17 15:39:32 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-04-17 15:39:32 -0400 |
commit | 70b2befd0c8a4064715d8b340270650cc9d15af8 (patch) | |
tree | 81171607c9ddf501e5c0233dc24d20d1a5b19858 /fs/btrfs/ctree.c | |
parent | b18c6685810af8e6763760711aece31ccc7a8ea8 (diff) |
Btrfs: rework csums and extent item ordering
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 43d4779abdd1..5c160c236773 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -115,14 +115,14 @@ static int comp_keys(struct btrfs_disk_key *disk, struct btrfs_key *k2) | |||
115 | return 1; | 115 | return 1; |
116 | if (k1.objectid < k2->objectid) | 116 | if (k1.objectid < k2->objectid) |
117 | return -1; | 117 | return -1; |
118 | if (k1.offset > k2->offset) | ||
119 | return 1; | ||
120 | if (k1.offset < k2->offset) | ||
121 | return -1; | ||
122 | if (k1.flags > k2->flags) | 118 | if (k1.flags > k2->flags) |
123 | return 1; | 119 | return 1; |
124 | if (k1.flags < k2->flags) | 120 | if (k1.flags < k2->flags) |
125 | return -1; | 121 | return -1; |
122 | if (k1.offset > k2->offset) | ||
123 | return 1; | ||
124 | if (k1.offset < k2->offset) | ||
125 | return -1; | ||
126 | return 0; | 126 | return 0; |
127 | } | 127 | } |
128 | 128 | ||
@@ -1292,7 +1292,6 @@ int btrfs_truncate_item(struct btrfs_trans_handle *trans, | |||
1292 | ioff + size_diff); | 1292 | ioff + size_diff); |
1293 | } | 1293 | } |
1294 | /* shift the data */ | 1294 | /* shift the data */ |
1295 | printk("truncate item, new_size %u old_size %u, diff %u, bufp %p, dst, %p, num %u, old_data_start %u, data_end %u\n", new_size, old_size, size_diff, leaf, btrfs_leaf_data(leaf) + data_end + size_diff, old_data_start-data_end, old_data_start, data_end); | ||
1296 | btrfs_memmove(root, leaf, btrfs_leaf_data(leaf) + | 1295 | btrfs_memmove(root, leaf, btrfs_leaf_data(leaf) + |
1297 | data_end + size_diff, btrfs_leaf_data(leaf) + | 1296 | data_end + size_diff, btrfs_leaf_data(leaf) + |
1298 | data_end, old_data_start + new_size - data_end); | 1297 | data_end, old_data_start + new_size - data_end); |