[lkml]   [2006]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ext3_ordered_writepage() questions
On Thu, 2006-03-16 at 13:09 -0500, Theodore Ts'o wrote:
> > >Yup. Ordered-mode JBD commit needs to write and wait upon all dirty
> > >file-data buffers prior to journalling the metadata. If we didn't run
> > >journal_dirty_data_fn() against those buffers then they'd still be under
> > >I/O after commit had completed.
> > >
> > In non-block allocation case, what metadata are we journaling in
> > writepage() ?
> > block allocation happend in prepare_write() and commit_write() journaled the
> > transaction. All the meta data updates should be done there. What JBD
> > commit are you refering to here ?
> Basically, this boils down to what is our definition of ordered-mode?
> If the goal is to make sure we avoid the security exposure of
> allocating a block and then crashing before we write the data block,
> potentially exposing previously written data that might be belong to
> another user, then what Badari is suggesting would avoid this
> particular problem.

Yes, if the block allocation is needed, my patch is basically
no-op, we go through regular code.

> However, if what we are doing is overwriting our own data with more an
> updated, more recent version of the data block, do we guarantee that
> any ordering semantics apply? For example, what if we write a data
> block, and then follow it up with some kind of metadata update (say we
> touch atime, or add an extended attribute). Do we guarantee that if
> the metadata update is committed, that the data block will have made
> it to disk as well?

I don't see how we do this today. Yes. Metadata updates are jounalled,
but I don't see how current adding buffers through journal_dirty_data
(bh) call can guarantee that these buffers get added to metadata-update
transaction ?

> Today that is the way things work, but is that
> guarantee part of the contract of ordered-mode?

BTW, thanks Ted for putting this in human-readable terms :)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-03-16 19:23    [W:0.102 / U:0.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site