diff options
author | Alex Elder <elder@inktank.com> | 2013-05-22 20:54:25 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-03 15:32:37 -0700 |
commit | 96e4dac66f69d28af2b736e723364efbbdf9fdee (patch) | |
tree | cc21efe7b885bf5ac276650e4d554aa705079412 /include/linux | |
parent | 6af8652849a15e407b458a271ef9154e472f6dd4 (diff) |
libceph: add lingering request reference when registered
When an osd request is set to linger, the osd client holds onto the
request so it can be re-submitted following certain osd map changes.
The osd client holds a reference to the request until it is
unregistered. This is used by rbd for watch requests.
Currently, the reference is taken when the request is marked with
the linger flag. This means that if an error occurs after that
time but before the the request completes successfully, that
reference is leaked.
There's really no reason to take the reference until the request is
registered in the the osd client's list of lingering requests, and
that only happens when the lingering (watch) request completes
successfully.
So take that reference only when it gets registered following
succesful completion, and drop it (as before) when the request
gets unregistered. This avoids the reference problem on error
in rbd.
Rearrange ceph_osdc_unregister_linger_request() to avoid using
the request pointer after it may have been freed.
And hold an extra reference in kick_requests() while handling
a linger request that has not yet been registered, to ensure
it doesn't go away.
This resolves:
http://tracker.ceph.com/issues/3859
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions