[Yaffs-archive] RE: newbie to yaffs -->locking

Steve Tsai startec@ms11.hinet.net
Tue, 17 Sep 2002 10:33:48 +0800


Do you mean that yaffs will lock only delete file and resize file? But I
use tar to unpack some files to flash and yaffs seems lock the file
system. I think it just copy files.

Steve Tsai 



> -----Original Message-----
> From: Charles Manning [mailto:manningc2@actrix.gen.nz] 
> Sent: Saturday, September 14, 2002 4:10 AM
> To: Steve Tsai; 'Charles Manning'
> Cc: yaffs@toby-churchill.org
> Subject: Re: newbie to yaffs -->locking
> 
> 
> Right now yaffs uses gross locking on the file system. Only 
> one thread can be 
> in yaffs at a time. For most cases this is not a significant 
> problem since 
> the underlying NAND is locked per operation anyway.
> 
> There are two cases where yaffs can lock "for a long time" if 
> the generic 
> read/write interface is used:
> * Delete file: YAFFS locks while the whole file deletes 
> (approx 0.5 secs for 
> a 1MB file).
> * Resize a file: Resizing from say 1MB to 0 will take approx 0.5 secs.
> 
> I have code in development to do background file deletion.  
> This spreads the 
> deletion load over the next n write operations.
> 
> I am reluctant to add finer grain locking yet since this 
> complicates the 
> code. I don't think the payback is warranted yet (ie. more 
> important things 
> to do).
> 
> -- CHarles
> 
> 
> 
> On Fri, 13 Sep 2002 17:22, Steve Tsai wrote:
> > I rollback yaffs_fs.c to revision 1.12, and it have not the 
> problem 1 
> > and 2. Right now yaffs will lock the fs when program write 
> data to it 
> > and other program will be blocked to read data from yaffs. 
> How can I 
> > improve it?


---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by 
sending an email to yaffs-request@toby-churchill.org with the text "unsubscribe" 
(without the quotes) as the subject.