Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128452
b: refs/heads/master
c: a8c450b
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason authored and David Woodhouse committed Sep 11, 2007
1 parent b144e8e commit d140632
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 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: 011410bd859a481a335d7db1fb559542c5663fd5
refs/heads/master: a8c450b211c010ac55190da23ceb6b39b393f411
44 changes: 22 additions & 22 deletions trunk/fs/btrfs/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,28 +712,6 @@ int set_extent_bit(struct extent_map_tree *tree, u64 start, u64 end, int bits,
}
goto search_again;
}
/*
* | ---- desired range ---- |
* | state |
* We need to split the extent, and set the bit
* on the first half
*/
if (state->start <= end && state->end > end) {
set = state->state & bits;
if (exclusive && set) {
*failed_start = start;
err = -EEXIST;
goto out;
}
err = split_state(tree, state, prealloc, end + 1);
BUG_ON(err == -EEXIST);

prealloc->state |= bits;
merge_state(tree, prealloc);
prealloc = NULL;
goto out;
}

/*
* | ---- desired range ---- |
* | state | or | state |
Expand All @@ -756,6 +734,28 @@ int set_extent_bit(struct extent_map_tree *tree, u64 start, u64 end, int bits,
start = this_end + 1;
goto search_again;
}
/*
* | ---- desired range ---- |
* | state |
* We need to split the extent, and set the bit
* on the first half
*/
if (state->start <= end && state->end > end) {
set = state->state & bits;
if (exclusive && set) {
*failed_start = start;
err = -EEXIST;
goto out;
}
err = split_state(tree, state, prealloc, end + 1);
BUG_ON(err == -EEXIST);

prealloc->state |= bits;
merge_state(tree, prealloc);
prealloc = NULL;
goto out;
}

goto search_again;

out:
Expand Down

0 comments on commit d140632

Please sign in to comment.