summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_map.c
diff options
context:
space:
mode:
authorJosef Bacik2012-12-03 16:58:15 +0100
committerChris Mason2012-12-17 02:46:23 +0100
commitb11e234d21e73df94099e473a080bca502b9a496 (patch)
treeeb931368e5b4111b8eb95fff5921d78220c590ff /fs/btrfs/extent_map.c
parentBtrfs: keep track of the extents original block length (diff)
downloadkernel-qcow2-linux-b11e234d21e73df94099e473a080bca502b9a496.tar.gz
kernel-qcow2-linux-b11e234d21e73df94099e473a080bca502b9a496.tar.xz
kernel-qcow2-linux-b11e234d21e73df94099e473a080bca502b9a496.zip
Btrfs: do not mark ems as prealloc if we are writing to them
We are going to use EM's to log extents in the future, so we need to not mark them as prealloc if they aren't actually prealloc extents. Instead mark them with FILLING so we know to ammend mod_start/mod_len and that way we don't confuse the extent logging code. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/extent_map.c')
-rw-r--r--fs/btrfs/extent_map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c
index b8cbc8d5c7f7..85ae2b6fe03b 100644
--- a/fs/btrfs/extent_map.c
+++ b/fs/btrfs/extent_map.c
@@ -266,9 +266,9 @@ int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len,
em->mod_start = em->start;
em->mod_len = em->len;
- if (test_bit(EXTENT_FLAG_PREALLOC, &em->flags)) {
+ if (test_bit(EXTENT_FLAG_FILLING, &em->flags)) {
prealloc = true;
- clear_bit(EXTENT_FLAG_PREALLOC, &em->flags);
+ clear_bit(EXTENT_FLAG_FILLING, &em->flags);
}
try_merge_map(tree, em);