A problem in YAFFS2 partition, using loopback device
I'm the new graduate and had touched linux just 4 months, and this is my 1st thread in LQ (In fact, this is the 2nd time, because I firstly posted this subject on Non-*NIX Forums>Programming out of place ). Nowadays, I was engaged in a PMP proeduct, and I want to seek help here about how to accelerate visiting the files in YAFFS2 partition, using loopback device.
The 2GB Nandflash in my demo used for multimedia data, was formatted with YAFFS2 firstly, and I created a file "disk1" which is 1.7GB on it using "dd" command. Then, I used the command :
modprobe g_file_storage file=/disk1
to connect to PC/Windows as a virtual U-disk, and then formatted this virtual U-disk in Windows with FAT32. In fact, all the action really operated on file disk1. After associating disk1 with /dev/loop0 using "losetup" command, I mounted /dev/loop0 to /media in root fs with VFAT , and the multimedia files were storaged in "disk1" in fact.
The problem I meet now is that when I play the multimedia files organized in "disk1" actually, the memory resource consumes seriously which may be caused by the usage of loopback device, and the most intolerable situation is that the user couldn't normally stop and quit the multimedia file being played, always with heavily delay-time even up to 1 minute.
I have tried to use 2GB SD-card (formatted with EXT3) instead of the Nandflash to storage the multimedia files, and I also use loopback device mechanism in the same way, creating "disk1" , associating disk1 with /dev/loop0 ,and mounting /dev/loop0 to the root fs with VFAT, and this time everything is OK.
So I believe that the problem is caused by the file system difference between Nandflash (YAFFS2) and SD-Card (EXT3) when using loopback device.
For the end-date of product is coming, it's impossible to reprogram the flash driver completely although it's the most essential method, so I want to learn about if I can obviously visiting the files in YAFFS2 partition, using loopback device.Thans very much~~
|All times are GMT -5. The time now is 12:49 AM.|