Re: [Yaffs] YAFFS2 compile errors

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: Sean Seifert
CC: info@aleph1.co.uk, M ., yaffs@lists.aleph1.co.uk
Subject: Re: [Yaffs] YAFFS2 compile errors
On Thu, May 14, 2015 at 2:08 AM, Sean Seifert <> wrote:

> Hi Mike,
>
> I too had this same issue. Below is a quote from what I found and how I
> got it compiling. I am still waiting for a developer response, as I wanted
> to make sure the correct information gets passed to the function.
>
> My thread was titled "Current Yaffs2 Compilation Bugs with Some Fixes
> <http://lists.aleph1.co.uk/lurker/message/20150305.213518.50440db1.en.html>"
> and here is what I found:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *>> Compilation broke on commit:
> 30f956c32c235e6b5fa77fb29965ababbd497561, >> Jul 22, 2014. Not all
> functions were updated for the new discard parameter. >> Here are the
> following that have been missed that discard parameter: >>
> fs/yaffs2/yaffs_vfs.c:2205: error: too few arguments to function >>
> ‘yaffs_flush_whole_cache’ >> fs/yaffs2/yaffs_vfs.c:751: error: too few
> arguments to function >> ‘yaffs_flush_file’ >> fs/yaffs2/yaffs_vfs.c:781:
> error: too few arguments to function >> ‘yaffs_flush_file’ >>
> fs/yaffs2/yaffs_vfs.c:2192: error: too few arguments to function >>
> ‘yaffs_flush_file’ >> >> Simply adding the extra discard parameter to these
> functions makes >> compilation work. What is the proper number to pass to
> each? I added a "1" >> to each for the sake of getting this compiling in my
> code, but want to make >> sure that the correct parameter gets passed into
> the functions. *
>
>
> -
>
> Sean Seifert
>
>
>
> On Thu, May 7, 2015 at 9:38 AM, M . <> wrote:
>
>> Hello,
>>
>> I'm trying to compile latest yaffs2 version from git but I'm getting
>> these errors:
>> fs/yaffs2/yaffs_vfs.c: In function 'yaffs_file_flush':
>> fs/yaffs2/yaffs_vfs.c:741: error: too few arguments to function
>> 'yaffs_flush_file'
>> fs/yaffs2/yaffs_vfs.c: In function 'yaffs_sync_object':
>> fs/yaffs2/yaffs_vfs.c:771: error: too few arguments to function
>> 'yaffs_flush_file'
>> fs/yaffs2/yaffs_vfs.c: In function 'yaffs_flush_inodes':
>> fs/yaffs2/yaffs_vfs.c:2190: error: too few arguments to function
>> 'yaffs_flush_file'
>> fs/yaffs2/yaffs_vfs.c: In function 'yaffs_flush_super':
>> fs/yaffs2/yaffs_vfs.c:2203: error: too few arguments to function
>> 'yaffs_flush_whole_cache'
>>
>> I see that yaffs_vfs.c is out of sync with yaffs_guts but I'm unsure how
>> to fix it properly.
>>
>> Please advise. Thank you!
>>
>>

I've fixed this by just adding 0s.

The last argument says whether or not to discard cache at the end of the
flush. Flushing just pushes out all dirty chunks from the file to flash.

Discarding is worth doing when a file is being deleted (or it is being
pushed out for use by another file) then it makes sense to discard the
cache.

Otherwise (eg. normal flush or file being closed) we might as well leave it
in the cache.

-- Charles