This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: blib node allocation problem with FAT FS


> I found the problem. The reference count was decrementing below 0. Here 
> is a fix for fatfs_node_unref() in fatfs_ncache.c.
>
>  if (node->refcnt)
>        node->refcnt--;

It could be that you have fixed the symptom and not the cause. Why is
it being unreferenced more times than it is referenced? Maybe there is
a missing ref() so you could get file corrupt?

Before i commit this i want a clear explanation why your change is
correct.

> I also found that if you change the 512 to 32768 (sector size) in fatfs.c 
> call to cyg_blib_io_create() you get a 50% - 60% increase in disk  
> throughput, especially with large files. (driver reads writes clusters 
> not sectors)

Which driver? I quickly looked at the IDE and the MMC driver and both
appear to read/write blocks.

There is a FIXME where the cyg_blib_io_create() is, saying to get the
block size from the device. Maybe you want to implement this?

      Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]