Re: [Yaffs] Direct Interface, files contain zero when mounti…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: Re: [Yaffs] Direct Interface, files contain zero when mounting without checkpoint
On Monday 04 June 2012 21:26:49 Stéphane Lesage wrote:
> Le 01/06/2012 11:33, Stéphane Lesage a écrit :
> > but I still have the problem here on the last step.
> >
> > I pretty sure my low-level NAND functions (or file simulation) work
> > correctly, so this must be a bad configuration.
>
> I found the problem: my loff_t type is 32 bits...
> which leeds to a wrong initial shrink size when scanning, because of:
>
> the_obj->variant.file_variant.shrink_size=yaffs_max_file_size(dev);
>
> loff_tyaffs_max_file_size(structyaffs_dev*dev)
>
> {
>
>     return  ((loff_t)  YAFFS_MAX_CHUNK_ID)  *  dev->data_bytes_per_chunk;

>
> }
>
> BTW, there is a define for the same thing in yaffsfs.h:
> #defineYAFFS_MAX_FILE_SIZE(0x800000000LL-1)
>
> It is possible to add support for 32 bits loff_t ?


Hello Stéphane

Could you try the changes in the 32-bit-loff_t branch:

http://yaffs.net/gitweb?p=yaffs2.git;a=shortlog;h=refs/heads/32-bit-loff_t

See if that works for you.

Thanks

Charles