aboutsummaryrefslogtreecommitdiff
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 59660293d29..5ca9c067237 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -610,6 +610,7 @@ static noinline int submit_compressed_extents(struct inode *inode,
em = alloc_extent_map(GFP_NOFS);
em->start = async_extent->start;
em->len = async_extent->ram_size;
+ em->orig_start = em->start;
em->block_start = ins.objectid;
em->block_len = ins.offset;
@@ -743,6 +744,7 @@ static noinline int cow_file_range(struct inode *inode,
}
em = alloc_extent_map(GFP_NOFS);
em->start = start;
+ em->orig_start = em->start;
ram_size = ins.offset;
em->len = ins.offset;
@@ -1057,6 +1059,7 @@ out_check:
em_tree = &BTRFS_I(inode)->extent_tree;
em = alloc_extent_map(GFP_NOFS);
em->start = cur_offset;
+ em->orig_start = em->start;
em->len = num_bytes;
em->block_len = num_bytes;
em->block_start = disk_bytenr;
@@ -3876,6 +3879,7 @@ again:
}
em->bdev = root->fs_info->fs_devices->latest_bdev;
em->start = EXTENT_MAP_HOLE;
+ em->orig_start = EXTENT_MAP_HOLE;
em->len = (u64)-1;
em->block_len = (u64)-1;