User: Password:
Subscribe / Log in / New account

Re: [PATCH 1/7] block: Add block_flush_device()

From:  Alan Cox <>
To:  Linus Torvalds <>
Subject:  Re: [PATCH 1/7] block: Add block_flush_device()
Date:  Tue, 31 Mar 2009 17:29:11 +0100
Message-ID:  <>
Cc:  Ric Wheeler <>, Jens Axboe <>, Fernando Luis =?ISO-8859-14?B?VuF6cXVleg==?= Cao <>, Jeff Garzik <>, Christoph Hellwig <>, Theodore Tso <>, Ingo Molnar <>, Arjan van de Ven <>, Andrew Morton <>, Peter Zijlstra <>, Nick Piggin <>, David Rees <>, Jesper Krogh <>, Linux Kernel Mailing List <>,,,
Archive-link:  Article

> And the filesystem shouldn't know, and it most definitely mustr not act 
> any differently. Because that's behind the abstraction, and there's no 
> sane way to bring it _out_ of the abstraction that isn't fundamentally 
> flawed (like thinking that it's always a SATA-II drive).

How the file system responds has to depend upon what the users intents
are with regards to still having their data.

In a lot of cases "flush if you can" makes good sense. In higher
integrity cases you want a way to tell the device "flush if you can, do
whatever else is needed to fake a flush if not" and in some cases you
genuinely want to propogate errors back at mount time to say "sorry can't
do this"

Agreed entirely that this shouldn't be expressed down the stack in terms
of things like 'tags' or 'write with fua', but unless the different
versions of it can be expressed, or refused you can't build a good enough
abstraction. Throw and pray the block layer can fake it simply isn't a
valid model for serious enterprise computing, and if people understood
the worst cases, for a lot of non enterprise computing.

The second problem is who has sufficient information to efficiently
handle decisions around ordering/barriers/flushes/single outstanding
command and other strategies. I am skeptical that in the case where the
underlying block subsystem provides suboptimal ordering/barrier
facilities that it falling back to alternatives without letting the fs
also change strategies will be efficient.


(Log in to post comments)

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds