The changes involved in introducing the deep-flatten feature in the
Infernalis release resulted in new clone copy-on-write handling. I
would suggest retrying with a jewel release client.

On Tue, Apr 11, 2017 at 6:56 AM, 许雪寒 <xuxue...@360.cn> wrote:
> Thanks for your help:-)
>
> By the way, could you give us some hint why Infernalis and later releases 
> don't have this problem, please? Thank you.
>
> -----邮件原件-----
> 发件人: Jason Dillaman [mailto:jdill...@redhat.com]
> 发送时间: 2017年4月11日 4:30
> 收件人: 许雪寒
> 抄送: ceph-users@lists.ceph.com
> 主题: Re: 答复: [ceph-users] 答复: 答复: rbd expord-diff aren't counting AioTruncate 
> op correctly
>
> I tested it on Hammer and I can recreate what you are seeing. The good news 
> is that Infernalis and later releases behave correctly -- they list the range 
> 1M-4M as dirty. Since Hammer is approaching end-of-life, I wouldn't 
> realistically expect this to be fixed -- but I did open a tracker ticket to 
> document it [1].
>
> [1] http://tracker.ceph.com/issues/19570
>
> On Sun, Apr 9, 2017 at 4:40 AM, 许雪寒 <xuxue...@360.cn> wrote:
>> Oh, sorry again. We didn't resize the image, just "aio_discard"ed the data 
>> from the offset 1048576 to the end of the rbd image.
>> ________________________________________
>> 发件人: 许雪寒
>> 发送时间: 2017年4月9日 16:37
>> 收件人: dilla...@redhat.com
>> Cc: ceph-users@lists.ceph.com
>> 主题: 答复: [ceph-users] 答复: 答复:  rbd expord-diff aren't counting
>> AioTruncate op correctly
>>
>> Ah, sorry, I didn't understand you correctyly. We did use the 
>> librbd::Image::aio_discard method to resize the image from 4MB to 1MB.
>> ________________________________________
>> 发件人: ceph-users [ceph-users-boun...@lists.ceph.com] 代表 许雪寒
>> [xuxue...@360.cn]
>> 发送时间: 2017年4月3日 23:27
>> 收件人: dilla...@redhat.com
>> Cc: ceph-users@lists.ceph.com
>> 主题: [ceph-users] 答复: 答复:  rbd expord-diff aren't counting AioTruncate
>> op correctly
>>
>> Hi, actually, in our test, we created an image with the size 4MB which means 
>> it has only one object, then we write data into it, create a snap, clone it 
>> and create a snap of the new image, say "snap1", and then we send a 
>> "AioTruncate" to truncate the image to 1MB and create the second snap of the 
>> new image, say "snap2". Then, we use export-diff to calculate the "diff" 
>> between snap1 and snap2. By examing the result of export-diff, we confirmed 
>> that only the data that left in object are recorded into the export-diff's 
>> result, the truncate operation is lost.
>>
>> By the way, according to our understanding of the source code, it seems that 
>> the reason for this is that when doing copy-up, no clone is created even if 
>> there has already been some snapshot of the new image. So,  if there's only 
>> one "WRITE" op is sent to the object, which leads to a "copy-up", before a 
>> new snapshot is created after which a export-diff is conducted, the 
>> export-diff will copy all the data in the HEAD object, which, in our case, 
>> is not the "diff" that we want.
>> ________________________________________
>> 发件人: Jason Dillaman [jdill...@redhat.com]
>> 发送时间: 2017年4月3日 23:00
>> 收件人: 许雪寒
>> Cc: ceph-users@lists.ceph.com
>> 主题: Re: 答复: [ceph-users] rbd expord-diff aren't counting AioTruncate
>> op correctly
>>
>> Are you referring to the class "AioTruncate"? If so, *how* did you
>> issue the truncate against a specific object? Did you use the RBD
>> API's discard method? Did you resize an image? I need a repeatable set
>> of instructions.
>>
>> On Mon, Apr 3, 2017 at 10:58 AM, 许雪寒 <xuxue...@360.cn> wrote:
>>> Hi, the operation we performed is AioTruncate.
>>> ________________________________________
>>> 发件人: Jason Dillaman [jdill...@redhat.com]
>>> 发送时间: 2017年4月3日 22:11
>>> 收件人: 许雪寒
>>> Cc: ceph-users@lists.ceph.com
>>> 主题: Re: [ceph-users] rbd expord-diff aren't counting AioTruncate op
>>> correctly
>>>
>>> On Fri, Mar 31, 2017 at 10:36 PM, 许雪寒 <xuxue...@360.cn> wrote:
>>>> We created an image, write data into it, then protect it and clone a new 
>>>> image. Then we create a snapshot, snap1, of the cloned image, then 
>>>> truncate it and create a snapshot, snap2. In the diff of the two snapshot, 
>>>> we found that only the data that are not truncated is recorded in the 
>>>> diff, which means the truncate operation is not reflected by the diff.
>>>
>>> When you say "truncate" above, what specific operation are you
>>> performing so that I can attempt to recreate it?
>>>
>>>
>>> --
>>> Jason
>>
>>
>>
>> --
>> Jason
>> _______________________________________________
>> ceph-users mailing list
>> ceph-users@lists.ceph.com
>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
>
>
> --
> Jason



-- 
Jason
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to