On Thursday 20 March 2014 03:02:50
spvoyek@rockwellcollins.com wrote:
> I'm am working on adding YAFFS to my OS's VFS. I've looked at
> yaffs_vfs_single.c that's included with the YAFFS distribution and shows
> how YAFFS was added to the Linux VFS.
>
> It seems to me that yaffs_vfs_single.c must implement things that are
> implemented in yaffsfs.c (YAFFS Direct). So, is there a reason that a
> YAFFS VFS implementation can't make calls into YAFFS Direct?
Hello
It depends very much on the OS you are hooking up to.
yaffs_vfs_single.c and yaffs_vfs_multi.c are glue code between Yaffs and the
Linux vfs. They are basically the same, just one supports multiple versions
of Linux.
This Linux glue code depends very much on using some of the Linux caching
layers (eg. generic_file_llseek).
This works because Linux provides all the handle management etc.
It is generally easier to wrap up the Yaffs Direct code to achieve this. Yaffs
Direct provides all the handle management etc that is needed. That is how I
have written a WinCE wrapper for Yaffs and others have generally hooked-up to
RTOSs etc.
The other thing to consider is that of licencing. The Yaffs Direct code can be
had under GPL or proprietary commercial licensing. The Linux VFS code for
Yaffs (and the rest of the Linux glue code) has had many contributors and can
only be had under GPL.
Regards
Charles