From: tommy <jiujin.hong@mid-fun.com>
To: Corentin Chary <corentin.chary@gmail.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: about ubifs
Date: Fri, 05 Jun 2009 21:03:14 +0800 [thread overview]
Message-ID: <1244206994.20718.7.camel@tommy-desktop> (raw)
In-Reply-To: <71cd59b00906050542v72c228a0r883cef7795189fe9@mail.gmail.com>
no,i didn't fsync when i close file !
did ubifs driver can achieve "fsync" when user modify some file and
close with save ?
if system have no power and shutdown system forcely ,user's file will
become no contents in some case ,how did we protect this ?
thanks!
On 五, 2009-06-05 at 14:42 +0200, Corentin Chary wrote:
> On Fri, Jun 5, 2009 at 2:13 PM, tommy<jiujin.hong@mid-fun.com> wrote:
> > Dear all,i have found a question about ubifs and sync !
> >
> > Question is following;
> >
> > Artem,
> > What i do is just open an existing file in a UBIFS formated UBI volume
> > on a Nand Flash,
> >
> > add a few lines to it ,close the file ,then without unmounting the
> > filesystem and reboot the filesystem.
> >
> > When my board reboots and i looked at that file ,it's zero length and
> > has no contents.I suspect it's because
> >
> > UBIFS does less frequent syncs .it just lost content of the file because
> > there's no sync before the reboot!
> >
> > How can i solve this ?
> >
>
> Hi,
> Do you use fsync() before closing the file ?
> You can read http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/
> for more information. It's for ext4, but I think the problem is the
> same.
>
>
>
next prev parent reply other threads:[~2009-06-05 13:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 12:13 about ubifs tommy
2009-06-05 12:42 ` Corentin Chary
2009-06-05 13:03 ` tommy [this message]
2009-06-05 14:04 ` Corentin Chary
2009-06-08 1:35 ` Jamie Lokier
2009-06-08 1:52 ` tommy
2009-06-08 5:49 ` Artem Bityutskiy
2009-06-08 12:01 ` Jamie Lokier
2009-06-08 12:16 ` Artem Bityutskiy
2009-06-08 12:29 ` Jamie Lokier
2009-06-08 13:30 ` Artem Bityutskiy
2009-06-05 16:26 ` Artem Bityutskiy
-- strict thread matches above, loose matches on Subject: below --
2008-07-08 9:08 About UBIFS Qiang Wang
2008-07-08 9:08 ` 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=1244206994.20718.7.camel@tommy-desktop \
--to=jiujin.hong@mid-fun.com \
--cc=corentin.chary@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