From: JiSheng Zhang <jszhang3@gmail.com>
To: dedekind1@gmail.com
Cc: linux-mtd@lists.infradead.org
Subject: Re: UBIFS power cut issues
Date: Wed, 9 Sep 2009 17:45:06 +0800 [thread overview]
Message-ID: <2df346410909090245v5995842asf3a94ae40da5fa72@mail.gmail.com> (raw)
In-Reply-To: <1252390936.5060.47.camel@localhost>
Hi Artem,
2009/9/8 Artem Bityutskiy <dedekind1@gmail.com>:
> Hi,
>
> sorry for late answer, was very busy.
>
> On Wed, 2009-09-02 at 17:35 +0800, JiSheng Zhang wrote:
>> If we cut power when copy file into ubifs, then remount ubifs and try
>> to read the file, we found that the data at some offset of the file
>> began different from the data of the original file at the same offset.
>> Is this a bug of ubifs?
>
> This is expected behavior on any asynchronous FS. You may switch to
> synchronous behavior with '-o sync' mount option. I wrote a lot of
I have tested with "mount -o sync", the result is the same. It's not
empty file. For example:
cp fileA /mnt/ubifs/fileB
random cut power before "cp" completed.
then remount
>From head of /mnt/ubifs/fileB to some offset offsetC is the same as
fileA. But from offsetC to the end is different from fileA at the same
offset offsetC, it's not empty either.
Hope I expressed myself clearly.
> docs about write-back and the related issues. Dig UBIFS docs and FAQ.
> E.g.:
>
> http://www.linux-mtd.infradead.org/faq/ubifs.html#L_empty_file
> http://www.linux-mtd.infradead.org/doc/ubifs.html#L_writeback
>
> If you have a _specific_ question, feel free to ask, of course. But
> for this general question I do not have a better answer than RTFM
> :-)))
>
>> PS:how do you test data integrity of ubifs under power loss?
>
> We mostly checked it using either 'integck' (see mtd-utils) or
> 'fsstress' (see LTP). We ran those tests and cut power off at random
> points using these devices:
>
> http://www.cpscom.com/gprod/ipn.htm
>
> Then we mounted the FS. We did not really check the contents of the
> FS, because it is not simple and tricky, but we checked that it mounts,
> re-mounts, and files are readable/writable/deletable.
Thanks for this information.
Regards,
Jisheng
next prev parent reply other threads:[~2009-09-09 9:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 9:35 UBIFS power cut issues JiSheng Zhang
2009-09-08 6:22 ` Artem Bityutskiy
2009-09-09 9:45 ` JiSheng Zhang [this message]
2009-09-09 10:06 ` Artem Bityutskiy
2009-09-11 9:23 ` JiSheng Zhang
2009-09-10 15:42 ` Artem Bityutskiy
2009-09-10 16:00 ` Bill Gatliff
2009-09-11 8:01 ` Artem Bityutskiy
2009-09-11 9:33 ` JiSheng Zhang
2009-09-11 10:06 ` 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=2df346410909090245v5995842asf3a94ae40da5fa72@mail.gmail.com \
--to=jszhang3@gmail.com \
--cc=dedekind1@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