Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 129009
b: refs/heads/master
c: 445a694
h: refs/heads/master
i:
  129007: 0e3d2fb
v: v3
  • Loading branch information
Chris Mason committed Nov 10, 2008
1 parent 31eaaaf commit 7c62ac6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39be25cd89450940b0e5f8a6aad71d1ec99b17bf
refs/heads/master: 445a69449994a37615cd47e47bcab2e42a070adf
3 changes: 2 additions & 1 deletion trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,17 @@ int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end,

split->start = start + len;
split->len = em->start + em->len - (start + len);
split->orig_start = em->orig_start;
split->bdev = em->bdev;
split->flags = flags;

if (compressed) {
split->block_len = em->block_len;
split->block_start = em->block_start;
split->orig_start = em->orig_start;
} else {
split->block_len = split->len;
split->block_start = em->block_start + diff;
split->orig_start = split->start;
}

ret = add_extent_mapping(em_tree, split);
Expand Down
4 changes: 4 additions & 0 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1057,6 +1059,7 @@ static int run_delalloc_nocow(struct inode *inode, struct page *locked_page,
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;
Expand Down Expand Up @@ -3876,6 +3879,7 @@ struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page,
}
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;

Expand Down

0 comments on commit 7c62ac6

Please sign in to comment.