From: Nicolas Williams <Nicolas.Williams@oracle.com>
To: lustre-devel@lists.lustre.org
Subject: [Lustre-devel] Flush on file close
Date: Tue, 20 Apr 2010 15:27:40 -0500 [thread overview]
Message-ID: <20100420202740.GY10389@Sun.COM> (raw)
In-Reply-To: <201004192230.48196.andrew.perepechko@sun.com>
POSIX behavior is that close(2) can fail, so if you care, you should
check its error status. POSIX behavior is also that close(2) doesn't
imply an fsync(2) (much less a sync(2)).
NFS clients implement fsync(2)-on-close, but that's another story.
However, when writes deferred at close(2) time fail on a local
filesystem... chances are that subsequent I/O will just fail. Or at
least that's probably what many users will expect. But does POSIX
require that? I don't have it handy, but I'm pretty sure the answer is
"no". With Lustre we could also have a close(2) whose deferred writes
fail long after the process that could handle the failure is gone.
Databases and so on should always fsync(2) when they need to ensure
consistent on-disk state. Many apps that write(2) don't need to
fsync(2) (think of writes to log files).
Nico
--
next prev parent reply other threads:[~2010-04-20 20:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-19 18:30 [Lustre-devel] Flush on file close Andrew Perepechko
2010-04-19 22:31 ` Oleg Drokin
2010-04-20 2:34 ` Andreas Dilger
2010-04-20 5:16 ` Oleg Drokin
2010-04-20 7:56 ` Mitchell Erblich
2010-04-20 19:46 ` Oleg Drokin
2010-04-20 19:57 ` Oleg Drokin
2010-04-21 21:04 ` Andreas Dilger
2010-04-22 5:15 ` Alexey Lyashkov
2010-04-20 4:04 ` Andreas Dilger
2010-04-20 20:27 ` Nicolas Williams [this message]
2010-04-20 20:43 ` Nicolas Williams
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=20100420202740.GY10389@Sun.COM \
--to=nicolas.williams@oracle.com \
--cc=lustre-devel@lists.lustre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.