From: Ted Ts'o <tytso@mit.edu>
To: Nick Piggin <npiggin@kernel.dk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch 8/8] fs: add i_op->sync_inode
Date: Fri, 7 Jan 2011 14:06:31 -0500 [thread overview]
Message-ID: <20110107190631.GG21922@thunk.org> (raw)
In-Reply-To: <20101218015117.759480620@kernel.dk>
On Sat, Dec 18, 2010 at 12:46:42PM +1100, Nick Piggin wrote:
> --- linux-2.6.orig/Documentation/filesystems/porting 2010-12-18 00:32:44.000000000 +1100
> +++ linux-2.6/Documentation/filesystems/porting 2010-12-18 03:51:40.000000000 +1100
> +--
> +[mandatory]
> + Inode writeback and syncing has undergone an overhaul.
> +write_inode_now doesn't sync (unless ->write_inode *always* syncs)
> +
Could you perhaps give a bit more detail in the documentation about
what sync_inode() is supposed to do? I gather that it is supposed to
(based on the flags), do the specified combination of (a) do writeback
for the pages corresponding to the specified range (if INODE_SYNC_DATA
is given), (b) write out the inode if necessary depending on
INODE_SYNC_DATA_METADATA (for fdatasync) and INODE_SYNC_DATA (for
fsync).
When sync_inode() returns, what is guaranteed is that the appropriate
buffer_heads are dirtied (for both the metadata and the data if the
file system is still using the buffer cache for data I/O) and/or the
data has been pushed to the block I/O system, but the sync_inode()
method does not wait force the dirtied buffers out to disk, and it
does not wait for any initiated I/O to complete (either at the block
I/O layer or guaranteeing that the data has hit the platters by
issuing a barrier request).
Do I have that right? If so, could we please add that to the
documentation, just so it's clear? Thanks!!
- Ted
prev parent reply other threads:[~2011-01-07 19:06 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-18 1:46 [patch 0/8] Inode data integrity patches Nick Piggin
2010-12-18 1:46 ` [patch 1/8] fs: mark_inode_dirty barrier fix Nick Piggin
2010-12-18 1:46 ` [patch 2/8] fs: simple fsync race fix Nick Piggin
2010-12-18 1:46 ` [patch 3/8] fs: introduce inode writeback helpers Nick Piggin
2010-12-18 1:46 ` [patch 4/8] fs: preserve inode dirty bits on failed metadata writeback Nick Piggin
2010-12-18 1:46 ` [patch 5/8] fs: ext2 inode sync fix Nick Piggin
2011-01-07 19:08 ` Ted Ts'o
2010-12-18 1:46 ` [patch 6/8] fs: fsync optimisations Nick Piggin
2010-12-18 1:46 ` [patch 7/8] fs: fix or note I_DIRTY handling bugs in filesystems Nick Piggin
2010-12-29 15:01 ` Christoph Hellwig
2011-01-03 15:03 ` Steven Whitehouse
2011-01-03 16:58 ` Christoph Hellwig
2011-01-04 7:12 ` Nick Piggin
2011-01-04 14:22 ` Steven Whitehouse
2011-01-04 6:04 ` Nick Piggin
2011-01-04 6:39 ` Christoph Hellwig
2011-01-04 7:52 ` Nick Piggin
2011-01-04 9:13 ` Christoph Hellwig
2011-01-04 9:28 ` Nick Piggin
2010-12-18 1:46 ` [patch 8/8] fs: add i_op->sync_inode Nick Piggin
2010-12-29 15:12 ` Christoph Hellwig
2011-01-04 6:27 ` Nick Piggin
2011-01-04 6:57 ` Christoph Hellwig
2011-01-04 8:03 ` Nick Piggin
2011-01-04 8:31 ` Nick Piggin
2011-01-04 9:25 ` Christoph Hellwig
2011-01-04 9:52 ` Nick Piggin
2011-01-06 20:49 ` Christoph Hellwig
2011-01-07 4:48 ` Nick Piggin
2011-01-07 7:25 ` Christoph Hellwig
2011-01-11 3:44 ` Nick Piggin
2011-01-04 9:25 ` Christoph Hellwig
2011-01-04 9:49 ` Nick Piggin
2011-01-06 20:45 ` Christoph Hellwig
2011-01-07 4:47 ` Nick Piggin
2011-01-07 7:24 ` Christoph Hellwig
2011-01-07 7:29 ` Christoph Hellwig
2011-01-07 13:10 ` Christoph Hellwig
2011-01-07 18:30 ` Ted Ts'o
2011-01-07 18:32 ` Christoph Hellwig
2011-01-07 19:06 ` Ted Ts'o [this message]
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=20110107190631.GG21922@thunk.org \
--to=tytso@mit.edu \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@kernel.dk \
/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).