On Mon, 23 Oct 2006, Dave Hylands wrote:

> Hi Todd,
> 
> Replying to the list this time...
> 
> >  The problem is that the changes I make to the files on the desktop
> > are not immediately reflected in /mnt/loop on the gumstix.   If  I
> > 'cd' into /mnt/loop on the gumstix I see things only as they were
> > orginally; there are no file additions, deletions, or edits. I can
> > monitor the backing storage (/root/data/backing_file) using the
> > 'stat(2)' routine and confirm that it is being updated as I make
> > changes on the XP desktop, but these changes are not showing up in
> > /mnt/loop. My gumstix-resident application needs immediate access to
> > changes. The changes are there and they are persistent -- I just can't
> > see them. To actually see the changes in /mnt/loop I must reboot the
> > gumstix, and repeat the various 'modprobe', 'losetup', and 'mount'
> > operations.
> 
> 
> At the bottom of the page you referenced it says this (in the section
> titled: Accessing the backing storage from the gadget):
> It is possible to manipulate the data in the backing storage from the
> gadget (even to add the filesystem). Don't do this while the gadget is
> connected to a USB host!
> 
> So you can't have your gadget seeing the data at the same time as XP
> is (at least that's the way I understand how this works). The problem
> is that XP has full control at the sector level and may have sectors
> cached. When you try to access through the loop device, your gadget
> thinks that it owns the sectors and it may have data cached. Trying to
> have both access the data at the same time is a recipie for data
> corruption and loss.

That's right.  You should never have /dev/loop0 mounted while the gadget
is connected to a host.

If you need the files to be simultaneously visible on both sides then you
can't use g_file_storage.  An alternative is to use g_ether -- or even a
regular ethernet connection -- and do normal file-sharing, such as Samba.

Alan Stern


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to