public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Albrecht Dreß" <albrecht.dress@arcor.de>
To: dedekind1@gmail.com
Cc: Sven <svenjaborek@gmx.de>, linux-mtd@lists.infradead.org
Subject: Re: JFFS2: truncated files after power loss scenario
Date: Sun, 06 Feb 2011 18:12:32 +0100	[thread overview]
Message-ID: <1297012353.1854.1@antares> (raw)
In-Reply-To: <1297008210.4460.71.camel@localhost> (from dedekind1@gmail.com on Sun Feb  6 17:03:30 2011)

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

Am 06.02.11 17:03 schrieb(en) Artem Bityutskiy:
> The bottom line is that it is difficult to fix broken applications by
> changing JFFS2. The right way to update configuration files is described
> here:
> http://www.linux-mtd.infradead.org/faq/ubifs.html#L_atomic_change

Dumb question: isn't it necessary to also run sync() after the fsync() - close() - rename() sequence, as to ensure that the directory entries are actually flushed to the flash?  Or does a call to

	rename("configfile.tmp", "configfile");

*ensure* that after a crash during this call either the entry of the old file (configfile) or of the newly written contents (configfile.tmp) is accessible, independent of the moment when the crash happens?

Best, Albrecht.

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2011-02-06 17:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-06 14:59 JFFS2: truncated files after power loss scenario Sven
2011-02-06 15:25 ` Artem Bityutskiy
2011-02-06 15:47   ` Sven
2011-02-06 16:03     ` Artem Bityutskiy
2011-02-06 17:12       ` Albrecht Dreß [this message]
2011-02-06 17:39         ` Artem Bityutskiy
2011-02-06 18:40           ` Albrecht Dreß
2011-02-11 14:00             ` Artem Bityutskiy

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=1297012353.1854.1@antares \
    --to=albrecht.dress@arcor.de \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=svenjaborek@gmx.de \
    /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