Umm. Maybe I'm mis-reading something, but they seem to all synchronize
with the journal with "ext3_journal_start/stop".
Which will at a minimum wait for 'j_barrier_count == 0' and 't_state !=
T_LOCKED'. Along with making sure that there are enough transaction
buffers.
Do I understand _why_ ext3 does that? Hell no. The code makes no sense to
me. But I don't think I'm wrong.
Look at the sane case (data=ordered): it still does
handle = ext3_journal_start(inode, ext3_writepage_trans_blocks(inode));
...
err = ext3_journal_stop(handle);
around all the IO starting. Never mind that the IO shouldn't be needing
any journal activity at all afaik in any common case.
Yes, yes, it may need to allocate backing store (a page that was dirtied
by mmap), and I'm sure that's the reason for it all, but the point is,
most of the time there should be no journal activity at all, yet it looks
very much like a simple writepage() will synchronize with a full journal
and wait for the journal to get space.
No?
So tell me again how the VM can rely on the filesystem not blocking at
random points.
Linus
--