From: Jamie Lokier <jamie@shareable.org>
To: Chris Mason <chris.mason@oracle.com>
Cc: jack@suse.cz, tytso@mit.edu, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH RFC] Ext3 data=guarded
Date: Thu, 17 Sep 2009 22:53:09 +0100 [thread overview]
Message-ID: <20090917215309.GD10599@shareable.org> (raw)
In-Reply-To: <1252422595-4554-1-git-send-email-chris.mason@oracle.com>
Chris Mason wrote:
> The main difference from data=ordered is that data=guarded only updates
> the on disk i_size after all of the data blocks are on disk. This allows
> us to avoid flushing all the data pages down to disk with every commit.
I'm a bit confused, because I thought that was already guaranteed by
ext3 data=ordered, due to the following mail:
Date: Thu, 16 Mar 2006 13:09:04 -0500
Subject: Re: ext3_ordered_writepage() questions
From: Theodore Ts'o <tytso@mit.edu>
> >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.
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? Today that is the way things work, but is that
guarantee part of the contract of ordered-mode?
- Ted
-- Jamie
next prev parent reply other threads:[~2009-09-17 21:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-08 15:09 [PATCH RFC] Ext3 data=guarded Chris Mason
2009-09-08 15:09 ` [PATCH 1/2] Ext3: Fix race in ext3_mark_inode_dirty Chris Mason
2009-09-08 15:09 ` [PATCH 2/2] Ext3: data=guarded mode Chris Mason
2009-09-15 17:29 ` Jan Kara
2009-09-15 18:39 ` Chris Mason
2009-09-16 14:09 ` Jan Kara
2009-09-16 14:37 ` Chris Mason
2009-09-21 16:29 ` Chris Mason
2009-09-24 16:16 ` Chris Mason
2009-09-17 21:53 ` Jamie Lokier [this message]
2009-09-17 22:19 ` [PATCH RFC] Ext3 data=guarded Chris Mason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090917215309.GD10599@shareable.org \
--to=jamie@shareable.org \
--cc=chris.mason@oracle.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).