LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-02-2008, 02:00 AM   #1
Ralph Zhou
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Rep: Reputation: 0
Smile How to accelerate visiting the files 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. 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~~
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
no loopback device jkobrien Linux From Scratch 5 01-13-2009 11:03 AM
Loopback Device FredGSanford Debian 3 12-25-2006 12:48 AM
loopback device praveenv Linux - Newbie 2 08-23-2004 07:27 AM
writing a loopback device ebh1 Linux - Newbie 2 03-12-2004 05:12 PM
loopback device in 2.5.47 broken markus1982 Linux - General 3 11-13-2002 11:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration