[Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling

2016-06-15 Thread Dmitry Monakhov
barrier code is broken in many ways: Currently only ->dio_submit() handles PLOOP_REQ_FORCE_{FLUSH,FUA} correctly. But request also can goes though ->dio_submit_alloc()->dio_submit_pad and write_page (for indexes) So in case of grow_dev we have following sequance: E_RELOC_DATA_READ: -

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling

2016-06-15 Thread Maxim Patlasov
Dima, I agree that the ploop barrier code is broken in many ways, but I don't think the patch actually fixes it. I hope you would agree that completion of REQ_FUA guarantees only landing that particular bio to the disk; it says nothing about flushing previously submitted (and completed) bio-s

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling

2016-06-16 Thread Dmitry Monakhov
Maxim Patlasov writes: > Dima, > > I agree that the ploop barrier code is broken in many ways, but I don't > think the patch actually fixes it. I hope you would agree that > completion of REQ_FUA guarantees only landing that particular bio to the > disk; it says nothing about flushing previous

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling

2016-06-16 Thread Dmitry Monakhov
Dmitry Monakhov writes: > Maxim Patlasov writes: > >> Dima, >> >> I agree that the ploop barrier code is broken in many ways, but I don't >> think the patch actually fixes it. I hope you would agree that >> completion of REQ_FUA guarantees only landing that particular bio to the >> disk; it s

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling

2016-06-16 Thread Maxim Patlasov
On 06/16/2016 09:30 AM, Dmitry Monakhov wrote: Dmitry Monakhov writes: Maxim Patlasov writes: Dima, I agree that the ploop barrier code is broken in many ways, but I don't think the patch actually fixes it. I hope you would agree that completion of REQ_FUA guarantees only landing that part

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling

2016-06-19 Thread Dmitry Monakhov
Maxim Patlasov writes: > On 06/16/2016 09:30 AM, Dmitry Monakhov wrote: >> Dmitry Monakhov writes: >> >>> Maxim Patlasov writes: >>> Dima, I agree that the ploop barrier code is broken in many ways, but I don't think the patch actually fixes it. I hope you would agree that >

[Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling v2

2016-06-20 Thread Dmitry Monakhov
barrier code is broken in many ways: Currently only ->dio_submit() handles PLOOP_REQ_FORCE_{FLUSH,FUA} correctly. But request also can goes though ->dio_submit_alloc()->dio_submit_pad and write_page (for indexes) So in case of grow_dev we have following sequance: E_RELOC_DATA_READ: -

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling

2016-06-20 Thread Maxim Patlasov
Dima, On 06/19/2016 06:06 AM, Dmitry Monakhov wrote: Maxim Patlasov writes: On 06/16/2016 09:30 AM, Dmitry Monakhov wrote: Dmitry Monakhov writes: Maxim Patlasov writes: Dima, I agree that the ploop barrier code is broken in many ways, but I don't think the patch actually fixes it. I

[Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling v3

2016-06-21 Thread Dmitry Monakhov
barrier code is broken in many ways: Currently only ->dio_submit() handles PLOOP_REQ_FORCE_{FLUSH,FUA} correctly. But request also can goes though ->dio_submit_alloc()->dio_submit_pad and write_page (for indexes) So in case of grow_dev we have following sequance: E_RELOC_DATA_READ: -

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling v2

2016-06-20 Thread Maxim Patlasov
Dima, I agree with general approach of this patch, but there are some (easy-to-fix) issues. See, please, inline comments below... On 06/20/2016 11:58 AM, Dmitry Monakhov wrote: barrier code is broken in many ways: Currently only ->dio_submit() handles PLOOP_REQ_FORCE_{FLUSH,FUA} correctly. Bu

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling v2

2016-06-21 Thread Dmitry Monakhov
Maxim Patlasov writes: > Dima, > > I agree with general approach of this patch, but there are some > (easy-to-fix) issues. See, please, inline comments below... > > On 06/20/2016 11:58 AM, Dmitry Monakhov wrote: >> barrier code is broken in many ways: >> Currently only ->dio_submit() handles PLO

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling v2

2016-06-21 Thread Maxim Patlasov
On 06/21/2016 12:25 AM, Dmitry Monakhov wrote: Maxim Patlasov writes: Dima, I agree with general approach of this patch, but there are some (easy-to-fix) issues. See, please, inline comments below... On 06/20/2016 11:58 AM, Dmitry Monakhov wrote: barrier code is broken in many ways: Current

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling v3

2016-06-21 Thread Maxim Patlasov
Dima, After more thinking I realized that the whole idea of PLOOP_REQ_DELAYED_FLUSH might be bogus: it is possible that we simply do not have many enough incoming FUA-s to make delaying lucrative. This patch actually mixes three things: 1) fix barriers for RELOC_A|S requests, 2) fix barriers

Re: [Devel] [PATCH 3/3] ploop: fixup FORCE_{FLUSH,FUA} handling v3

2016-06-22 Thread Maxim Patlasov
Dima, I'm uneasy that we still have handling RELOC_A|S broken. It seems we have full agreement that for such requests we can do unconditional FLUSH|FUA when we call write_page from ploop_index_update() and map_wb_complete(). And your idea to implement it by passing FLUSH|FUA for io_direct and