All of lore.kernel.org
 help / color / mirror / Atom feed
* Waiters on OSD operations will hang if replies invalid?
@ 2013-11-07  3:08 Li Wang
       [not found] ` <527D96BC.3020502@ubuntukylin.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Li Wang @ 2013-11-07  3:08 UTC (permalink / raw)
  To: ceph-devel@vger.kernel.org; +Cc: Sage Weil

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?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fwd: Waiters on OSD operations will hang if replies invalid?
       [not found] ` <527D96BC.3020502@ubuntukylin.com>
@ 2013-11-09  6:06   ` Sage Weil
  0 siblings, 0 replies; 2+ messages in thread
From: Sage Weil @ 2013-11-09  6:06 UTC (permalink / raw)
  To: Li Wang; +Cc: ceph-devel

On Sat, 9 Nov 2013, Li Wang wrote:
> 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

> 
> 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 <liwang@ubuntukylin.com>
> To: ceph-devel@vger.kernel.org <ceph-devel@vger.kernel.org>
> CC: Sage Weil <sage@inktank.com>
> 
> 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-09  6:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07  3:08 Waiters on OSD operations will hang if replies invalid? Li Wang
     [not found] ` <527D96BC.3020502@ubuntukylin.com>
2013-11-09  6:06   ` Fwd: " Sage Weil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.