diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-12-03 10:58:15 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-12-16 20:46:23 -0500 |
commit | b11e234d21e73df94099e473a080bca502b9a496 (patch) | |
tree | eb931368e5b4111b8eb95fff5921d78220c590ff /fs/btrfs/inode.c | |
parent | b493968096944a11422c4d80fb87af537ca1cac7 (diff) | |
download | op-kernel-dev-b11e234d21e73df94099e473a080bca502b9a496.zip op-kernel-dev-b11e234d21e73df94099e473a080bca502b9a496.tar.gz |
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/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index bfd59bc..73e6833 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1327,7 +1327,7 @@ out_check: em->orig_block_len = disk_num_bytes; em->bdev = root->fs_info->fs_devices->latest_bdev; set_bit(EXTENT_FLAG_PINNED, &em->flags); - set_bit(EXTENT_FLAG_PREALLOC, &em->flags); + set_bit(EXTENT_FLAG_FILLING, &em->flags); while (1) { write_lock(&em_tree->lock); ret = add_extent_mapping(em_tree, em); @@ -5945,7 +5945,7 @@ static struct extent_map *create_pinned_em(struct inode *inode, u64 start, em->orig_block_len = orig_block_len; set_bit(EXTENT_FLAG_PINNED, &em->flags); if (type == BTRFS_ORDERED_PREALLOC) - set_bit(EXTENT_FLAG_PREALLOC, &em->flags); + set_bit(EXTENT_FLAG_FILLING, &em->flags); do { btrfs_drop_extent_cache(inode, em->start, |