diff options
author | Sage Weil <sage@newdream.net> | 2010-03-16 23:28:54 +0100 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-03-23 15:46:56 +0100 |
commit | 80fc7314a7e26e8d2e4ba5b3d8cc2d4aeb750015 (patch) | |
tree | a8f5c8ee76ac0b566332317388b716e70112088b /firmware/mts_edge.fw.ihex | |
parent | ceph: only release unused caps with mds requests (diff) | |
download | linux-80fc7314a7e26e8d2e4ba5b3d8cc2d4aeb750015.tar.xz linux-80fc7314a7e26e8d2e4ba5b3d8cc2d4aeb750015.zip |
ceph: fix mds sync() race with completing requests
The wait_unsafe_requests() helper dropped the mdsc mutex to wait
for each request to complete, and then examined r_node to get the
next request after retaking the lock. But the request completion
removes the request from the tree, so r_node was always undefined
at this point. Since it's a small race, it usually led to a
valid request, but not always. The result was an occasional
crash in rb_next() while dereferencing node->rb_left.
Fix this by clearing the rb_node when removing the request from
the request tree, and not walking off into the weeds when we
are done waiting for a request. Since the request we waited on
will _always_ be out of the request tree, take a ref on the next
request, in the hopes that it won't be. But if it is, it's ok:
we can start over from the beginning (and traverse over older read
requests again).
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'firmware/mts_edge.fw.ihex')
0 files changed, 0 insertions, 0 deletions