Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346739
b: refs/heads/master
c: b11e234
h: refs/heads/master
i:
  346737: f11350b
  346735: 32f8147
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Dec 17, 2012
1 parent b3cdf91 commit ce14f5d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 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: b493968096944a11422c4d80fb87af537ca1cac7
refs/heads/master: b11e234d21e73df94099e473a080bca502b9a496
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/btrfs/extent_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define EXTENT_FLAG_VACANCY 2 /* no file extent item found */
#define EXTENT_FLAG_PREALLOC 3 /* pre-allocated extent */
#define EXTENT_FLAG_LOGGING 4 /* Logging this extent */
#define EXTENT_FLAG_FILLING 5 /* Filling in a preallocated extent */

struct extent_map {
struct rb_node rb_node;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ static noinline int run_delalloc_nocow(struct inode *inode,
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);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ce14f5d

Please sign in to comment.