From: Jamie Lokier <jamie@shareable.org>
To: Duke <ezbonites@gmail.com>
Cc: Josh Boyer <jwboyer@gmail.com>, linux-mtd@lists.infradead.org
Subject: Re: jffs2: too few erase blocks
Date: Sun, 28 Oct 2007 18:02:23 +0000 [thread overview]
Message-ID: <20071028180223.GB14076@mail.shareable.org> (raw)
In-Reply-To: <79ac09b60710261402h3cf9dfa5o1ce9e33e5468d742@mail.gmail.com>
Duke wrote:
> Just to clarity myself a bit here. There is nothing stopping me from
> using the cp or mv (or any other file modification command for that
> matter) to update one directory but I would like to be able to verify
> the data is actually written and I thought perhaps mtd_debug or some
> other mtd tool might be able to verify this. Maybe it's not maybe it
> is, I would like to find out.
If you call "fsync()" or "fdatasync()" after writing the data to a
file, that is suppoe to ensure the data is written when the function
returns.
That's supposed to happen, but I don't know if JFFS2 actually does
that.
If you call fsync() on a directory handle, that traditionally ensures
the file names in that directory are written. So to be sure of
creating a file and writing to it, you would create the file, write
it, fsync() it, then open the directory containing the file and
fsync() the directory. For example, email delivery programs use that
strategy before reporting to a sender that the email is safely stored.
But again, I don't know if JFFS2 actually does provide those assurances.
-- Jamie
next prev parent reply other threads:[~2007-10-28 21:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-25 14:06 jffs2: too few erase blocks Duke
2007-10-25 14:22 ` Josh Boyer
2007-10-25 22:15 ` Jamie Lokier
2007-10-26 17:00 ` Duke
2007-10-26 21:02 ` Duke
2007-10-28 18:02 ` Jamie Lokier [this message]
2007-10-29 2:59 ` David Woodhouse
2007-10-29 14:38 ` Jörn Engel
2007-10-29 20:51 ` Jamie Lokier
2007-10-29 21:40 ` David Woodhouse
2007-10-29 22:50 ` Jamie Lokier
2007-10-29 21:54 ` Jörn Engel
2007-10-29 22:46 ` Jamie Lokier
2007-10-30 16:09 ` Jörn Engel
2007-10-30 20:08 ` Duke
2007-10-30 20:19 ` Jörn Engel
2007-10-30 21:42 ` Duke
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=20071028180223.GB14076@mail.shareable.org \
--to=jamie@shareable.org \
--cc=ezbonites@gmail.com \
--cc=jwboyer@gmail.com \
--cc=linux-mtd@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox