diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2013-02-20 04:13:32 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-02-20 13:00:02 -0500 |
commit | 4b82490649f5c8ecbf888752c325ea68831c497e (patch) | |
tree | fac234e29328709e2b7f08277f95ae7f61d32a0e | |
parent | cdb4c5748cb3ac533889a6b0b95aa10651e68785 (diff) |
Btrfs: fix the qgroup reserved space is released prematurely
In start_transactio(), we will try to join the transaction again after
the current transaction is committed, so we should not release the
reserved space of the qgroup. Fix it.
Cc: Arne Jansen <sensille@gmx.net>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
-rw-r--r-- | fs/btrfs/transaction.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 0c87d18d1881..425d5b57d377 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -383,7 +383,7 @@ again: | |||
383 | h->block_rsv = NULL; | 383 | h->block_rsv = NULL; |
384 | h->orig_rsv = NULL; | 384 | h->orig_rsv = NULL; |
385 | h->aborted = 0; | 385 | h->aborted = 0; |
386 | h->qgroup_reserved = qgroup_reserved; | 386 | h->qgroup_reserved = 0; |
387 | h->delayed_ref_elem.seq = 0; | 387 | h->delayed_ref_elem.seq = 0; |
388 | h->type = type; | 388 | h->type = type; |
389 | h->allocating_chunk = false; | 389 | h->allocating_chunk = false; |
@@ -402,6 +402,7 @@ again: | |||
402 | h->block_rsv = &root->fs_info->trans_block_rsv; | 402 | h->block_rsv = &root->fs_info->trans_block_rsv; |
403 | h->bytes_reserved = num_bytes; | 403 | h->bytes_reserved = num_bytes; |
404 | } | 404 | } |
405 | h->qgroup_reserved = qgroup_reserved; | ||
405 | 406 | ||
406 | got_it: | 407 | got_it: |
407 | btrfs_record_root_in_trans(h, root); | 408 | btrfs_record_root_in_trans(h, root); |