diff options
author | Josef Bacik <jbacik@fb.com> | 2014-03-13 19:42:13 (GMT) |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-04-07 00:39:30 (GMT) |
commit | 9e351cc862b098d8ec8f8022d110932490794925 (patch) | |
tree | 97320881e91cfc1190a35516bb4bcfb2c95698e4 /include/math-emu | |
parent | a26e8c9f75b0bfd8cccc9e8f110737b136eb5994 (diff) | |
download | linux-9e351cc862b098d8ec8f8022d110932490794925.tar.xz |
Btrfs: remove transaction from send
Lets try this again. We can deadlock the box if we send on a box and try to
write onto the same fs with the app that is trying to listen to the send pipe.
This is because the writer could get stuck waiting for a transaction commit
which is being blocked by the send. So fix this by making sure looking at the
commit roots is always going to be consistent. We do this by keeping track of
which roots need to have their commit roots swapped during commit, and then
taking the commit_root_sem and swapping them all at once. Then make sure we
take a read lock on the commit_root_sem in cases where we search the commit root
to make sure we're always looking at a consistent view of the commit roots.
Previously we had problems with this because we would swap a fs tree commit root
and then swap the extent tree commit root independently which would cause the
backref walking code to screw up sometimes. With this patch we no longer
deadlock and pass all the weird send/receive corner cases. Thanks,
Reportedy-by: Hugo Mills <hugo@carfax.org.uk>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'include/math-emu')
0 files changed, 0 insertions, 0 deletions