Re: [PATCH] Change ll_rw_block() calls in JBD

Zoltan Menyhart
2006-05-19T10:01:47Z

I'd like to take this opportunity to ask some questions
I always wanted to ask about committing a transaction(*)
but were afraid to ask :-)

We wait for several types of I/O-s:
- "Wait for all previously submitted IO to complete" (t_sync_datalist)
- wait_for_iobuf: (t_buffers)
- wait_for_ctlbuf: (t_log_list)
before "journal_write_commit_record()" gets invoked.

Why do not we wait for them at the very last moment in batch, is
it important that e.g. all the buffers from "t_buffers" be
completed before we start with the ones on "t_log_list"?

If "JFS_BARRIER" is set, why do we wait for these I/O-s at all?
(The "ordered" attribute is set => all the previous I/O-s must have hit
the permanent storage before the commit record can do.)

Why do we let the EXT3 layer to decide, why do not we ask the "bio"
if the "ordered" attribute is supported and use it systematically?

There is a comment in "journal_write_commit_record()":

/* is it possible for another commit to fail at roughly
* the same time as this one?...

Another commit for the same journal?
(If not the same journal, why is it a problem?)

If a barrier-based sync has failed on a device, does the actual
I/O start by itself (not caring for the ordering issue)?

Thanks,

Zoltan