aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-11-10 11:53:33 -0500
committerChris Mason <chris.mason@oracle.com>2008-11-10 11:53:33 -0500
commit445a69449994a37615cd47e47bcab2e42a070adf (patch)
treeeb41f8246fe64bd32c1bb9ee544b1b27866ec79b /fs/btrfs/inode.c
parent39be25cd89450940b0e5f8a6aad71d1ec99b17bf (diff)
Btrfs: Fix usage of struct extent_map->orig_start
This makes sure the orig_start field in struct extent_map gets set everywhere the extent_map structs are created or modified. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 59660293d291..5ca9c0672374 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -610,6 +610,7 @@ static noinline int submit_compressed_extents(struct inode *inode,
610 em = alloc_extent_map(GFP_NOFS); 610 em = alloc_extent_map(GFP_NOFS);
611 em->start = async_extent->start; 611 em->start = async_extent->start;
612 em->len = async_extent->ram_size; 612 em->len = async_extent->ram_size;
613 em->orig_start = em->start;
613 614
614 em->block_start = ins.objectid; 615 em->block_start = ins.objectid;
615 em->block_len = ins.offset; 616 em->block_len = ins.offset;
@@ -743,6 +744,7 @@ static noinline int cow_file_range(struct inode *inode,
743 } 744 }
744 em = alloc_extent_map(GFP_NOFS); 745 em = alloc_extent_map(GFP_NOFS);
745 em->start = start; 746 em->start = start;
747 em->orig_start = em->start;
746 748
747 ram_size = ins.offset; 749 ram_size = ins.offset;
748 em->len = ins.offset; 750 em->len = ins.offset;
@@ -1057,6 +1059,7 @@ out_check:
1057 em_tree = &BTRFS_I(inode)->extent_tree; 1059 em_tree = &BTRFS_I(inode)->extent_tree;
1058 em = alloc_extent_map(GFP_NOFS); 1060 em = alloc_extent_map(GFP_NOFS);
1059 em->start = cur_offset; 1061 em->start = cur_offset;
1062 em->orig_start = em->start;
1060 em->len = num_bytes; 1063 em->len = num_bytes;
1061 em->block_len = num_bytes; 1064 em->block_len = num_bytes;
1062 em->block_start = disk_bytenr; 1065 em->block_start = disk_bytenr;
@@ -3876,6 +3879,7 @@ again:
3876 } 3879 }
3877 em->bdev = root->fs_info->fs_devices->latest_bdev; 3880 em->bdev = root->fs_info->fs_devices->latest_bdev;
3878 em->start = EXTENT_MAP_HOLE; 3881 em->start = EXTENT_MAP_HOLE;
3882 em->orig_start = EXTENT_MAP_HOLE;
3879 em->len = (u64)-1; 3883 em->len = (u64)-1;
3880 em->block_len = (u64)-1; 3884 em->block_len = (u64)-1;
3881 3885