Project

General

Profile

Actions

Bug #3859

closed

osd_client: define ceph_osdc_clear_request_linger()

Added by Alex Elder over 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

There is a ceph_osdc_set_request_linger() function that
sets a flag on a request and takes an additional reference.
There is no corresponding ceph_osdc_clear_request_linger()
function.

Instead, there is only ceph_osdc_unregister_linger_request(),
which clears the flag and drops the reference, but also
unregisters the request.

A linger request only gets registered after it has completed
(and in fact, not until the "safe" ONDISK completion).

OK, a few observations:
- There is no simple interface that allows one to wait for
the ONDISK completion event; I think there should be a
ceph_osdc_wait_request_safe() function, and that is what
registering a watch request should be using.
- There is no ceph_osdc_clear_request_linger(), and there
should be. Callers of the corresponding set routine should
be able to use that to clean up state, until the point at
which it is known complete (the wait succeeds), and at
that point ceph_osdc_unregister_linger_request() can
be used.

I started implementing this, and it should have been easy,
but the ceph_osdc_wait_request() does some stuff I don't
think it should when wait_for_completion_interruptible()
gets interrupted (http://tracker.newdream.net/issues/3858)
and I didn't want to go that far with it right now.

Actions

Also available in: Atom PDF