UBIFS power cut issues
JiSheng Zhang
jszhang3 at gmail.com
Fri Sep 11 05:23:14 EDT 2009
Hi Artem,
2009/9/9 Artem Bityutskiy <dedekind1 at gmail.com>:
> On 09/09/2009 12:45 PM, JiSheng Zhang wrote:
>>>
>>> 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.
>
> Hmm, ok. What is your kernel version?
>
> Could you please take a closer look and see if these differences
> are zeroes or not?
My mistake, sorry. I have look from the offset to the end of the file,
they're really 0, that is file hole.
>
> Do you have an automated test for this? Can you share your script?
Hmm, I just run copy manually and diff once mounted again.
>
> --
> Best Regards,
> Artem Bityutskiy (Артём Битюцкий)
>
Best Regards,
Jisheng
More information about the linux-mtd
mailing list