I am submitting a set of patches that enabled me to get yaffs
working on Linux 2.6.9. (Not vanilla 2.6.9, but 2.6.9 plus
a few changes, but I don't think the changes matter in this
context.)
Please add any of these changes back into yaffs as appropriate,
and provide comments as needed.
I have compiled for x86 RAM based yaffs (but not tested) and
for ARM little endian MTD based yaffs. I have compiled as
in-kernel and as modules (but have not loaded the module
version). The ARM version has been through basic crash
and burn testing, but I have not yet begun serious testing.
The changes are broken into a series of patches to isolate
the different types of changes, and will each be sent in
a following email. The patches apply in the following
order:
patches/yaffs_kernel_01_base.patch
A direct copy of the yaffs files from the yaffs website,
as of November 16, 2004. This patch puts the files into
the Linux kernel tree at fs/yaffs/. Not all of the files
in this directory are actually used by me, but I was
being thorough.
yaffs_kernel_02_fixup_in_kernel_tree.patch
The changes needed to incorporate yaffs into the Linux
build system and to allow yaffs to build
Changes to Makefiles, Kconfig files, added include of
<linux/config.h> to various yaffs source files.
Changed sb->u.generic_sbp to sb->s_fs_info #if kernel
version > 2.5.0 (in which case u.generic_sbp no longer
exists).
The struct file_system_type initializer for ram fs type
was not properly named (so the compile failed).
yaffs_kernel_03_fix_warnings.patch
Fix compile warnings. I don't like compile warnings
because they make it harder for me to notice the real
problems that I create when I modify code.
This patch is not really the proper way to fix some of
the warnings, if it is desired to submit yaffs to the
Linux kernel. (Changing to Linux kernel coding
standards would be more correct in that case.) This
is really just a quick and dirty approach, trying to
minimize change so that if these patches are not
accepted I will still be able to move forward to later
versions of the community yaffs with minimal pain to
myself.
I rename BLOCK_SIZE to NAND_BLOCK_SIZE so I could keep
things straighter in my head, as I was reading code.
yaffs_kernel_04_disable_no_page_cache.patch
Charles had mentioned that the disable no page cache
feature was broken and that he should pull it out.
http://www.aleph1.co.uk/pipermail/yaffs/2004q4/000747.html
This patch does not actually remove the feature but just
hard-codes the config option so the feature is not
available. (Again, trying to make changes in a manner
that would make it easy for me to move forward to later
versions of the community yaffs.)
yaffs_kernel_05_64bit_target.patch
Changes to struct yaffs_ObjectHeader so that yaffs
should work properly on a 64 bit system.
This change not yet actually tested on a 64 bit system.
yaffs_kernel_06_kdevname.patch
kdevname in yaffs was temporarilly stubbed out for
Linux > 2.6.5. This patch gets the device name
via bdevname().
yaffs_kernel_07_kill_sb.patch
When I umount'ed a yaffs file system, I got the error:
VFS: Busy inodes after unmount.
Self-destruct in 5 seconds. Have a nice day...
This patch removes the symptom by changing sb_kill
from kill_litter_super() to kill_block_super().
I am not sure if this is actually the correct or best
way to solve the underlying problem. See my post
asking for advice at:
http://www.aleph1.co.uk/pipermail/yaffs/2004q4/000878.html
-Frank
--
Frank Rowand <
frank_rowand@mvista.com>
MontaVista Software, Inc