All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Berthier, Emmanuel" <emmanuel.berthier@intel.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: RE: fsync() does not flush all the file
Date: Fri, 2 Sep 2011 07:59:56 +0000	[thread overview]
Message-ID: <65CD3FC07F3BF942ABE211646D72D77001C375@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <20110901215010.GA12057@infradead.org>

From: Christoph Hellwig [mailto:hch@infradead.org] :
> On Thu, Sep 01, 2011 at 06:12:51PM +0000, Berthier, Emmanuel wrote:
> > I've checked with traces that the issue is upper eMMC block driver.
>
> What do you mean with this sentence?
>
> Does your problem reproduce without eMMC in the game?  Does writing
> directly to the block device and then fsync the data get it to disk?

Thanks for the answer.

I've patches the mmcd block driver in order to catch the start and the end of the written file, so I can detect when the flush is completed.

I've reproduced the issue on a PC with Ubuntu 10.04, but as the SSD drive contains cache, it's clear that this configuration can't guaranty the immediate flushing of the file on the flash memory.

A new info of today: the issue disappears if I call fflush() before fsync(): all the file is well flushed at a time.
The problem is that this is not the behavior of Sqlite3.6.2 (I've trace sys calls with strace, no fflush() on journal) (same for last 3.7.7.1).

Who's wrong? FS or Sqlite?
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


  reply	other threads:[~2011-09-02  8:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01 18:12 fsync() does not flush all the file Berthier, Emmanuel
2011-09-01 21:50 ` Christoph Hellwig
2011-09-02  7:59   ` Berthier, Emmanuel [this message]
2011-09-02  8:13     ` Christoph Hellwig
2011-09-02 10:53       ` Berthier, Emmanuel

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=65CD3FC07F3BF942ABE211646D72D77001C375@IRSMSX102.ger.corp.intel.com \
    --to=emmanuel.berthier@intel.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.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.