[#3961] fails to remove a exist file in fat filesystem for sdio mmc on bf548
Submitted By: Vivi Li
Open Date
2008-03-06 05:11:10 Close Date
2008-03-17 04:27:44
Priority:
Medium High Assignee:
Cliff Cai
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
N/A Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
N/A
Uboot version or rev.:
Toolchain version or rev.:
08r1
App binary format:
N/A
Summary: fails to remove a exist file in fat filesystem for sdio mmc on bf548
Details:
Generate a file into vfat fs.
Re-mount file system and delete existing file, FAT filesystem error.
It happens for MMC and SD cards.
Don't use option "-o sync". Below is the log:
--
root:/> mkdosfs /dev/mmcblk0p1
mkdosfs 2.10 (22 Sep 2003)
root:/> mount -o sync /dev/mmcblk0p1 /mnt/
root:/> time dd if=/dev/zero of=/mnt/10.bin bs=1M count=10
10+0 records in
10+0 records out
real 0m 46.99s
user 0m 0.00s
sys 0m 0.76s
root:/> ls /mnt/ -lh
-rwxr-xr-x 1 root root 10.0M Jan 17 01:30 10.bin
root:/> umount /mnt/
root:/> mount -o sync /dev/mmcblk0p1 /mnt/
root:/> ls /mnt/ -lh
root:/>
root:/> cd mnt/
root:/mnt> ls
root:/mnt> cd ..
root:/> mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw)
ramfs on /var type ramfs (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/mmcblk0p1 on /mnt type vfat (rw,sync,fmask=0022,dmask=0022,codepage=cp850,iocharset=iso8859-1)
root:/> df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mmcblk0p1 270064 8912 261152 3% /mnt
root:/> rm /mnt/10.bin
rm: cannot remove '/mnt/10.bin': No such file or directory
root:/>
--
Use option "-o sync". Below is the log:
--
root:/> echo 100 > /proc/sys/vm/pagecache_ratio
root:/> mkdosfs /dev/mmcblk0p1
mkdosfs 2.10 (22 Sep 2003)
root:/> mount /dev/mmcblk0p1 /mnt/
root:/> mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw)
ramfs on /var type ramfs (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/mmcblk0p1 on /mnt type vfat (rw,fmask=0022,dmask=0022,codepage=cp850,iocharset=iso8859-1)
root:/> time dd if=/dev/zero of=/mnt/10.bin bs=1M count=10
10+0 records in
10+0 records out
real 0m 17.05s
user 0m 0.00s
sys 0m 0.60s
root:/> ls /mnt/ -lh
-rwxr-xr-x 1 root root 10.0M Jan 17 01:39 10.bin
root:/> umount /mnt/
root:/> mount /dev/mmcblk0p1 /mnt/
root:/> mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw)
ramfs on /var type ramfs (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/mmcblk0p1 on /mnt type vfat (rw,sync,fmask=0022,dmask=0022,codepage=cp850,iocharset=iso8859-1)
root:/> ls /mnt/ -lh
-rwxr-xr-x 1 root root 10.0M Jan 1 1980 10.bin
root:/> rm /mnt/10.bin
FAT: Filesystem panic (dev mmcblk0p1)
fat_free_clusters: deleting FAT entry beyond EOF
File system has been set read-only
root:/>
--
Follow-ups
--- Cliff Cai 2008-03-17 03:10:29
It's ok on v1.3 BF548.
Cliff
--- Vivi Li 2008-03-17 04:27:44
Yes, it's OK in BF548 v1.3. Close it.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found