Re: [BUG] rbd discard should return OK even if rbd file does not exist

2012-11-19 Thread Stefan Priebe - Profihost AG
Hi Josh, i got the following info from the qemu devs. The discards get canceled by the client kernel as they take TOO long. This happens due to the fact that ceph handle discards as buffered I/O. I see that there are max pending 800 requests. And rbd returns success first when there are no

Re: [BUG] rbd discard should return OK even if rbd file does not exist

2012-11-19 Thread Stefan Priebe - Profihost AG
sorry meant the building in this case. The building of 900 requests takes too long. So the kernel starts to cancel these I/O requests. void AioCompletion::finish_adding_requests(CephContext *cct) { ldout(cct, 20) AioCompletion::finish_adding_requests (void*)this pending

Re: [BUG] rbd discard should return OK even if rbd file does not exist

2012-11-19 Thread Stefan Priebe - Profihost AG
Hi Josh, sorry for the bunch of mails. It turns out not to be a bug in RBD or ceph but a bug in the linux kernel itself. Paolo from qemu told me the linux kernel should serialize these requests instead of sending the whole bunch and then hoping that all of them get's handling in miliseconds.

Re: [BUG] rbd discard should return OK even if rbd file does not exist

2012-11-19 Thread Stefan Priebe - Profihost AG
But strange enough this works fine with normal iscsi target... no idea why. Stefan Am 19.11.2012 11:15, schrieb Stefan Priebe - Profihost AG: Hi Josh, sorry for the bunch of mails. It turns out not to be a bug in RBD or ceph but a bug in the linux kernel itself. Paolo from qemu told me the

Re: [BUG] rbd discard should return OK even if rbd file does not exist

2012-11-18 Thread Stefan Priebe - Profihost AG
Maybe thats the problem. Finalize gets never called so qemu block driver doesn't get any feedback and then cancels the io / request. Stefan Am 18.11.2012 um 03:38 schrieb Josh Durgin josh.dur...@inktank.com: On 11/17/2012 02:19 PM, Stefan Priebe wrote: Hello list, right now librbd returns

Re: [BUG] rbd discard should return OK even if rbd file does not exist

2012-11-18 Thread Stefan Priebe - Profihost AG
Its done as buffered io. So finalize is only called when buffered is false? Stefan Am 18.11.2012 um 03:38 schrieb Josh Durgin josh.dur...@inktank.com: On 11/17/2012 02:19 PM, Stefan Priebe wrote: Hello list, right now librbd returns an error if i issue a discard for a sector / byterange

Re: [BUG] rbd discard should return OK even if rbd file does not exist

2012-11-18 Thread Stefan Priebe
mhm ok the finalize is only called if building is false and there are no pending requests. But the discard issued is a bunch of 1000 requests or so. So the finalize is only called in the end. And it seems this is too late for qemu block driver. Greets, Stefan Am 18.11.2012 03:38, schrieb Josh

Re: [BUG] rbd discard should return OK even if rbd file does not exist

2012-11-17 Thread Josh Durgin
On 11/17/2012 02:19 PM, Stefan Priebe wrote: Hello list, right now librbd returns an error if i issue a discard for a sector / byterange where ceph does not have any file as i had never written to this section. Thanks for bringing this up again. I haven't had time to dig deeper into it yet,

Re: [BUG] rbd discard should return OK even if rbd file does not exist

2012-11-17 Thread Stefan Priebe - Profihost AG
Hi Josh, Am 18.11.2012 um 03:38 schrieb Josh Durgin josh.dur...@inktank.com: On 11/17/2012 02:19 PM, Stefan Priebe wrote: Hello list, right now librbd returns an error if i issue a discard for a sector / byterange where ceph does not have any file as i had never written to this section.