9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Steffen Nurpmeso <sdaoden@yandex.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] off topic - a good Git reference
Date: Mon, 12 Oct 2015 13:37:22 +0200	[thread overview]
Message-ID: <20151012113722.LaRyrA_0L%sdaoden@yandex.com> (raw)
In-Reply-To: <8675dd67db7f50f93257f1df50e73767@lilly.quanstro.net>

erik quanstrom <quanstro@quanstro.net> wrote:
 |On Wed Oct  7 14:25:58 PDT 2015, elbingmiss@gmail.com wrote:
 |in the case of system crash, fsync doesn't provide strong \
 |guarantees that the
 |write will not be lost, or the fs not corrupted even in li\
 |nux.  some versions of
 |the linux kernel do nothing on fsync, fsync doesn't actual\

Linux fsync(2) says that the file itself is fine after it, but for
the filesystem metadata you need an additional fsync(2) on the
directory the file resides in.
The final wording of the related POSIX issue[1] states that the
latter is only necessary if directory entries have been created or
removed (also regarding rename(2) which needs two fsync(2) calls;
luckily we're binary only), and noone has opposed to this wording
in more than two years.
(Mac OS X Snow Leopard had a F_FULLFSYNC fcntl(2) which provided
the fully-synced guarantee, as in
        _os_fsync = os.fsync
        def __fullfsync(fd):
            if not SAFE_FSYNC:
                return _os_fsync(fd)
            try:
                fcntl.fcntl(fd, fcntl.F_FULLFSYNC)
            except IOError as e:
                if e.errno == errno.ENOTTY:
                    return _os_fsync(fd)
                raise
        os.fsync = __fullfsync
which i thought of as a good idea, from a programmers point of
view who wants to get it done.)

  [1] http://austingroupbugs.net/view.php?id=672#c1618

--steffen



  reply	other threads:[~2015-10-12 11:37 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-07  2:37 sl
2015-10-07 15:17 ` Álvaro Jurado
2015-10-07 16:24   ` Charles Forsyth
2015-10-07 21:23     ` Álvaro Jurado
2015-10-10 15:23       ` erik quanstrom
2015-10-12 11:37         ` Steffen Nurpmeso [this message]
2015-10-10 15:26   ` erik quanstrom
2015-10-10 18:25     ` Álvaro Jurado
2015-10-12 11:47       ` Charles Forsyth
2015-10-12 16:49         ` Álvaro Jurado
2015-10-12 17:00           ` Charles Forsyth
2015-10-12 17:54             ` Álvaro Jurado
2015-10-12 20:25             ` Giacomo Tesio
  -- strict thread matches above, loose matches on Subject: below --
2015-10-03  4:48 erik quanstrom
2015-10-03  5:03 ` Andrew Simmons
2015-10-03  5:19   ` Jacob Todd
2015-10-03 19:26 ` Jeff Sickel
2015-10-03 19:57   ` Jacob Todd
2015-10-05  4:24     ` Prof Brucee
2015-09-29 16:58 Skip Tavakkolian
2015-09-29 17:18 ` Tiago Natel
2015-09-29 19:42   ` Kurt H Maier
2015-09-30  3:11     ` erik quanstrom
2015-09-30  7:18       ` Charles Forsyth
2015-09-30  7:36         ` hiro
2015-09-30  7:47           ` Charles Forsyth
2015-09-30  7:59             ` Charles Forsyth
2015-10-01 17:31               ` Jeff Sickel
2015-10-01 17:38                 ` Charles Forsyth
2015-10-01 17:38                 ` Ryan Gonzalez
2015-10-01 17:47                 ` arnold
2015-10-02  8:32                   ` hiro
2015-10-02  8:57                     ` Aram Hăvărneanu
2015-10-02 13:10                       ` Joseph Stewart
2015-10-02 14:07                       ` a.regenfuss
2015-10-02 14:10                         ` Aram Hăvărneanu
2015-10-02 21:56                           ` a.regenfuss
2015-10-03  1:43                             ` Kurt H Maier
2015-10-03  2:30                               ` erik quanstrom
2015-10-03  4:37                                 ` Nick Owens
2015-10-02 15:51                         ` lucio
2015-10-02 21:43                           ` a.regenfuss
2015-10-02 19:27                         ` Steve Simon
2015-10-02 15:23                 ` Steffen Nurpmeso
2015-09-30  8:15             ` lucio
2015-09-30  8:25               ` hiro
2015-09-30  7:43         ` Ori Bernstein
2015-09-30  8:22           ` lucio
2015-09-30  7:43         ` lucio
2015-09-30 10:01       ` Brantley Coile
2015-09-30 10:08         ` Steve Simon
2015-10-03  3:00         ` erik quanstrom
2015-10-01 13:54     ` Prof Brucee
2015-09-30  8:15   ` lego12239

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=20151012113722.LaRyrA_0L%sdaoden@yandex.com \
    --to=sdaoden@yandex.com \
    --cc=9fans@9fans.net \
    /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).