linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Brandon Maier <brandon.maier@collins.com>
Cc: Boris Brezillon <bbrezillon@kernel.org>,
	Marek Vasut <marek.vasut@gmail.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Subject: Re: [PATCH 2/2] jffs2: Add sync to underlying mtd device when file system is synced
Date: Thu, 16 May 2019 17:31:39 +0200 (CEST)	[thread overview]
Message-ID: <538011502.61455.1558020699516.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <CA+fik51C43hnuWNFYFfzxivMVFrMZ9hN=jsLbQOWb9qcm0fAxQ@mail.gmail.com>

----- Ursprüngliche Mail -----
> Von: "Brandon Maier" <brandon.maier@collins.com>
> An: "Richard Weinberger" <richard.weinberger@gmail.com>
> CC: "Clayton Shotwell" <clayton.shotwell@rockwellcollins.com>, "linux-mtd" <linux-mtd@lists.infradead.org>, "Boris
> Brezillon" <bbrezillon@kernel.org>, "richard" <richard@nod.at>, "Marek Vasut" <marek.vasut@gmail.com>, "Brian Norris"
> <computersforpeace@gmail.com>, "David Woodhouse" <dwmw2@infradead.org>
> Gesendet: Donnerstag, 16. Mai 2019 17:12:45
> Betreff: Re: [PATCH 2/2] jffs2: Add sync to underlying mtd device when file system is synced

> Clayton is out currently, but I can comment on what he had told me.

Thanks!
 
> On Thu, May 16, 2019 at 6:05 AM Richard Weinberger
>> > Please explain what failure you are facing without mtd_sync().
>> > jffs2 is supposed to recover from a power failure at any time, just like ubifs.
> 
> The system exhibiting problems runs jffs2 on a gluebi device. Our
> software sync()'s the jffs2 at certain points so that it's safe if
> power is cut. The jffs2 always recovers the filesystem after power
> cut, but sometimes data written before the sync() call gets lost.
> 
> These patches attempt to solve this problem by 1) calling _sync() on
> the underlying mtd device after writing to flush any buffers in the
> mtd, and 2) adding a _sync() callback to gluebi so that if something
> syncs the mtd device, we sync any blocks associated with it.

The interesting question is, do you loose data which was already
written and synced using fsync() or fdatasync()?

Both JFFS2 and UBIFS try to avoid writes and are rather strict when it
comes to fsync().

Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2019-05-16 15:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 20:13 [PATCH 1/2] mtd: gluebi: Add sync logic Clayton Shotwell
2019-05-03 20:13 ` [PATCH 2/2] jffs2: Add sync to underlying mtd device when file system is synced Clayton Shotwell
2019-05-05 22:22   ` Richard Weinberger
2019-05-16 11:04     ` Richard Weinberger
2019-05-16 15:12       ` Brandon Maier
2019-05-16 15:31         ` Richard Weinberger [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=538011502.61455.1558020699516.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=bbrezillon@kernel.org \
    --cc=brandon.maier@collins.com \
    --cc=clayton.shotwell@rockwellcollins.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    /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).