From: Richard Weinberger <richard@nod.at>
To: Christoph Hellwig <hch@infradead.org>
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
git@vger.kernel.org, David Gstir <david@sigma-star.at>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Theodore Ts'o <tytso@mit.edu>
Subject: Re: broken repo after power cut
Date: Sun, 21 Jun 2015 16:08:15 +0200 [thread overview]
Message-ID: <5586C54F.1090705@nod.at> (raw)
In-Reply-To: <20150621135903.GA18719@infradead.org>
Am 21.06.2015 um 15:59 schrieb Christoph Hellwig:
> On Sun, Jun 21, 2015 at 03:07:41PM +0200, Richard Weinberger wrote:
>>>> To me it seems like git was creating a new object and got interrupted
>>>> before fsync/fdatasync'ing it.
>>>> As the object was referenced before syncing the data to disk the repo broke.
>
> Git doesn't fsync by default, and because of that I've seen similar
> data losses on ext4/xfs/btrfs.
>
> You can set the core.fsyncobjectfiles to mitigate it, but even with
> that I've seen corrupted index files.
Yeah, after inspecting git's source I've found that config option too.
Now it's also crystal clear that git is not power cut safe at all by default. ;-\
So, anyone that cares about his repos has to enable core.fsyncobjectfiles,
which is IMHO kind of sad.
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
next prev parent reply other threads:[~2015-06-21 14:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-20 19:40 broken repo after power cut Richard Weinberger
2015-06-21 12:28 ` Johannes Schindelin
2015-06-21 13:07 ` Richard Weinberger
2015-06-21 13:59 ` Christoph Hellwig
2015-06-21 14:08 ` Richard Weinberger [this message]
2015-06-22 0:35 ` Theodore Ts'o
2015-06-22 11:19 ` Richard Weinberger
2015-06-22 12:31 ` Theodore Ts'o
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=5586C54F.1090705@nod.at \
--to=richard@nod.at \
--cc=david@sigma-star.at \
--cc=git@vger.kernel.org \
--cc=hch@infradead.org \
--cc=johannes.schindelin@gmx.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
/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).