Skip to contentSkip to conversation

Waiters on OSD operations will hang if replies invalid?

DISCUSSION Li Wang 2 participants 2 messages Nov 7, 2013 – Nov 9, 2013 1 message not in the archive

lore
Share & tools
lore

Li Wang

author
#0 lore raw

For ceph_sync_write()/ceph_osdc_readpages()/ceph_osdc_writepages(), the user process or kernel thread will
wait for the pending OSD requests to complete on the corresponding req->r_completion. But it seems they only are waked up in handle_reply() and provided the replies are correct. What about if the replies are invalid, as the situations of label 'bad_put' in this function intended to capture, the waiters gotta hang there?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 7 lines · Li Wang

Hi Sage,
I am wondering if this issue is there. My understanding is that, for OSD
requests, if replies get lost, each request will get re-sent, even to different OSDs, if the Monitor tells the client corresponding OSD error. Then each request will finally get handled in handle_reply(), right? But, how about if the replies are invalid, as described below.
If this issue is really there, I will try to prepare patches.

Yeah, I think you are right. If we get an invalid reply something is clearly wrong with the cluster, so this isn't the highest concern, but it would definitely be better if the client failed with EIO instead of hanging forever. I suspect this is mainly a matter of making the bad_put label also set r_result and kick the waiters, although there is probably some reorganization that can be done to reorganize the flow in this function a bit and avoid duplicating any code.

Thanks!
sage

Quoted 26 lines

Cheers,
Li Wang

-------- Original Message --------
Subject: Waiters on OSD operations will hang if replies invalid?
Date: Thu, 07 Nov 2013 11:08:24 +0800
From: Li Wang <[email protected]>
To: [email protected] <[email protected]>
CC: Sage Weil <[email protected]>

For ceph_sync_write()/ceph_osdc_readpages()/ceph_osdc_writepages(), the user process or kernel thread will
wait for the pending OSD requests to complete on the corresponding req->r_completion. But it seems they only are waked up in handle_reply() and provided the replies are correct. What about if the replies are invalid, as the situations of label 'bad_put' in this function intended to capture, the waiters gotta hang there?
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html