ts-7000
[Top] [All Lists]

Re: [ts-7000] Solving the USB drive journalling issue please criticize

To:
Subject: Re: [ts-7000] Solving the USB drive journalling issue please criticize
From: "David L. Martin" <>
Date: Mon, 18 Sep 2006 20:50:29 -0400
On Mon, 2006-09-18 at 20:07 -0400, Dave Cramer wrote:
> Here's the problem:
> 
> Customer needs to be able to just plug, and unplug USB drive WITHOUT  
> unmount, or sync.
> 
> The drive is being used to log data.
> 
> I was thinking about doing write ahead logging, but then it occurs to  
> me that the only issue with disk corruption is when re-arranging the  
> structure of the disk
> 
> ie doing deletes, creating, removing directories
> 
> So my idea is to simply create n files named 0001-nnnn where n is the  
> size of the flash/size of each file before hand and then simply write  
> into those files.
> My expectation is that the worst thing that will happen is I will  
> lose one file worth of data if it is pulled out before synching the  
> disk.
> I' will also write 0's to the files before putting the data on them.
> 
> thoughts ?

You need to rethink your design:
Check out:
http://sourceware.org/jffs2

Then look at some of the automount (I don't mean the package automount,
although that is an option) options under linux, to automate the
mounting, unmounting, and syncing.

Also remember the fflush() function, this will help also.

What is the purpose of writing the 0's to the file?  Flash corruption is
rarely a problem with file corruption, but instead is a corruption of
the FS tables or journals.

Is allowing the customer to simply plug and unplug the device without
any other interaction a good idea?  You might want to allow the customer
to plug in the device at any time, but you need to provide feed back as
to when unplugging is allowed.  Can you think of any commercial product
that allows this kind of interaction?  I completely understand your need
to hide the internals of Linux from the customer, but that doesn't mean
you can't (or shouldn't) provide an alternative indication or
interaction.

-- 
David L. Martin


In a world without walls and fences - who needs Windows and Gates?



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU