All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] rbd discard should return OK even if rbd file does not exist
@ 2012-11-17 22:19 Stefan Priebe
  2012-11-18  2:38 ` Josh Durgin
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Priebe @ 2012-11-17 22:19 UTC (permalink / raw)
  To: ceph-devel

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.

This is not correct. It should return 0 / OK in this case.

Stefan

Examplelog:
2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT
2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion: 
AioCompletion::complete_request() this=0x7f72cc05bd20 
complete_cb=0x7f747021d4b0
2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 --> 
10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073 
rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0 
0x7f72d81c69b0 con 0x7f74600dbf50
2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid 
rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <== 
osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652 
rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or 
directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con 
0x7f74600e4350
2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write 
0x7f74600feab0 should_complete: r = -2



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

* Re: [BUG] rbd discard should return OK even if rbd file does not exist
  2012-11-17 22:19 [BUG] rbd discard should return OK even if rbd file does not exist Stefan Priebe
@ 2012-11-18  2:38 ` Josh Durgin
  2012-11-18  6:33   ` Stefan Priebe - Profihost AG
                     ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Josh Durgin @ 2012-11-18  2:38 UTC (permalink / raw)
  To: Stefan Priebe; +Cc: ceph-devel

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, but I definitely want to fix this for bobtail.

> This is not correct. It should return 0 / OK in this case.
>
> Stefan
>
> Examplelog:
> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT
> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion:
> AioCompletion::complete_request() this=0x7f72cc05bd20
> complete_cb=0x7f747021d4b0
> 2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 -->
> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073
> rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0
> 0x7f72d81c69b0 con 0x7f74600dbf50
> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid
> rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
> 2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <==
> osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652
> rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or
> directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con
> 0x7f74600e4350
> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write
> 0x7f74600feab0 should_complete: r = -2

This last line isn't printing what's actually being returned to the
application. It's still in librbd's internal processing, and will be
converted to 0 for the application.

Could you try with the master or next branches? After the
'should_complete' line, there should be a line like:

<date> <time> <thread_id> 20 librbd::AioCompletion: 
AioCompletion::finalize() rval 0 ...

That 'rval 0' shows the actual return value the application (qemu in
this case) will see.

Josh

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

* Re: [BUG] rbd discard should return OK even if rbd file does not exist
  2012-11-18  2:38 ` Josh Durgin
@ 2012-11-18  6:33   ` Stefan Priebe - Profihost AG
  2012-11-18 12:27   ` Stefan Priebe - Profihost AG
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-11-18  6:33 UTC (permalink / raw)
  To: Josh Durgin; +Cc: ceph-devel

Hi Josh,

Am 18.11.2012 um 03:38 schrieb Josh Durgin <josh.durgin@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.
> 
> Thanks for bringing this up again. I haven't had time to dig deeper
> into it yet, but I definitely want to fix this for bobtail.
> 
>> This is not correct. It should return 0 / OK in this case.
>> 
>> Stefan
>> 
>> Examplelog:
>> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT
>> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion:
>> AioCompletion::complete_request() this=0x7f72cc05bd20
>> complete_cb=0x7f747021d4b0
>> 2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 -->
>> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073
>> rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0
>> 0x7f72d81c69b0 con 0x7f74600dbf50
>> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid
>> rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
>> 2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <==
>> osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652
>> rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or
>> directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con
>> 0x7f74600e4350
>> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write
>> 0x7f74600feab0 should_complete: r = -2
> 
> This last line isn't printing what's actually being returned to the
> application. It's still in librbd's internal processing, and will be
> converted to 0 for the application.
> 
> Could you try with the master or next branches? After the
> 'should_complete' line, there should be a line like:
> 
> <date> <time> <thread_id> 20 librbd::AioCompletion: AioCompletion::finalize() rval 0 ...

No there's no such line. Maybe that's the problem and -2 is returned and not converted.

Stefan

> That 'rval 0' shows the actual return value the application (qemu in
> this case) will see.
> 
> Josh

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

* Re: [BUG] rbd discard should return OK even if rbd file does not exist
  2012-11-18  2:38 ` Josh Durgin
  2012-11-18  6:33   ` Stefan Priebe - Profihost AG
@ 2012-11-18 12:27   ` Stefan Priebe - Profihost AG
  2012-11-18 19:00   ` Stefan Priebe - Profihost AG
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-11-18 12:27 UTC (permalink / raw)
  To: Josh Durgin; +Cc: ceph-devel

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.durgin@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.
> 
> Thanks for bringing this up again. I haven't had time to dig deeper
> into it yet, but I definitely want to fix this for bobtail.
> 
>> This is not correct. It should return 0 / OK in this case.
>> 
>> Stefan
>> 
>> Examplelog:
>> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT
>> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion:
>> AioCompletion::complete_request() this=0x7f72cc05bd20
>> complete_cb=0x7f747021d4b0
>> 2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 -->
>> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073
>> rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0
>> 0x7f72d81c69b0 con 0x7f74600dbf50
>> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid
>> rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
>> 2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <==
>> osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652
>> rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or
>> directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con
>> 0x7f74600e4350
>> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write
>> 0x7f74600feab0 should_complete: r = -2
> 
> This last line isn't printing what's actually being returned to the
> application. It's still in librbd's internal processing, and will be
> converted to 0 for the application.
> 
> Could you try with the master or next branches? After the
> 'should_complete' line, there should be a line like:
> 
> <date> <time> <thread_id> 20 librbd::AioCompletion: AioCompletion::finalize() rval 0 ...
> 
> That 'rval 0' shows the actual return value the application (qemu in
> this case) will see.
> 
> Josh

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

* Re: [BUG] rbd discard should return OK even if rbd file does not exist
  2012-11-18  2:38 ` Josh Durgin
  2012-11-18  6:33   ` Stefan Priebe - Profihost AG
  2012-11-18 12:27   ` Stefan Priebe - Profihost AG
@ 2012-11-18 19:00   ` Stefan Priebe - Profihost AG
  2012-11-18 20:44   ` Stefan Priebe
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-11-18 19:00 UTC (permalink / raw)
  To: Josh Durgin; +Cc: ceph-devel

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.durgin@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.
> 
> Thanks for bringing this up again. I haven't had time to dig deeper
> into it yet, but I definitely want to fix this for bobtail.
> 
>> This is not correct. It should return 0 / OK in this case.
>> 
>> Stefan
>> 
>> Examplelog:
>> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT
>> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion:
>> AioCompletion::complete_request() this=0x7f72cc05bd20
>> complete_cb=0x7f747021d4b0
>> 2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 -->
>> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073
>> rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0
>> 0x7f72d81c69b0 con 0x7f74600dbf50
>> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid
>> rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
>> 2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <==
>> osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652
>> rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or
>> directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con
>> 0x7f74600e4350
>> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write
>> 0x7f74600feab0 should_complete: r = -2
> 
> This last line isn't printing what's actually being returned to the
> application. It's still in librbd's internal processing, and will be
> converted to 0 for the application.
> 
> Could you try with the master or next branches? After the
> 'should_complete' line, there should be a line like:
> 
> <date> <time> <thread_id> 20 librbd::AioCompletion: AioCompletion::finalize() rval 0 ...
> 
> That 'rval 0' shows the actual return value the application (qemu in
> this case) will see.
> 
> Josh

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

* Re: [BUG] rbd discard should return OK even if rbd file does not exist
  2012-11-18  2:38 ` Josh Durgin
                     ` (2 preceding siblings ...)
  2012-11-18 19:00   ` Stefan Priebe - Profihost AG
@ 2012-11-18 20:44   ` Stefan Priebe
  2012-11-19  8:38   ` Stefan Priebe - Profihost AG
  2012-11-19 10:15   ` Stefan Priebe - Profihost AG
  5 siblings, 0 replies; 10+ messages in thread
From: Stefan Priebe @ 2012-11-18 20:44 UTC (permalink / raw)
  To: Josh Durgin; +Cc: ceph-devel

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 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, but I definitely want to fix this for bobtail.
>
>> This is not correct. It should return 0 / OK in this case.
>>
>> Stefan
>>
>> Examplelog:
>> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT
>> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion:
>> AioCompletion::complete_request() this=0x7f72cc05bd20
>> complete_cb=0x7f747021d4b0
>> 2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 -->
>> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073
>> rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0
>> 0x7f72d81c69b0 con 0x7f74600dbf50
>> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid
>> rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
>> 2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <==
>> osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652
>> rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or
>> directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con
>> 0x7f74600e4350
>> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write
>> 0x7f74600feab0 should_complete: r = -2
>
> This last line isn't printing what's actually being returned to the
> application. It's still in librbd's internal processing, and will be
> converted to 0 for the application.
>
> Could you try with the master or next branches? After the
> 'should_complete' line, there should be a line like:
>
> <date> <time> <thread_id> 20 librbd::AioCompletion:
> AioCompletion::finalize() rval 0 ...
>
> That 'rval 0' shows the actual return value the application (qemu in
> this case) will see.
>
> Josh

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

* Re: [BUG] rbd discard should return OK even if rbd file does not exist
  2012-11-18  2:38 ` Josh Durgin
                     ` (3 preceding siblings ...)
  2012-11-18 20:44   ` Stefan Priebe
@ 2012-11-19  8:38   ` Stefan Priebe - Profihost AG
  2012-11-19  9:42     ` Stefan Priebe - Profihost AG
  2012-11-19 10:15   ` Stefan Priebe - Profihost AG
  5 siblings, 1 reply; 10+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-11-19  8:38 UTC (permalink / raw)
  To: Josh Durgin; +Cc: ceph-devel

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 requests left. This is TOO long for the kernel.

I think discards must be changed to unbuffered I/O to solve this.

Greets,
Stefan

Am 18.11.2012 03:38, schrieb 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, but I definitely want to fix this for bobtail.
>
>> This is not correct. It should return 0 / OK in this case.
>>
>> Stefan
>>
>> Examplelog:
>> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT
>> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion:
>> AioCompletion::complete_request() this=0x7f72cc05bd20
>> complete_cb=0x7f747021d4b0
>> 2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 -->
>> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073
>> rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0
>> 0x7f72d81c69b0 con 0x7f74600dbf50
>> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid
>> rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
>> 2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <==
>> osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652
>> rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or
>> directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con
>> 0x7f74600e4350
>> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write
>> 0x7f74600feab0 should_complete: r = -2
>
> This last line isn't printing what's actually being returned to the
> application. It's still in librbd's internal processing, and will be
> converted to 0 for the application.
>
> Could you try with the master or next branches? After the
> 'should_complete' line, there should be a line like:
>
> <date> <time> <thread_id> 20 librbd::AioCompletion:
> AioCompletion::finalize() rval 0 ...
>
> That 'rval 0' shows the actual return value the application (qemu in
> this case) will see.
>
> Josh

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

* Re: [BUG] rbd discard should return OK even if rbd file does not exist
  2012-11-19  8:38   ` Stefan Priebe - Profihost AG
@ 2012-11-19  9:42     ` Stefan Priebe - Profihost AG
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-11-19  9:42 UTC (permalink / raw)
  To: Josh Durgin; +Cc: ceph-devel

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 " << pending_count << dendl;
     lock.Lock();
     assert(building);
     building = false;
     if (!pending_count) {
       finalize(cct, rval);
       complete();
     }
     lock.Unlock();
   }

Finanlize and complete is only done when pending_count is 0 so all I/O 
is done.

Stefan

Am 19.11.2012 09:38, schrieb 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 requests left. This is TOO long for the kernel.
>
> I think discards must be changed to unbuffered I/O to solve this.
>
> Greets,
> Stefan
>
> Am 18.11.2012 03:38, schrieb 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, but I definitely want to fix this for bobtail.
>>
>>> This is not correct. It should return 0 / OK in this case.
>>>
>>> Stefan
>>>
>>> Examplelog:
>>> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest:
>>> WRITE_FLAT
>>> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion:
>>> AioCompletion::complete_request() this=0x7f72cc05bd20
>>> complete_cb=0x7f747021d4b0
>>> 2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 -->
>>> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073
>>> rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0
>>> 0x7f72d81c69b0 con 0x7f74600dbf50
>>> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid
>>> rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
>>> 2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <==
>>> osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652
>>> rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or
>>> directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con
>>> 0x7f74600e4350
>>> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write
>>> 0x7f74600feab0 should_complete: r = -2
>>
>> This last line isn't printing what's actually being returned to the
>> application. It's still in librbd's internal processing, and will be
>> converted to 0 for the application.
>>
>> Could you try with the master or next branches? After the
>> 'should_complete' line, there should be a line like:
>>
>> <date> <time> <thread_id> 20 librbd::AioCompletion:
>> AioCompletion::finalize() rval 0 ...
>>
>> That 'rval 0' shows the actual return value the application (qemu in
>> this case) will see.
>>
>> Josh

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

* Re: [BUG] rbd discard should return OK even if rbd file does not exist
  2012-11-18  2:38 ` Josh Durgin
                     ` (4 preceding siblings ...)
  2012-11-19  8:38   ` Stefan Priebe - Profihost AG
@ 2012-11-19 10:15   ` Stefan Priebe - Profihost AG
  2012-11-19 10:17     ` Stefan Priebe - Profihost AG
  5 siblings, 1 reply; 10+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-11-19 10:15 UTC (permalink / raw)
  To: Josh Durgin; +Cc: ceph-devel

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.

Stefan

Am 18.11.2012 03:38, schrieb 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, but I definitely want to fix this for bobtail.
>
>> This is not correct. It should return 0 / OK in this case.
>>
>> Stefan
>>
>> Examplelog:
>> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest: WRITE_FLAT
>> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion:
>> AioCompletion::complete_request() this=0x7f72cc05bd20
>> complete_cb=0x7f747021d4b0
>> 2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 -->
>> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073
>> rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0
>> 0x7f72d81c69b0 con 0x7f74600dbf50
>> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid
>> rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
>> 2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <==
>> osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652
>> rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or
>> directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con
>> 0x7f74600e4350
>> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write
>> 0x7f74600feab0 should_complete: r = -2
>
> This last line isn't printing what's actually being returned to the
> application. It's still in librbd's internal processing, and will be
> converted to 0 for the application.
>
> Could you try with the master or next branches? After the
> 'should_complete' line, there should be a line like:
>
> <date> <time> <thread_id> 20 librbd::AioCompletion:
> AioCompletion::finalize() rval 0 ...
>
> That 'rval 0' shows the actual return value the application (qemu in
> this case) will see.
>
> Josh

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

* Re: [BUG] rbd discard should return OK even if rbd file does not exist
  2012-11-19 10:15   ` Stefan Priebe - Profihost AG
@ 2012-11-19 10:17     ` Stefan Priebe - Profihost AG
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-11-19 10:17 UTC (permalink / raw)
  To: Josh Durgin; +Cc: ceph-devel

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 linux kernel should serialize
> these requests instead of sending the whole bunch and then hoping that
> all of them get's handling in miliseconds.
>
> Stefan
>
> Am 18.11.2012 03:38, schrieb 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, but I definitely want to fix this for bobtail.
>>
>>> This is not correct. It should return 0 / OK in this case.
>>>
>>> Stefan
>>>
>>> Examplelog:
>>> 2012-11-02 21:06:17.649922 7f745f7fe700 20 librbd::AioRequest:
>>> WRITE_FLAT
>>> 2012-11-02 21:06:17.649924 7f745f7fe700 20 librbd::AioCompletion:
>>> AioCompletion::complete_request() this=0x7f72cc05bd20
>>> complete_cb=0x7f747021d4b0
>>> 2012-11-02 21:06:17.649924 7f747015c780  1 -- 10.10.0.2:0/2028325 -->
>>> 10.10.0.18:6803/9687 -- osd_op(client.26862.0:3073
>>> rb.0.1044.359ed6c7.000000000bde [delete] 3.bd84636 snapc 2=[]) v4 -- ?+0
>>> 0x7f72d81c69b0 con 0x7f74600dbf50
>>> 2012-11-02 21:06:17.649934 7f747015c780 20 librbd:  oid
>>> rb.0.1044.359ed6c7.000000000bdf 0~4194304 from [4156556288,4194304]
>>> 2012-11-02 21:06:17.649972 7f7465a6e700  1 -- 10.10.0.2:0/2028325 <==
>>> osd.1202 10.10.0.18:6806/9821 143 ==== osd_op_reply(1652
>>> rb.0.1044.359ed6c7.000000000652 [delete] ondisk = -2 (No such file or
>>> directory)) v4 ==== 130+0+0 (2964367729 0 0) 0x7f72dc0f0090 con
>>> 0x7f74600e4350
>>> 2012-11-02 21:06:17.649994 7f745f7fe700 20 librbd::AioRequest: write
>>> 0x7f74600feab0 should_complete: r = -2
>>
>> This last line isn't printing what's actually being returned to the
>> application. It's still in librbd's internal processing, and will be
>> converted to 0 for the application.
>>
>> Could you try with the master or next branches? After the
>> 'should_complete' line, there should be a line like:
>>
>> <date> <time> <thread_id> 20 librbd::AioCompletion:
>> AioCompletion::finalize() rval 0 ...
>>
>> That 'rval 0' shows the actual return value the application (qemu in
>> this case) will see.
>>
>> Josh
> --
> 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] 10+ messages in thread

end of thread, other threads:[~2012-11-19 10:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-17 22:19 [BUG] rbd discard should return OK even if rbd file does not exist Stefan Priebe
2012-11-18  2:38 ` Josh Durgin
2012-11-18  6:33   ` Stefan Priebe - Profihost AG
2012-11-18 12:27   ` Stefan Priebe - Profihost AG
2012-11-18 19:00   ` Stefan Priebe - Profihost AG
2012-11-18 20:44   ` Stefan Priebe
2012-11-19  8:38   ` Stefan Priebe - Profihost AG
2012-11-19  9:42     ` Stefan Priebe - Profihost AG
2012-11-19 10:15   ` Stefan Priebe - Profihost AG
2012-11-19 10:17     ` Stefan Priebe - Profihost AG

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.