All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: lustre-devel@lists.lustre.org
Subject: [Lustre-devel] Flush on file close
Date: Tue, 20 Apr 2010 15:43:00 -0500	[thread overview]
Message-ID: <20100420204300.GZ10389@Sun.COM> (raw)
In-Reply-To: <20100420202740.GY10389@Sun.COM>

On Tue, Apr 20, 2010 at 03:27:40PM -0500, Nicolas Williams wrote:
> 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.

To go out on a complete limb :) what we really need is a variant of
close(2) where eventual failure can be caught, even when the process
that called it has exit()ed.  Something like:

int close_or_spawn(int fd, <posix_spawn()-like arguments>);

or

int close_xid(int fd, uint64_t xid);   /*
                                        * Where some daemon(s) reads a
					* log of sucessful/failed close
					* XIDs and takes action as
					* necessary.
					*/

I prefer something along the lines of close_xid().

Adoption of new APIs in the context of Lustre is probably more
realistic than in the general case, but it'd still be slow.

So we're still left with: you'd better fsync(2) explicitly before
close()ing if you want to make sure that you don't lose data.

Nico
-- 

      reply	other threads:[~2010-04-20 20:43 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
2010-04-20 20:43   ` Nicolas Williams [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=20100420204300.GZ10389@Sun.COM \
    --to=nicolas.williams@sun.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.