Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.


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

Rep: Reputation: 0
Question 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~~

Last edited by Ralph Zhou; 01-03-2008 at 02:18 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
PCAP on LOOPBACK Device johnnyde Programming 4 03-05-2009 04:05 AM
no loopback device jkobrien Linux From Scratch 5 01-13-2009 11:03 AM
How to accelerate visiting the files in YAFFS2 partition, using loopback device Ralph Zhou Programming 0 01-02-2008 02:00 AM
Loopback Device FredGSanford Debian 3 12-25-2006 12:48 AM
loopback device praveenv Linux - Newbie 2 08-23-2004 07:27 AM > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 08:44 AM.

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