diff options
author | 2013-02-20 09:16:24 +0000 | |
---|---|---|
committer | 2013-02-20 13:00:03 -0500 | |
commit | 178260b2c14969f29ba39a78df74ed485abc6203 (patch) | |
tree | 56bf3f573112f898f3439d6e0a11d76fbb925bb0 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Btrfs: fix the qgroup reserved space is released prematurely (diff) | |
download | linux-dev-178260b2c14969f29ba39a78df74ed485abc6203.tar.xz linux-dev-178260b2c14969f29ba39a78df74ed485abc6203.zip |
Btrfs: fix the deadlock between the transaction start/attach and commit
Now btrfs_commit_transaction() does this
ret = btrfs_run_ordered_operations(root, 0)
which async flushes all inodes on the ordered operations list, it introduced
a deadlock that transaction-start task, transaction-commit task and the flush
workers waited for each other.
(See the following URL to get the detail
http://marc.info/?l=linux-btrfs&m=136070705732646&w=2)
As we know, if ->in_commit is set, it means someone is committing the
current transaction, we should not try to join it if we are not JOIN
or JOIN_NOLOCK, wait is the best choice for it. In this way, we can avoid
the above problem. In this way, there is another benefit: there is no new
transaction handle to block the transaction which is on the way of commit,
once we set ->in_commit.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions