From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Jamie Lokier <jamie@shareable.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Chris Wedgwood <cw@f00f.org>
Subject: Re: Proposal for "proper" durable fsync() and fdatasync()
Date: Tue, 26 Feb 2008 20:16:11 +1100 [thread overview]
Message-ID: <200802262016.11297.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <20080226075921.GG30238@shareable.org>
On Tuesday 26 February 2008 18:59, Jamie Lokier wrote:
> Andrew Morton wrote:
> > On Tue, 26 Feb 2008 07:26:50 +0000 Jamie Lokier <jamie@shareable.org>
wrote:
> > > (It would be nicer if sync_file_range()
> > > took a vector of ranges for better elevator scheduling, but let's
> > > ignore that :-)
> >
> > Two passes:
> >
> > Pass 1: shove each of the segments into the queue with
> > SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE
> >
> > Pass 2: wait for them all to complete and return accumulated result
> > with SYNC_FILE_RANGE_WAIT_AFTER
>
> Thanks.
>
> Seems ok, though being able to cork the I/O until the last one would
> be a bonus (like TCP_MORE... SYNC_FILE_RANGE_MORE?)
>
> I'm imagining I'd omit the SYNC_FILE_RANGE_WAIT_BEFORE. Is there a
> reason why you have it there? The man page isn't very enlightening.
Yeah, sync_file_range has slightly unusual semantics and introduce
the new concept, "writeout", to userspace (does "writeout" include
"in drive cache"? the kernel doesn't think so, but the only way to
make sync_file_range "safe" is if you do consider it writeout).
If it makes it any easier to understand, we can add in
SYNC_FILE_ASYNC, SYNC_FILE_SYNC parts that just deal with
safe/unsafe and sync/async semantics that is part of the normal
POSIX api.
Anyway, the idea of making fsync/fdatasync etc. safe by default is
a good idea IMO, and is a bad bug that we don't do that :(
next prev parent reply other threads:[~2008-02-26 9:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-26 7:26 Proposal for "proper" durable fsync() and fdatasync() Jamie Lokier
2008-02-26 7:43 ` Andrew Morton
2008-02-26 7:59 ` Jamie Lokier
2008-02-26 9:16 ` Nick Piggin [this message]
2008-02-26 14:09 ` Jörn Engel
2008-02-26 15:07 ` Jamie Lokier
2008-02-26 16:27 ` Andrew Morton
2008-02-26 15:28 ` Jamie Lokier
2008-02-26 17:02 ` Jörn Engel
2008-02-26 17:29 ` Jamie Lokier
2008-02-26 17:38 ` Jörn Engel
2008-02-26 16:43 ` Jeff Garzik
2008-02-26 17:00 ` Jamie Lokier
2008-02-26 17:54 ` Jeff Garzik
2008-02-27 14:16 ` Jamie Lokier
2008-02-26 7:43 ` Jeff Garzik
2008-02-26 7:55 ` Jamie Lokier
2008-02-26 9:25 ` Jamie Lokier
2008-02-26 12:13 ` Ric Wheeler
2008-02-26 15:43 ` Jamie Lokier
2008-11-24 21:10 ` Sachin Gaikwad
2008-11-25 10:17 ` Jamie Lokier
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=200802262016.11297.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@linux-foundation.org \
--cc=cw@f00f.org \
--cc=jamie@shareable.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).