diff options
author | Josef Bacik <josef@redhat.com> | 2011-12-02 15:44:12 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-01-16 15:29:42 -0500 |
commit | 90290e19820e3323ce6b9c2888eeb68bf29c278b (patch) | |
tree | cdac13a9718d326cdcd9f4b215a5739906a2325a /fs/mbcache.c | |
parent | 3f7de037fb3727b20bc27332cdcf2488b702394c (diff) | |
download | linux-90290e19820e3323ce6b9c2888eeb68bf29c278b.tar.bz2 |
Btrfs: protect orphan block rsv with spin_lock
We've been seeing warnings coming out of the orphan commit stuff forever from
ceph. Turns out it's because we're racing with checking if the orphan block
reserve is set, because we clear it outside of the spin_lock. So leave the
normal fastpath checks where they are, but take the spin_lock and _recheck_ to
make sure we haven't had an orphan block rsv added in the meantime. Then clear
the root's orphan block rsv and release the lock. With this patch a user said
the warnings went away and they usually showed up pretty soon after he started
ceph. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/mbcache.c')
0 files changed, 0 insertions, 0 deletions