diff options
author | Yan Zheng <zheng.yan@oracle.com> | 2008-10-09 11:46:24 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-10-09 11:46:24 -0400 |
commit | 3bb1a1bc42f2ae9582c28adf620484efcd4da38d (patch) | |
tree | 4e65ee859e73ea9558e33a02ba10e1d9d54756f3 /fs/btrfs/tree-log.c | |
parent | a76a3cd40c1127ca199d4f7f37bf0d541bf44eb2 (diff) |
Btrfs: Remove offset field from struct btrfs_extent_ref
The offset field in struct btrfs_extent_ref records the position
inside file that file extent is referenced by. In the new back
reference system, tree leaves holding references to file extent
are recorded explicitly. We can scan these tree leaves very quickly, so the
offset field is not required.
This patch also makes the back reference system check the objectid
when extents are in deleting.
Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r-- | fs/btrfs/tree-log.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 8df719a73d82..cf618cc8b34a 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c | |||
@@ -460,8 +460,7 @@ insert: | |||
460 | ins.objectid, ins.offset, | 460 | ins.objectid, ins.offset, |
461 | path->nodes[0]->start, | 461 | path->nodes[0]->start, |
462 | root->root_key.objectid, | 462 | root->root_key.objectid, |
463 | trans->transid, | 463 | trans->transid, key->objectid); |
464 | key->objectid, key->offset); | ||
465 | } else { | 464 | } else { |
466 | /* | 465 | /* |
467 | * insert the extent pointer in the extent | 466 | * insert the extent pointer in the extent |
@@ -471,7 +470,7 @@ insert: | |||
471 | path->nodes[0]->start, | 470 | path->nodes[0]->start, |
472 | root->root_key.objectid, | 471 | root->root_key.objectid, |
473 | trans->transid, key->objectid, | 472 | trans->transid, key->objectid, |
474 | key->offset, &ins); | 473 | &ins); |
475 | BUG_ON(ret); | 474 | BUG_ON(ret); |
476 | } | 475 | } |
477 | } | 476 | } |
@@ -2534,8 +2533,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, | |||
2534 | dst_path->nodes[0]->start, | 2533 | dst_path->nodes[0]->start, |
2535 | BTRFS_TREE_LOG_OBJECTID, | 2534 | BTRFS_TREE_LOG_OBJECTID, |
2536 | trans->transid, | 2535 | trans->transid, |
2537 | ins_keys[i].objectid, | 2536 | ins_keys[i].objectid); |
2538 | ins_keys[i].offset); | ||
2539 | BUG_ON(ret); | 2537 | BUG_ON(ret); |
2540 | } | 2538 | } |
2541 | } | 2539 | } |