[yaffs]Strange umount/remount problem on yaffs!
Jian Zhang
zj0659 at sina.com
Fri Sep 9 02:22:04 BST 2005
Hi!
thank you Charles! as you say, it due to spare/OOB area .
i eventually find that nand_read_oob( ) in nand_base.c frustrate me
for many days.it works well when insert a 3us delay in nand_read_oob( ):
--- nand_base.c.orig 2005-09-09 09:19:40.000000000 +0800
+++ nand_base.c 2005-09-09 08:52:04.000000000 +0800
@@ -1318,6 +1318,7 @@
int blockcheck = (1 << (this->phys_erase_shift - this->page_shift)) - 1;
DEBUG (MTD_DEBUG_LEVEL3, "nand_read_oob: from = 0x%08x, len = %i\n", (unsigned int) from, (i
nt) len);
+ udelay(3);
/* Shift to get page */
page = (int)(from >> this->page_shift);
chipnr = (int)(from >> this->chip_shift);
======= 2005-09-09 06:05:20 Charles wrote:=======
>Hi
>
>Lost data over an unmout/remout cycle is almost certainly due to an issue in
>the spare/OOB area such that the placement being done by mtd is not what is
>expected by yaffs.
>
>-- Charles
>
>
>On Tuesday 06 September 2005 18:39, Jian Zhang wrote:
>> hi,
>> I use yaffs(the latest cvs from aleph1) on linux-2.4.21 with backported
>> mtd(mtd20040705).there is no problem on the first mount.but it seems
>> like lost data when i umount it then remount it.here is my log:
>> 1)reset and system run
>> 2)flash_eraseall /dev/mtd/0 &&insmod yaffs.o
>> 3)mount -t yaffs /dev/mtdblock/0 ./yaffs_mnt
>> 4)/yaffs/yaffs_mnt # cp /home/www/rtc_ds1337.o ./
>> 5)/yaffs/yaffs_mnt # ls -l
>> drw-rw-rw- 1 root root 512 Jan 1 04:23 lost+found
>> -rw-r--r-- 1 root root 10745 Jan 1 04:22 rtc_ds1337.o
>> 6)/yaffs/yaffs_mnt # insmod rtc_ds1337.o
>> Using rtc_ds1337.o
>> 7)/yaffs # umount yaffs_mnt/
>> mtdblock_release
>> ok
>> 8)/yaffs # mount -t yaffs /dev/mtdblock/0 ./yaffs_mnt/
>> mtdblock_open
>> ok
>> yaffs: Attempting MTD mount on 31.0, "1f:00"
>> 9)/yaffs/yaffs_mnt # ls -l
>> drw-rw-rw- 1 root root 512 Jan 1 04:23 lost+found
>> -rw-r--r-- 1 root root 10745 Jan 1 04:22 rtc_ds1337.o
>> ***you will see the file size is the same as 5)
>> 10)/yaffs/yaffs_mnt # insmod rtc_ds1337.o
>> Using rtc_ds1337.o
>> pc : [<4014b5b4>] lr : [<00043888>] Not tainted
>> sp : bfffd768 ip : bfffd7e4 fp : bfffd7e0
>> r10: bfffd9f8 r9 : 00000009 r8 : 000a5df8
>> r7 : 00000000 r6 : 001b63b8 r5 : 001b6f48 r4 : 001b6c48
>> r3 : 00000000 r2 : 00000009 r1 : 000a5df8 r0 : 00000000
>> Flags: nzCv IRQs on FIQs on Mode USER_32 Segment user
>> Control: C000717F Table: 05F90000 DAC: 00000015
>> Segmentation fault
>>
>> i have do as this for times ,it has the same result! so i do consider
>> it lose data when umount it.any body can give me some hints?
>> thanks!
>> JianZhang
>>_______________________________________________
>> yaffs mailing list
>> yaffs at stoneboat.aleph1.co.uk
>> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
Jian Zhang
2005-09-09
More information about the yaffs
mailing list