[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] [PATCH] Docs: improve description of disconnection methods



On 13 Apr 2016, at 17:09, Alex Bligh <alex@...872...> wrote:

> Here's what
> https://www.kernel.org/doc/Documentation/block/writeback_cache_control.txt
> has to say:

Aha. I found the original thread where I asked about this
(it was on linux-fsdevel):

http://www.spinics.net/lists/linux-fsdevel/msg45584.html

Specifically this from Tejun Heo who I believe is/was a block
layer / fs layer maintainer:

http://www.spinics.net/lists/linux-fsdevel/msg45616.html
> On Wed, May 25, 2011 at 5:54 PM, Alex Bligh <alex@...2378...> wrote:
> > a) If I do not complete a write command, I may avoid writing it to disk
> >  indefinitely (despite completing subsequently received FLUSH
> >  commands). The only flushes to disk that I am obliged to flush
> >  are those that I've actually told the block layer that I have done.
> 
> Yes, driver doesn't have any ordering responsibility w.r.t. FLUSH for
> writes which it hasn't declared finished yet.

> > b) If I receive a flush command, and prior to completing that flush
> >  command, I receive subsequent write commands, I may execute
> >  (and, if I like, write, to disk) write commands received AFTER that
> >  flush command. I presume if the subsequent write commands write to
> >  blocks that I am meant to be flushing, I can just forget about
> >  the blocks I am meant to be flushing (because they would be
> >  overwritten) provided *something* overwritten what was there before.
> 
> The first half is correct.  The latter half may be correct if there's
> no intervening write but _please_ don't do that.  If there's something
> to be optimized there, it should be done in upper layers.  It's
> playing with fire.



--
Alex Bligh




Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


Reply to: