diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-12-11 12:42:00 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:58 -0400 |
commit | d8d5f3e16d1ae4fe9b93312e083f2c04a95520f0 (patch) | |
tree | 3327d76311a31a9345a3019534bb043ff14d204f /fs/btrfs/file.c | |
parent | 7bb86316c3961d1bc401ef184fd996f999556c7f (diff) |
Btrfs: Add lowest key information to back refs for extent tree blocks as well.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 5b1f90f06e03..1cc4d285951c 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -545,13 +545,10 @@ next_slot: | |||
545 | u64 disk_num_bytes = 0; | 545 | u64 disk_num_bytes = 0; |
546 | u64 extent_num_bytes = 0; | 546 | u64 extent_num_bytes = 0; |
547 | u64 root_gen; | 547 | u64 root_gen; |
548 | u64 root_owner; | ||
548 | 549 | ||
549 | if (leaf != root->node) { | 550 | root_gen = btrfs_header_generation(leaf); |
550 | root_gen = | 551 | root_owner = btrfs_header_owner(leaf); |
551 | btrfs_header_generation(path->nodes[1]); | ||
552 | } else { | ||
553 | root_gen = btrfs_header_generation(leaf); | ||
554 | } | ||
555 | if (found_extent) { | 552 | if (found_extent) { |
556 | disk_bytenr = | 553 | disk_bytenr = |
557 | btrfs_file_extent_disk_bytenr(leaf, | 554 | btrfs_file_extent_disk_bytenr(leaf, |
@@ -575,7 +572,7 @@ next_slot: | |||
575 | ret = btrfs_free_extent(trans, root, | 572 | ret = btrfs_free_extent(trans, root, |
576 | disk_bytenr, | 573 | disk_bytenr, |
577 | disk_num_bytes, | 574 | disk_num_bytes, |
578 | root->root_key.objectid, | 575 | root_owner, |
579 | root_gen, inode->i_ino, | 576 | root_gen, inode->i_ino, |
580 | key.offset, 0); | 577 | key.offset, 0); |
581 | } | 578 | } |