All of lore.kernel.org
 help / color / mirror / Atom feed
* why rbd journaling first write journal to journal pool and then write data
@ 2016-08-22  8:46 Jaze Lee
  2016-08-22  9:16 ` Mykola Golub
  2016-08-22  9:31 ` Ricardo Dias
  0 siblings, 2 replies; 4+ messages in thread
From: Jaze Lee @ 2016-08-22  8:46 UTC (permalink / raw)
  To: ceph-devel

Hi all:
   I found that rbd journaling first write journal and then write data.
   Why we not first write data and then write journal? Is there some
considerration
   for which is first ?

   Thanks a lot.

-- 
谦谦君子

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

* Re: why rbd journaling first write journal to journal pool and then write data
  2016-08-22  8:46 why rbd journaling first write journal to journal pool and then write data Jaze Lee
@ 2016-08-22  9:16 ` Mykola Golub
  2016-08-22  9:31 ` Ricardo Dias
  1 sibling, 0 replies; 4+ messages in thread
From: Mykola Golub @ 2016-08-22  9:16 UTC (permalink / raw)
  To: Jaze Lee; +Cc: ceph-devel

Jaze,

On Mon, Aug 22, 2016 at 04:46:04PM +0800, Jaze Lee wrote:

>    I found that rbd journaling first write journal and then write data.
>    Why we not first write data and then write journal? Is there some
> considerration
>    for which is first ?

It looks like you already asked this question some time ago. Have you
missed Jason's response?

http://www.spinics.net/lists/ceph-devel/msg30167.html

Or are you unsatisfied with his answer?

-- 
Mykola Golub

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

* Re: why rbd journaling first write journal to journal pool and then write data
  2016-08-22  8:46 why rbd journaling first write journal to journal pool and then write data Jaze Lee
  2016-08-22  9:16 ` Mykola Golub
@ 2016-08-22  9:31 ` Ricardo Dias
  2016-08-22 10:37   ` Ning Yao
  1 sibling, 1 reply; 4+ messages in thread
From: Ricardo Dias @ 2016-08-22  9:31 UTC (permalink / raw)
  To: Jaze Lee; +Cc: ceph-devel

Hi Jaze,

If you write data first, and you have a failure after writing data and before writing to the journal, then you cannot recover that write operation and it will be lost.

You can see the journal as a primary replica of data.

Ricardo Dias

Sent from my mobile phone

> On 22 Aug 2016, at 09:46, Jaze Lee <jazeltq@gmail.com> wrote:
> 
> Hi all:
>   I found that rbd journaling first write journal and then write data.
>   Why we not first write data and then write journal? Is there some
> considerration
>   for which is first ?
> 
>   Thanks a lot.
> 
> -- 
> 谦谦君子
> --
> 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] 4+ messages in thread

* Re: why rbd journaling first write journal to journal pool and then write data
  2016-08-22  9:31 ` Ricardo Dias
@ 2016-08-22 10:37   ` Ning Yao
  0 siblings, 0 replies; 4+ messages in thread
From: Ning Yao @ 2016-08-22 10:37 UTC (permalink / raw)
  To: Ricardo Dias; +Cc: Jaze Lee, ceph-devel

Hi, Ricardo

I got what you mean.

First of all, if we enable the rbd journaling, currently  write
latency will be doubled since it should wait for finish of the write
operation.

So If the issue is what you mentioned above. I think we have some
other ways to solve it. For example, we can snapshot the primary image
and run a whole image scan to find those objects which is different
from each other. And then delete the snapshot on the primary and
continue to replying journal again.  In this way, we can also maintain
the image consistency?
Regards
Ning Yao


2016-08-22 17:31 GMT+08:00 Ricardo Dias <ricardo.dias@suse.com>:
> Hi Jaze,
>
> If you write data first, and you have a failure after writing data and before writing to the journal, then you cannot recover that write operation and it will be lost.
>
> You can see the journal as a primary replica of data.
>
> Ricardo Dias
>
> Sent from my mobile phone
>
>> On 22 Aug 2016, at 09:46, Jaze Lee <jazeltq@gmail.com> wrote:
>>
>> Hi all:
>>   I found that rbd journaling first write journal and then write data.
>>   Why we not first write data and then write journal? Is there some
>> considerration
>>   for which is first ?
>>
>>   Thanks a lot.
>>
>> --
>> 谦谦君子
>> --
>> 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
>>
>
> --
> 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] 4+ messages in thread

end of thread, other threads:[~2016-08-22 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22  8:46 why rbd journaling first write journal to journal pool and then write data Jaze Lee
2016-08-22  9:16 ` Mykola Golub
2016-08-22  9:31 ` Ricardo Dias
2016-08-22 10:37   ` Ning Yao

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.