Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332592
b: refs/heads/master
c: 67b0fd6
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik authored and Chris Mason committed Oct 9, 2012
1 parent dd4cb48 commit 1c74f42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 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: 354aa0fb6d5b97b262e056f7ad7bfc88d7ce0004
refs/heads/master: 67b0fd63d5466bb710677afd3d2b77926c55f662
20 changes: 10 additions & 10 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3817,10 +3817,10 @@ static int may_commit_transaction(struct btrfs_root *root,
}

enum flush_state {
FLUSH_DELALLOC = 1,
FLUSH_DELALLOC_WAIT = 2,
FLUSH_DELAYED_ITEMS_NR = 3,
FLUSH_DELAYED_ITEMS = 4,
FLUSH_DELAYED_ITEMS_NR = 1,
FLUSH_DELAYED_ITEMS = 2,
FLUSH_DELALLOC = 3,
FLUSH_DELALLOC_WAIT = 4,
ALLOC_CHUNK = 5,
COMMIT_TRANS = 6,
};
Expand All @@ -3834,11 +3834,6 @@ static int flush_space(struct btrfs_root *root,
int ret = 0;

switch (state) {
case FLUSH_DELALLOC:
case FLUSH_DELALLOC_WAIT:
shrink_delalloc(root, num_bytes, orig_bytes,
state == FLUSH_DELALLOC_WAIT);
break;
case FLUSH_DELAYED_ITEMS_NR:
case FLUSH_DELAYED_ITEMS:
if (state == FLUSH_DELAYED_ITEMS_NR) {
Expand All @@ -3859,6 +3854,11 @@ static int flush_space(struct btrfs_root *root,
ret = btrfs_run_delayed_items_nr(trans, root, nr);
btrfs_end_transaction(trans, root);
break;
case FLUSH_DELALLOC:
case FLUSH_DELALLOC_WAIT:
shrink_delalloc(root, num_bytes, orig_bytes,
state == FLUSH_DELALLOC_WAIT);
break;
case ALLOC_CHUNK:
trans = btrfs_join_transaction(root);
if (IS_ERR(trans)) {
Expand Down Expand Up @@ -3903,7 +3903,7 @@ static int reserve_metadata_bytes(struct btrfs_root *root,
struct btrfs_space_info *space_info = block_rsv->space_info;
u64 used;
u64 num_bytes = orig_bytes;
int flush_state = FLUSH_DELALLOC;
int flush_state = FLUSH_DELAYED_ITEMS_NR;
int ret = 0;
bool flushing = false;
bool committed = false;
Expand Down

0 comments on commit 1c74f42

Please sign in to comment.