Re: [Lsf] Preliminary Agenda and Activities for LSF

Joel Becker
2011-04-01T21:47:00Z

On Fri, Apr 01, 2011 at 09:30:04AM -0700, Amir Goldstein wrote:
> when writing DIO to indirect mapped file holes, we fall back to buffered write
> (so we won't expose stale data in the case of a crash) concurrent DIO reads
> to that file (before data writeback) can expose stale data. right?
> do you consider this case mixing buffered and DIO access?
> do you consider that as a problem?

I do not consider this 'mixing', nor do I consider it a problem.
ocfs2 does exactly this for holes, unwritten extents, and CoW. It does
not violate the user's expectation that the data will be on disk when
the write(2) returns.
Falling back to buffered on read(2) is a different story; the
caller wants the current state of the disk block, not five minutes ago.
So we can't do that. But we also don't need to.
O_DIRECT users that are worried about any possible space usage in
the page cache have already pre-allocated their disk blocks and don't
get here.

Joel

--

"Under capitalism, man exploits man. Under Communism, it's just
the opposite."
- John Kenneth Galbraith

http://www.jlbec.org/
jlbec@evilplan.org