Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa91647c authored by Sage Weil's avatar Sage Weil
Browse files

ceph: make mds requests killable, not interruptible



The underlying problem is that many mds requests can't be restarted.  For
example, a restarted create() would return -EEXIST if the original request
succeeds.  However, we do not want a hung MDS to hang the client too.  So,
use the _killable wait_for_completion variants to abort on SIGKILL but
nothing else.

Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 0aa12fb4
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1768,12 +1768,12 @@ int ceph_mdsc_do_request(struct ceph_mds_client *mdsc,
	mutex_unlock(&mdsc->mutex);
	mutex_unlock(&mdsc->mutex);
	dout("do_request waiting\n");
	dout("do_request waiting\n");
	if (req->r_timeout) {
	if (req->r_timeout) {
		err = (long)wait_for_completion_interruptible_timeout(
		err = (long)wait_for_completion_killable_timeout(
			&req->r_completion, req->r_timeout);
			&req->r_completion, req->r_timeout);
		if (err == 0)
		if (err == 0)
			err = -EIO;
			err = -EIO;
	} else {
	} else {
		err = wait_for_completion_interruptible(&req->r_completion);
		err = wait_for_completion_killable(&req->r_completion);
	}
	}
	dout("do_request waited, got %d\n", err);
	dout("do_request waited, got %d\n", err);
	mutex_lock(&mdsc->mutex);
	mutex_lock(&mdsc->mutex);