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) | |
download | kernel-crypto-3bb1a1bc42f2ae9582c28adf620484efcd4da38d.tar.gz kernel-crypto-3bb1a1bc42f2ae9582c28adf620484efcd4da38d.tar.xz kernel-crypto-3bb1a1bc42f2ae9582c28adf620484efcd4da38d.zip |
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 8df719a73d8..cf618cc8b34 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -460,8 +460,7 @@ insert: ins.objectid, ins.offset, path->nodes[0]->start, root->root_key.objectid, - trans->transid, - key->objectid, key->offset); + trans->transid, key->objectid); } else { /* * insert the extent pointer in the extent @@ -471,7 +470,7 @@ insert: path->nodes[0]->start, root->root_key.objectid, trans->transid, key->objectid, - key->offset, &ins); + &ins); BUG_ON(ret); } } @@ -2534,8 +2533,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans, dst_path->nodes[0]->start, BTRFS_TREE_LOG_OBJECTID, trans->transid, - ins_keys[i].objectid, - ins_keys[i].offset); + ins_keys[i].objectid); BUG_ON(ret); } } |