Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
authorTimothy Manning <tfhmanning@gmail.com>
Wed, 7 Dec 2011 22:01:43 +0000 (11:01 +1300)
committerTimothy Manning <tfhmanning@gmail.com>
Wed, 7 Dec 2011 22:01:43 +0000 (11:01 +1300)
566 files changed:
Kconfig_multi [moved from Kconfig with 85% similarity]
Kconfig_single [new file with mode: 0644]
Makefile
Makefile.kernel
direct/basic-test/Makefile
direct/basic-test/dtest.c
direct/basic-test/yaffs_fileem.c
direct/basic-test/yaffs_fileem2k.c
direct/basic-test/yaffs_fileem2k.h
direct/basic-test/yaffs_norif1.c
direct/basic-test/yaffs_norif1.h
direct/basic-test/yaffs_osglue.c
direct/basic-test/yaffs_ramdisk.c
direct/basic-test/yaffs_ramdisk.h
direct/basic-test/yaffs_ramem2k.c
direct/basic-test/yaffscfg.c
direct/basic-test/yaffscfg2k.c
direct/basic-test/yaffsnewcfg.c
direct/basic-test/ynorsim.c
direct/basic-test/ynorsim.h
direct/basic-test/yramsim.c
direct/basic-test/yramsim.h
direct/python/Makefile
direct/python/examples.py
direct/python/yaffs_python_helper.c
direct/python/yaffsfs.py
direct/tests/Makefile
direct/tests/fuzzer.c
direct/tests/nor_stress.c
direct/tests/nor_stress.h
direct/tests/yaffs_test.c
direct/timothy_tests/dev/Makefile
direct/timothy_tests/dev/error_handler.c
direct/timothy_tests/dev/error_handler.h
direct/timothy_tests/dev/message_buffer.c
direct/timothy_tests/dev/message_buffer.h
direct/timothy_tests/dev/yaffs_tester.c
direct/timothy_tests/dev/yaffs_tester.h
direct/timothy_tests/handle_tests/Makefile
direct/timothy_tests/handle_tests/handle_test.c
direct/timothy_tests/handle_tests/handle_test.h
direct/timothy_tests/mirror_tests/Makefile
direct/timothy_tests/mirror_tests/lib.c
direct/timothy_tests/mirror_tests/lib.h
direct/timothy_tests/mirror_tests/linux_test_open.c
direct/timothy_tests/mirror_tests/linux_test_open.h
direct/timothy_tests/mirror_tests/linux_test_truncate.c
direct/timothy_tests/mirror_tests/linux_test_truncate.h
direct/timothy_tests/mirror_tests/linux_test_unlink.c
direct/timothy_tests/mirror_tests/linux_test_unlink.h
direct/timothy_tests/mirror_tests/linux_test_write.c
direct/timothy_tests/mirror_tests/linux_test_write.h
direct/timothy_tests/mirror_tests/mirror_tests.c
direct/timothy_tests/mirror_tests/mirror_tests.h
direct/timothy_tests/mirror_tests/yaffs_test_open.c
direct/timothy_tests/mirror_tests/yaffs_test_open.h
direct/timothy_tests/mirror_tests/yaffs_test_truncate.c
direct/timothy_tests/mirror_tests/yaffs_test_truncate.h
direct/timothy_tests/mirror_tests/yaffs_test_unlink.c
direct/timothy_tests/mirror_tests/yaffs_test_unlink.h
direct/timothy_tests/mirror_tests/yaffs_test_write.c
direct/timothy_tests/mirror_tests/yaffs_test_write.h
direct/timothy_tests/quick_tests/Makefile
direct/timothy_tests/quick_tests/lib.c
direct/timothy_tests/quick_tests/lib.h
direct/timothy_tests/quick_tests/quick_tests.c
direct/timothy_tests/quick_tests/quick_tests.h
direct/timothy_tests/quick_tests/test_yaffs_access.c
direct/timothy_tests/quick_tests/test_yaffs_access.h
direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.c
direct/timothy_tests/quick_tests/test_yaffs_access_EACCES.h
direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_access_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.c
direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP.h
direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_access_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_access_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.c
direct/timothy_tests/quick_tests/test_yaffs_access_ENOENT2.h
direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_access_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_access_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_access_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_access_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_chmod.c
direct/timothy_tests/quick_tests/test_yaffs_chmod.h
direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_chmod_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.c
direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP.h
direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_chmod_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_chmod_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.c
direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOENT2.h
direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_chmod_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_chmod_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_chmod_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_close_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_close_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_close_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_dup.c
direct/timothy_tests/quick_tests/test_yaffs_dup.h
direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_dup_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_fchmod.c
direct/timothy_tests/quick_tests/test_yaffs_fchmod.h
direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_fchmod_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_fchmod_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_fchmod_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_fchmod_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_fdatasync.c
direct/timothy_tests/quick_tests/test_yaffs_fdatasync.h
direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_fdatasync_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_fdatasync_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_flush.c
direct/timothy_tests/quick_tests/test_yaffs_flush.h
direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_flush_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_flush_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_freespace.c
direct/timothy_tests/quick_tests/test_yaffs_freespace.h
direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_freespace_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_freespace_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_freespace_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_fstat.c
direct/timothy_tests/quick_tests/test_yaffs_fstat.h
direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_fstat_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_fsync.c
direct/timothy_tests/quick_tests/test_yaffs_fsync.h
direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_fsync_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_fsync_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_ftruncate.c
direct/timothy_tests/quick_tests/test_yaffs_ftruncate.h
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.c
direct/timothy_tests/quick_tests/test_yaffs_ftruncate_big_file.h
direct/timothy_tests/quick_tests/test_yaffs_inodecount.c
direct/timothy_tests/quick_tests/test_yaffs_inodecount.h
direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_inodecount_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_inodecount_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_inodecount_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_link.c
direct/timothy_tests/quick_tests/test_yaffs_link.h
direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.c
direct/timothy_tests/quick_tests/test_yaffs_link_EEXIST.h
direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_link_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.c
direct/timothy_tests/quick_tests/test_yaffs_link_ENAMETOOLONG2.h
direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.c
direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT2.h
direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.c
direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT3.h
direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.c
direct/timothy_tests/quick_tests/test_yaffs_link_ENOENT4.h
direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.c
direct/timothy_tests/quick_tests/test_yaffs_link_ENOTDIR2.h
direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_link_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_link_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_link_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.c
direct/timothy_tests/quick_tests/test_yaffs_link_NULL2.h
direct/timothy_tests/quick_tests/test_yaffs_lseek.c
direct/timothy_tests/quick_tests/test_yaffs_lseek.h
direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_lseek_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_lseek_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_lseek_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.c
direct/timothy_tests/quick_tests/test_yaffs_lseek_big_file.h
direct/timothy_tests/quick_tests/test_yaffs_lstat.c
direct/timothy_tests/quick_tests/test_yaffs_lstat.h
direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_lstat_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_lstat_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_lstat_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_mkdir.c
direct/timothy_tests/quick_tests/test_yaffs_mkdir.h
direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.c
direct/timothy_tests/quick_tests/test_yaffs_mkdir_EEXIST.h
direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_mkdir_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_mkdir_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_mkdir_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_mkdir_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_mount.c
direct/timothy_tests/quick_tests/test_yaffs_mount.h
direct/timothy_tests/quick_tests/test_yaffs_mount2.c
direct/timothy_tests/quick_tests/test_yaffs_mount2.h
direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.c
direct/timothy_tests/quick_tests/test_yaffs_mount2_ENODEV.h
direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.c
direct/timothy_tests/quick_tests/test_yaffs_mount_EBUSY.h
direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_mount_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.c
direct/timothy_tests/quick_tests/test_yaffs_mount_ENODEV.h
direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_mount_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_open.c
direct/timothy_tests/quick_tests/test_yaffs_open.h
direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.c
direct/timothy_tests/quick_tests/test_yaffs_open_EACCES.h
direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.c
direct/timothy_tests/quick_tests/test_yaffs_open_EEXIST.h
direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.c
direct/timothy_tests/quick_tests/test_yaffs_open_EINVAL2.h
direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.c
direct/timothy_tests/quick_tests/test_yaffs_open_EISDIR.h
direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.c
direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP.h
direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_open_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_open_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_open_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_open_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_open_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_open_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_open_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_read.c
direct/timothy_tests/quick_tests/test_yaffs_read.h
direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_read_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_read_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_remount_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_remount_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.c
direct/timothy_tests/quick_tests/test_yaffs_remount_ENODEV.h
direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_remount_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.c
direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_off.h
direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.c
direct/timothy_tests/quick_tests/test_yaffs_remount_force_off_read_only_on.h
direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.c
direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_off.h
direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.c
direct/timothy_tests/quick_tests/test_yaffs_remount_force_on_read_only_on.h
direct/timothy_tests/quick_tests/test_yaffs_rename.c
direct/timothy_tests/quick_tests/test_yaffs_rename.h
direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.c
direct/timothy_tests/quick_tests/test_yaffs_rename_EEXISTS.h
direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_rename_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_rename_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.c
direct/timothy_tests/quick_tests/test_yaffs_rename_ENAMETOOLONG2.h
direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_rename_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_rename_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_rename_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_rename_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.c
direct/timothy_tests/quick_tests/test_yaffs_rename_NULL2.h
direct/timothy_tests/quick_tests/test_yaffs_rename_dir.c
direct/timothy_tests/quick_tests/test_yaffs_rename_dir.h
direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.c
direct/timothy_tests/quick_tests/test_yaffs_rename_dir_ENOENT2.h
direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.c
direct/timothy_tests/quick_tests/test_yaffs_rename_dir_not_empty.h
direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.c
direct/timothy_tests/quick_tests/test_yaffs_rename_dir_to_file.h
direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.c
direct/timothy_tests/quick_tests/test_yaffs_rename_file_to_dir.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir_EBUSY.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir_ENOTEMPTY.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_rmdir_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_stat.c
direct/timothy_tests/quick_tests/test_yaffs_stat.h
direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.c
direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP.h
direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_stat_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_stat_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.c
direct/timothy_tests/quick_tests/test_yaffs_stat_ENOENT2.h
direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_stat_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_stat_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_symlink.c
direct/timothy_tests/quick_tests/test_yaffs_symlink.h
direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.c
direct/timothy_tests/quick_tests/test_yaffs_symlink_EEXIST.h
direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_symlink_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_symlink_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.c
direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOENT2.h
direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_symlink_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_symlink_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.c
direct/timothy_tests/quick_tests/test_yaffs_symlink_NULL2.h
direct/timothy_tests/quick_tests/test_yaffs_sync.c
direct/timothy_tests/quick_tests/test_yaffs_sync.h
direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_sync_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.c
direct/timothy_tests/quick_tests/test_yaffs_sync_ENODEV.h
direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_sync_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_sync_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_totalspace.c
direct/timothy_tests/quick_tests/test_yaffs_totalspace.h
direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_totalspace_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_totalspace_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_totalspace_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_truncate.c
direct/timothy_tests/quick_tests/test_yaffs_truncate.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_EISDIR.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOENT2.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.c
direct/timothy_tests/quick_tests/test_yaffs_truncate_big_file.h
direct/timothy_tests/quick_tests/test_yaffs_unlink.c
direct/timothy_tests/quick_tests/test_yaffs_unlink.h
direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.c
direct/timothy_tests/quick_tests/test_yaffs_unlink_EISDIR.h
direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.c
direct/timothy_tests/quick_tests/test_yaffs_unlink_ELOOP_dir.h
direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_unlink_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.c
direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT.h
direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.c
direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOENT2.h
direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.c
direct/timothy_tests/quick_tests/test_yaffs_unlink_ENOTDIR.h
direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_unlink_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_unlink_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_unmount.c
direct/timothy_tests/quick_tests/test_yaffs_unmount.h
direct/timothy_tests/quick_tests/test_yaffs_unmount2.c
direct/timothy_tests/quick_tests/test_yaffs_unmount2.h
direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.c
direct/timothy_tests/quick_tests/test_yaffs_unmount2_EINVAL.h
direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.c
direct/timothy_tests/quick_tests/test_yaffs_unmount2_ENODEV.h
direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.c
direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_off.h
direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.c
direct/timothy_tests/quick_tests/test_yaffs_unmount2_with_handle_open_and_forced_mode_on.h
direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.c
direct/timothy_tests/quick_tests/test_yaffs_unmount_EBUSY.h
direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.c
direct/timothy_tests/quick_tests/test_yaffs_unmount_ENAMETOOLONG.h
direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.c
direct/timothy_tests/quick_tests/test_yaffs_unmount_ENODEV.h
direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.c
direct/timothy_tests/quick_tests/test_yaffs_unmount_NULL.h
direct/timothy_tests/quick_tests/test_yaffs_write.c
direct/timothy_tests/quick_tests/test_yaffs_write.h
direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.c
direct/timothy_tests/quick_tests/test_yaffs_write_EBADF.h
direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.c
direct/timothy_tests/quick_tests/test_yaffs_write_EROFS.h
direct/timothy_tests/quick_tests/test_yaffs_write_big_file.c
direct/timothy_tests/quick_tests/test_yaffs_write_big_file.h
direct/timothy_tests/threading/Makefile
direct/timothy_tests/threading/lib.c
direct/timothy_tests/threading/lib.h
direct/timothy_tests/threading/test_a.c
direct/timothy_tests/threading/test_a.h
direct/timothy_tests/threading/test_b.c
direct/timothy_tests/threading/test_b.h
direct/timothy_tests/threading/thread_function.c
direct/timothy_tests/threading/thread_function.h
direct/timothy_tests/threading/threading.c
direct/timothy_tests/threading/threading.h
direct/yaffs_attribs.c
direct/yaffs_error.c
direct/yaffs_flashif.c
direct/yaffs_flashif.h
direct/yaffs_flashif2.h
direct/yaffs_hweight.c
direct/yaffs_hweight.h
direct/yaffs_list.h
direct/yaffs_nandemul2k.h
direct/yaffs_nandif.c
direct/yaffs_nandif.h
direct/yaffs_osglue.h
direct/yaffscfg.h
direct/yaffsfs.c
direct/yaffsfs.h
direct/ydirectenv.h
direct/yportenv.h
linux-tests/plot_data.sh
linux-tests/xattrtest.c
moduleconfig.h
mtdemul/nandemul2k.c
patch-ker.sh
patches/yaffs_linux_allocator.c
patches/yaffs_mtdif2.c
utils/Makefile
utils/mkyaffs2image.c
utils/mkyaffsimage.c
utils/yutilsenv.h [moved from yaffs_tagsvalidity.h with 56% similarity]
yaffs_allocator.c
yaffs_allocator.h
yaffs_attribs.c
yaffs_attribs.h
yaffs_bitmap.c
yaffs_bitmap.h
yaffs_checkptrw.c
yaffs_checkptrw.h
yaffs_ecc.c
yaffs_ecc.h
yaffs_getblockinfo.h
yaffs_guts.c
yaffs_guts.h
yaffs_linux.h
yaffs_mtdif.c
yaffs_mtdif.h
yaffs_mtdif1.h
yaffs_mtdif1_multi.c
yaffs_mtdif1_single.c
yaffs_mtdif2.h
yaffs_mtdif2_multi.c
yaffs_mtdif2_single.c
yaffs_nameval.c
yaffs_nameval.h
yaffs_nand.c
yaffs_nand.h
yaffs_packedtags1.c
yaffs_packedtags1.h
yaffs_packedtags2.c
yaffs_packedtags2.h
yaffs_summary.c [new file with mode: 0644]
yaffs_summary.h [new file with mode: 0644]
yaffs_tagscompat.c
yaffs_tagscompat.h
yaffs_tagsvalidity.c [deleted file]
yaffs_trace.h
yaffs_verify.c
yaffs_verify.h
yaffs_vfs_multi.c
yaffs_vfs_single.c
yaffs_yaffs1.c
yaffs_yaffs1.h
yaffs_yaffs2.c
yaffs_yaffs2.h
yportenv_multi.h
yportenv_single.h

similarity index 85%
rename from Kconfig
rename to Kconfig_multi
index 635414059997d1efcd89eea9e49cc068bcaf6004..658feea5ff55ef43a692b33c38f3aefa73b21524 100644 (file)
--- a/Kconfig
@@ -1,23 +1,23 @@
 #
-# YAFFS file system configurations
+# yaffs file system configurations
 #
 
 config YAFFS_FS
-       tristate "YAFFS2 file system support"
+       tristate "yaffs2 file system support"
        default n
        depends on MTD_BLOCK
        select YAFFS_YAFFS1
        select YAFFS_YAFFS2
        help
-         YAFFS2, or Yet Another Flash Filing System, is a filing system
+         yaffs2, or Yet Another Flash File System, is a file system
          optimised for NAND Flash chips.
 
-         To compile the YAFFS2 file system support as a module, choose M
+         To compile the yaffs2 file system support as a module, choose M
          here: the module will be called yaffs2.
 
          If unsure, say N.
 
-         Further information on YAFFS2 is available at
+         Further information on yaffs2 is available at
          <http://www.aleph1.co.uk/yaffs/>.
 
 config YAFFS_YAFFS1
@@ -25,7 +25,7 @@ config YAFFS_YAFFS1
        depends on YAFFS_FS
        default y
        help
-         Enable YAFFS1 support -- yaffs for 512 byte / page devices
+         Enable yaffs1 support -- yaffs for 512 byte / page devices
 
          Not needed for 2K-page devices.
 
@@ -49,11 +49,11 @@ config YAFFS_9BYTE_TAGS
          If unsure, say N.
 
 config YAFFS_DOES_ECC
-       bool "Lets Yaffs do its own ECC"
+       bool "Lets yaffs do its own ECC"
        depends on YAFFS_FS && YAFFS_YAFFS1 && !YAFFS_9BYTE_TAGS
        default n
        help
-         This enables Yaffs to use its own ECC functions instead of using
+         This enables yaffs to use its own ECC functions instead of using
          the ones from the generic MTD-NAND driver.
 
          If unsure, say N.
@@ -74,7 +74,7 @@ config YAFFS_YAFFS2
        depends on YAFFS_FS
        default y
        help
-         Enable YAFFS2 support -- yaffs for >= 2K bytes per page devices
+         Enable yaffs2 support -- yaffs for >= 2K bytes per page devices
 
          If unsure, say Y.
 
@@ -91,11 +91,11 @@ config YAFFS_AUTO_YAFFS2
          If unsure, say Y.
 
 config YAFFS_DISABLE_TAGS_ECC
-       bool "Disable YAFFS from doing ECC on tags by default"
+       bool "Disable yaffs from doing ECC on tags by default"
        depends on YAFFS_FS && YAFFS_YAFFS2
        default n
        help
-         This defaults Yaffs to using its own ECC calculations on tags instead of
+         This defaults yaffs to using its own ECC calculations on tags instead of
          just relying on the MTD.
          This behavior can also be overridden with tags_ecc_on and
          tags_ecc_off mount options.
@@ -107,7 +107,7 @@ config YAFFS_ALWAYS_CHECK_CHUNK_ERASED
        depends on YAFFS_FS
        default n
        help
-          Normally YAFFS only checks chunks before writing until an erased
+          Normally yaffs only checks chunks before writing until an erased
          chunk is found. This helps to detect any partially written
          chunks that might have happened due to power loss.
 
diff --git a/Kconfig_single b/Kconfig_single
new file mode 100644 (file)
index 0000000..bd6e8df
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# yaffs file system configurations
+#
+
+config YAFFS_FS
+       tristate "yaffs2 file system support"
+       default n
+       depends on MTD_BLOCK
+       select YAFFS_YAFFS1
+       select YAFFS_YAFFS2
+       help
+         yaffs2, or Yet Another Flash File System, is a file system
+         optimised for NAND Flash chips.
+
+         To compile the yaffs2 file system support as a module, choose M
+         here: the module will be called yaffs2.
+
+         If unsure, say N.
+
+         Further information on yaffs2 is available at
+         <http://www.aleph1.co.uk/yaffs/>.
+
+config YAFFS_DEBUG
+       bool "Enable yaffs debugging"
+       depends on YAFFS_FS
+       default n
+       help
+         Enable the yaffs debugging tracing.
+
+         If unsure, say N.
index 1dbafc6ff3a501e1db1594f92d70dc6714a99b61..db1b5c21e9dfe8b3a1389da1f2b18e1b67ec327e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -30,25 +30,27 @@ ifneq ($(KERNELRELEASE),)
        yaffs2-objs += yaffs_mtdif1_single.o yaffs_packedtags1.o
        yaffs2-objs += yaffs_ecc.o yaffs_vfs_single.o yaffs_guts.o
        yaffs2-objs += yaffs_packedtags2.o
-       yaffs2-objs += yaffs_tagscompat.o yaffs_tagsvalidity.o
+       yaffs2-objs += yaffs_tagscompat.o
        yaffs2-objs += yaffs_checkptrw.o yaffs_nand.o
        yaffs2-objs += yaffs_checkptrw.o yaffs_nand.o yaffs_nameval.o
        yaffs2-objs += yaffs_allocator.o yaffs_bitmap.o yaffs_attribs.o
        yaffs2-objs += yaffs_yaffs1.o
        yaffs2-objs += yaffs_yaffs2.o
        yaffs2-objs += yaffs_verify.o
+       yaffs2-objs += yaffs_summary.o
 
        yaffs2multi-objs := yaffs_mtdif.o yaffs_mtdif2_multi.o
        yaffs2multi-objs += yaffs_mtdif1_multi.o yaffs_packedtags1.o
        yaffs2multi-objs += yaffs_ecc.o yaffs_vfs_multi.o yaffs_guts.o
        yaffs2multi-objs += yaffs_packedtags2.o
-       yaffs2multi-objs += yaffs_tagscompat.o yaffs_tagsvalidity.o
+       yaffs2multi-objs += yaffs_tagscompat.o
        yaffs2multi-objs += yaffs_checkptrw.o yaffs_nand.o
        yaffs2multi-objs += yaffs_checkptrw.o yaffs_nand.o yaffs_nameval.o
        yaffs2multi-objs += yaffs_allocator.o yaffs_bitmap.o yaffs_attribs.o
        yaffs2multi-objs += yaffs_yaffs1.o
        yaffs2multi-objs += yaffs_yaffs2.o
        yaffs2multi-objs += yaffs_verify.o
+       yaffs2multi-objs += yaffs_summary.o
 
 else
        KERNELDIR ?= /lib/modules/$(shell uname -r)/build
index e63a28aa3ed691d06045e411e6764d876b680cd8..6a8729c4b09440a84925c02f3ea72e1cc32cf55d 100644 (file)
@@ -6,12 +6,13 @@ obj-$(CONFIG_YAFFS_FS) += yaffs.o
 
 yaffs-y := yaffs_ecc.o yaffs_vfs.o yaffs_guts.o yaffs_checkptrw.o
 yaffs-y += yaffs_packedtags1.o yaffs_packedtags2.o yaffs_nand.o
-yaffs-y += yaffs_tagscompat.o yaffs_tagsvalidity.o
+yaffs-y += yaffs_tagscompat.o
 yaffs-y += yaffs_mtdif.o yaffs_mtdif1.o yaffs_mtdif2.o
 yaffs-y += yaffs_nameval.o yaffs_attribs.o
 yaffs-y += yaffs_allocator.o
 yaffs-y += yaffs_yaffs1.o
 yaffs-y += yaffs_yaffs2.o
 yaffs-y += yaffs_bitmap.o
+yaffs-y += yaffs_summary.o
 yaffs-y += yaffs_verify.o
 
index 214f4e925ce868f8d3c07d05a98194f478a6055e..afe0ef0577bd687833c4906405585ec475da30c7 100644 (file)
@@ -36,7 +36,7 @@ CFLAGS+=   -DCONFIG_YAFFS_USE_PTHREADS -lpthread
 COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
                 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
-                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
                 yaffs_checkptrw.o  yaffs_qsort.o\
                 yaffs_nameval.o yaffs_attribs.o \
                 yaffs_norif1.o  ynorsim.o \
@@ -44,7 +44,8 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
                 yaffs_bitmap.o \
                 yaffs_yaffs1.o \
                 yaffs_yaffs2.o \
-                yaffs_verify.o
+                yaffs_verify.o \
+                yaffs_summary.o
 
 #               yaffs_checkptrwtest.o\
 
@@ -52,14 +53,15 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
 YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
           yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
-          yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+          yaffs_checkptrw.h yaffs_checkptrw.c \
           yaffs_nameval.c yaffs_nameval.h \
           yaffs_trace.h yaffs_attribs.h \
           yaffs_allocator.c yaffs_allocator.h \
           yaffs_yaffs1.c yaffs_yaffs1.h \
           yaffs_yaffs2.c yaffs_yaffs2.h \
           yaffs_bitmap.c yaffs_bitmap.h \
-          yaffs_verify.c yaffs_verify.h
+          yaffs_verify.c yaffs_verify.h \
+          yaffs_summary.c yaffs_summary.h
 
 YAFFSDIRECTSYMLINKS =  yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
                       yaffsfs.h yaffs_osglue.h ydirectenv.h \
index e6a0a146916cc38be18b08fa0f20022b20d48487..fa48158d402b36afed578d9fcd47ab2ac48299f9 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * YAFFS: Yet another FFS. A NAND-flash specific file system. 
+ * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -36,7 +36,7 @@ void copy_in_a_file(const char *yaffsName,const char *inName)
        int ni,no;
        inh = open(inName,O_RDONLY);
        outh = yaffs_open(yaffsName, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-       
+
        while((ni = read(inh,buffer,100)) > 0)
        {
                no = yaffs_write(outh,buffer,ni);
@@ -44,9 +44,9 @@ void copy_in_a_file(const char *yaffsName,const char *inName)
                {
                        printf("problem writing yaffs file\n");
                }
-               
+
        }
-       
+
        yaffs_close(outh);
        close(inh);
 }
@@ -58,19 +58,19 @@ void make_a_file(const char *yaffsName,char bval,int sizeOfFile)
        unsigned char buffer[100];
 
        outh = yaffs_open(yaffsName, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-       
+
        memset(buffer,bval,100);
-       
+
        do{
                i = sizeOfFile;
                if(i > 100) i = 100;
                sizeOfFile -= i;
-               
+
                yaffs_write(outh,buffer,i);
-               
+
        } while (sizeOfFile > 0);
-       
-               
+
+
        yaffs_close(outh);
 
 }
@@ -83,7 +83,7 @@ void make_pattern_file(char *fn,int size)
        outh = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
        yaffs_lseek(outh,size-1,SEEK_SET);
        yaffs_write(outh,"A",1);
-       
+
        for(i = 0; i < size; i+=256)
        {
                marker = ~i;
@@ -91,7 +91,7 @@ void make_pattern_file(char *fn,int size)
                yaffs_write(outh,&marker,sizeof(marker));
        }
        yaffs_close(outh);
-       
+
 }
 
 int check_pattern_file(char *fn)
@@ -101,10 +101,10 @@ int check_pattern_file(char *fn)
        int i;
        int size;
        int ok = 1;
-       
+
        h = yaffs_open(fn, O_RDWR,0);
        size = yaffs_lseek(h,0,SEEK_END);
-               
+
        for(i = 0; i < size; i+=256)
        {
                yaffs_lseek(h,i,SEEK_SET);
@@ -130,16 +130,16 @@ int dump_file_data(char *fn)
        int i = 0;
        int ok = 1;
        unsigned char b;
-       
+
        h = yaffs_open(fn, O_RDWR,0);
 
-                               
+
        printf("%s\n",fn);
        while(yaffs_read(h,&b,1)> 0)
        {
                printf("%02x",b);
                i++;
-               if(i > 32) 
+               if(i > 32)
                {
                   printf("\n");
                   i = 0;;
@@ -157,7 +157,7 @@ void dump_file(const char *fn)
        int i;
        int size;
        int h;
-       
+
        h = yaffs_open(fn,O_RDONLY,0);
        if(h < 0)
        {
@@ -169,7 +169,7 @@ void dump_file(const char *fn)
                printf("*****\nDump file %s size %d\n",fn,size);
                for(i = 0; i < size; i++)
                {
-                       
+
                }
        }
 }
@@ -183,7 +183,7 @@ void create_file_of_size(const char *fn,int syze)
        char xx[200];
 
        h = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-               
+
        while (syze > 0)
        {
                sprintf(xx,"%s %8d",fn,iteration);
@@ -203,23 +203,23 @@ void verify_file_of_size(const char *fn,int syze)
 {
        int h;
        int result;
-       
+
        char xx[200];
        char yy[200];
        int l;
-       
+
        int iterations = (syze + strlen(fn) -1)/ strlen(fn);
-       
+
        h = yaffs_open(fn, O_RDONLY, S_IREAD | S_IWRITE);
-               
+
        while (iterations > 0)
        {
                sprintf(xx,"%s %8d",fn,iterations);
                l = strlen(xx);
-               
+
                result = yaffs_read(h,yy,l);
                yy[l] = 0;
-               
+
                if(strcmp(xx,yy)){
                        printf("=====>>>>> verification of file %s failed near position %lld\n",fn,(long long)yaffs_lseek(h,0,SEEK_CUR));
                }
@@ -231,20 +231,20 @@ void verify_file_of_size(const char *fn,int syze)
 void create_resized_file_of_size(const char *fn,int syze1,int reSyze, int syze2)
 {
        int h;
-       
+
        int iterations;
-       
+
        h = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-               
+
        iterations = (syze1 + strlen(fn) -1)/ strlen(fn);
        while (iterations > 0)
        {
                yaffs_write(h,fn,strlen(fn));
                iterations--;
        }
-       
+
        yaffs_ftruncate(h,reSyze);
-       
+
        yaffs_lseek(h,0,SEEK_SET);
        iterations = (syze2 + strlen(fn) -1)/ strlen(fn);
        while (iterations > 0)
@@ -252,7 +252,7 @@ void create_resized_file_of_size(const char *fn,int syze1,int reSyze, int syze2)
                yaffs_write(h,fn,strlen(fn));
                iterations--;
        }
-       
+
        yaffs_close (h);
 }
 
@@ -270,28 +270,28 @@ void do_some_file_stuff(const char *path)
        yaffs_unlink(fn);
 
        sprintf(fn,"%s/%s",path,"f2");
-       
+
        create_resized_file_of_size(fn,10000,3000,4000);
 }
 
 void yaffs_backward_scan_test(const char *path)
 {
        char fn[100];
-       
-       yaffs_start_up();       
-       
+
+       yaffs_start_up();
+
        yaffs_mount(path);
-       
+
        do_some_file_stuff(path);
-       
+
        sprintf(fn,"%s/ddd",path);
-       
+
        yaffs_mkdir(fn,0);
-       
+
        do_some_file_stuff(fn);
-       
+
        yaffs_unmount(path);
-       
+
        yaffs_mount(path);
 }
 
@@ -319,16 +319,16 @@ void yaffs_device_flush_test(const char *path)
        char fn[100];
        int h;
        int i;
-       
-       yaffs_start_up();       
-       
+
+       yaffs_start_up();
+
        yaffs_mount(path);
-       
+
        do_some_file_stuff(path);
-       
+
        // Open and add some data to a few files
        for(i = 0; i < 10; i++) {
-       
+
                sprintf(fn,"%s/ff%d",path,i);
 
                h = yaffs_open(fn, O_CREAT | O_RDWR | O_TRUNC, S_IWRITE | S_IREAD);
@@ -336,7 +336,7 @@ void yaffs_device_flush_test(const char *path)
                yaffs_write(h,xxzz,2000);
        }
        yaffs_unmount(path);
-       
+
        yaffs_mount(path);
 }
 
@@ -346,9 +346,9 @@ void short_scan_test(const char *path, int fsize, int niterations)
 {
        int i;
        char fn[100];
-       
+
        sprintf(fn,"%s/%s",path,"f1");
-       
+
        yaffs_start_up();
        for(i = 0; i < niterations; i++)
        {
@@ -369,13 +369,13 @@ void scan_pattern_test(const char *path, int fsize, int niterations)
        int j;
        char fn[3][100];
        int result;
-       
+
        sprintf(fn[0],"%s/%s",path,"f0");
        sprintf(fn[1],"%s/%s",path,"f1");
        sprintf(fn[2],"%s/%s",path,"f2");
-       
+
        yaffs_start_up();
-       
+
        for(i = 0; i < niterations; i++)
        {
                printf("\n*****************\nIteration %d\n",i);
@@ -386,7 +386,7 @@ void scan_pattern_test(const char *path, int fsize, int niterations)
                {
                        result = dump_file_data(fn[j]);
                        result = check_pattern_file(fn[j]);
-                       make_pattern_file(fn[j],fsize); 
+                       make_pattern_file(fn[j],fsize);
                        result = dump_file_data(fn[j]);
                        result = check_pattern_file(fn[j]);
                }
@@ -401,17 +401,17 @@ void fill_disk(const char *path,int nfiles)
        int result;
        int f;
 
-        static char xx[600];   
+        static char xx[600];
        char str[50];
-       
+
        for(n = 0; n < nfiles; n++)
        {
                sprintf(str,"%s/%d",path,n);
-               
+
                h = yaffs_open(str, O_CREAT | O_RDWR | O_TRUNC, S_IREAD | S_IWRITE);
-               
+
                printf("writing file %s handle %d ",str, h);
-               
+
                while ((result = yaffs_write(h,xx,600)) == 600)
                {
                        f = yaffs_freespace(path);
@@ -426,12 +426,12 @@ void fill_disk_and_delete(const char *path, int nfiles, int ncycles)
        int i,j;
        char str[50];
        int result;
-       
+
        for(i = 0; i < ncycles; i++)
        {
                printf("@@@@@@@@@@@@@@ cycle %d\n",i);
                fill_disk(path,nfiles);
-               
+
                for(j = 0; j < nfiles; j++)
                {
                        sprintf(str,"%s/%d",path,j);
@@ -448,9 +448,9 @@ void fill_files(const char *path,int flags, int maxIterations,int siz)
        int j;
        char str[50];
        int h;
-       
+
        i = 0;
-       
+
        do{
                sprintf(str,"%s/%d",path,i);
                h = yaffs_open(str, O_CREAT | O_TRUNC | O_RDWR,S_IREAD | S_IWRITE);
@@ -462,14 +462,14 @@ void fill_files(const char *path,int flags, int maxIterations,int siz)
                                yaffs_write(h,str,1);
                        }
                }
-               
+
                if( flags & 1)
                {
                        yaffs_unlink(str);
                }
                i++;
        } while(h >= 0 && i < maxIterations);
-       
+
        if(flags & 2)
        {
                i = 0;
@@ -486,9 +486,9 @@ void leave_unlinked_file(const char *path,int maxIterations,int siz)
        int i;
        char str[50];
        int h;
-       
+
        i = 0;
-       
+
        do{
                sprintf(str,"%s/%d",path,i);
                printf("create %s\n",str);
@@ -499,7 +499,7 @@ void leave_unlinked_file(const char *path,int maxIterations,int siz)
                }
                i++;
        } while(h < 0 && i < maxIterations);
-       
+
        if(h >= 0)
        {
                for(i = 0; i < siz; i++)
@@ -507,7 +507,7 @@ void leave_unlinked_file(const char *path,int maxIterations,int siz)
                        yaffs_write(h,str,1);
                }
        }
-       
+
        printf("Leaving file %s open\n",str);
 
 }
@@ -518,9 +518,9 @@ void dumpDirFollow(const char *dname)
        yaffs_dirent *de;
        struct yaffs_stat s;
        char str[100];
-                       
+
        d = yaffs_opendir(dname);
-       
+
        if(!d)
        {
                printf("opendir failed\n");
@@ -530,9 +530,9 @@ void dumpDirFollow(const char *dname)
                while((de = yaffs_readdir(d)) != NULL)
                {
                        sprintf(str,"%s/%s",dname,de->d_name);
-                       
+
                        yaffs_lstat(str,&s);
-                       
+
                        printf("%s ino %d length %d mode %X ",de->d_name,(int)s.st_ino,(int)s.st_size,s.st_mode);
                        switch(s.st_mode & S_IFMT)
                        {
@@ -542,18 +542,18 @@ void dumpDirFollow(const char *dname)
                                                          if(yaffs_readlink(str,str,100) < 0)
                                                                printf("no alias");
                                                          else
-                                                               printf("\"%s\"",str);    
+                                                               printf("\"%s\"",str);
                                                          break;
                                default: printf("unknown"); break;
                        }
-                       
-                       printf("\n");           
+
+                       printf("\n");
                }
-               
+
                yaffs_closedir(d);
        }
        printf("\n");
-       
+
        printf("Free space in %s is %d\n\n",dname,(int)yaffs_freespace(dname));
 
 }
@@ -565,9 +565,9 @@ void dump_directory_tree_worker(const char *dname,int recursive)
        yaffs_dirent *de;
        struct yaffs_stat s;
        char str[1000];
-                       
+
        d = yaffs_opendir(dname);
-       
+
        if(!d)
        {
                printf("opendir failed\n");
@@ -577,9 +577,9 @@ void dump_directory_tree_worker(const char *dname,int recursive)
                while((de = yaffs_readdir(d)) != NULL)
                {
                        sprintf(str,"%s/%s",dname,de->d_name);
-                       
+
                        yaffs_lstat(str,&s);
-                       
+
                        printf("%s inode %d obj %x length %d mode %X ",str,s.st_ino,de->d_dont_use,(int)s.st_size,s.st_mode);
                        switch(s.st_mode & S_IFMT)
                        {
@@ -589,18 +589,18 @@ void dump_directory_tree_worker(const char *dname,int recursive)
                                                          if(yaffs_readlink(str,str,100) < 0)
                                                                printf("no alias");
                                                          else
-                                                               printf("\"%s\"",str);    
+                                                               printf("\"%s\"",str);
                                                          break;
                                default: printf("unknown"); break;
                        }
-                       
+
                        printf("\n");
 
                        if((s.st_mode & S_IFMT) == S_IFDIR && recursive)
                                dump_directory_tree_worker(str,1);
-                                                       
+
                }
-               
+
                yaffs_closedir(d);
        }
 
@@ -623,11 +623,11 @@ void dumpDir(const char *dname)
 static void PermissionsCheck(const char *path, mode_t tmode, int tflags,int expectedResult)
 {
        int fd;
-       
+
        if(yaffs_chmod(path,tmode)< 0) printf("chmod failed\n");
-       
+
        fd = yaffs_open(path,tflags,0);
-       
+
        if((fd >= 0) != (expectedResult > 0))
        {
                printf("Permissions check %x %x %d failed\n",tmode,tflags,expectedResult);
@@ -636,11 +636,11 @@ static void PermissionsCheck(const char *path, mode_t tmode, int tflags,int expe
        {
                printf("Permissions check %x %x %d OK\n",tmode,tflags,expectedResult);
        }
-       
-       
+
+
        yaffs_close(fd);
-       
-       
+
+
 }
 
 int long_test(int argc, char *argv[])
@@ -649,20 +649,20 @@ int long_test(int argc, char *argv[])
        int f;
        int r;
        char buffer[20];
-       
+
        char str[100];
-       
+
        int h;
        mode_t temp_mode;
        struct yaffs_stat ystat;
-       
+
        yaffs_start_up();
-       
+
        yaffs_mount("/boot");
        yaffs_mount("/data");
        yaffs_mount("/flash");
        yaffs_mount("/ram");
-       
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
        printf("\nDirectory look-up of /data\n");
@@ -672,36 +672,36 @@ int long_test(int argc, char *argv[])
 
        //leave_unlinked_file("/flash",20000,0);
        //leave_unlinked_file("/data",20000,0);
-       
+
        leave_unlinked_file("/ram",20,0);
-       
+
 
        f = yaffs_open("/boot/b1", O_RDONLY,0);
-       
+
        printf("open /boot/b1 readonly, f=%d\n",f);
-       
+
        f = yaffs_open("/boot/b1", O_CREAT,S_IREAD | S_IWRITE);
-       
+
        printf("open /boot/b1 O_CREAT, f=%d\n",f);
-       
-       
+
+
        r = yaffs_write(f,"hello",1);
        printf("write %d attempted to write to a read-only file\n",r);
-       
+
        r = yaffs_close(f);
-       
+
        printf("close %d\n",r);
 
        f = yaffs_open("/boot/b1", O_RDWR,0);
-       
+
        printf("open /boot/b1 O_RDWR,f=%d\n",f);
-       
-       
+
+
        r = yaffs_write(f,"hello",2);
        printf("write %d attempted to write to a writeable file\n",r);
        r = yaffs_write(f,"world",3);
        printf("write %d attempted to write to a writeable file\n",r);
-       
+
        r= yaffs_lseek(f,0,SEEK_END);
        printf("seek end %d\n",r);
        memset(buffer,0,20);
@@ -718,75 +718,75 @@ int long_test(int argc, char *argv[])
 
        // Check values reading at end.
        // A read past end of file should return 0 for 0 bytes read.
-               
+
        r= yaffs_lseek(f,0,SEEK_END);
        r = yaffs_read(f,buffer,10);
-       printf("read at end returned  %d\n",r); 
+       printf("read at end returned  %d\n",r);
        r= yaffs_lseek(f,500,SEEK_END);
        r = yaffs_read(f,buffer,10);
-       printf("read past end returned  %d\n",r);       
-       
+       printf("read past end returned  %d\n",r);
+
        r = yaffs_close(f);
-       
+
        printf("close %d\n",r);
-       
+
        copy_in_a_file("/boot/yyfile","xxx");
-       
+
        // Create a file with a long name
-       
+
        copy_in_a_file("/boot/file with a long name","xxx");
-       
-       
+
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
 
        // Check stat
        r = yaffs_lstat("/boot/file with a long name",&ystat);
-       
+
        // Check rename
-       
+
        r = yaffs_rename("/boot/file with a long name","/boot/r1");
-       
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
-       
+
        // Check unlink
        r = yaffs_unlink("/boot/r1");
-       
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
 
        // Check mkdir
-       
+
        r = yaffs_mkdir("/boot/directory1",0);
-       
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
        printf("\nDirectory look-up of /boot/directory1\n");
        dumpDir("/boot/directory1");
 
-       // add a file to the directory                  
+       // add a file to the directory
        copy_in_a_file("/boot/directory1/file with a long name","xxx");
-       
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
        printf("\nDirectory look-up of /boot/directory1\n");
        dumpDir("/boot/directory1");
-       
+
        //  Attempt to delete directory (should fail)
-       
+
        r = yaffs_rmdir("/boot/directory1");
-       
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
        printf("\nDirectory look-up of /boot/directory1\n");
        dumpDir("/boot/directory1");
-       
+
        // Delete file first, then rmdir should work
        r = yaffs_unlink("/boot/directory1/file with a long name");
        r = yaffs_rmdir("/boot/directory1");
-       
-       
+
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
        printf("\nDirectory look-up of /boot/directory1\n");
@@ -794,19 +794,19 @@ int long_test(int argc, char *argv[])
 
 #if 0
        fill_disk_and_delete("/boot",20,20);
-                       
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
 #endif
 
        yaffs_symlink("yyfile","/boot/slink");
-       
+
        yaffs_readlink("/boot/slink",str,100);
        printf("symlink alias is %s\n",str);
-       
-       
-       
-       
+
+
+
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
        printf("\nDirectory look-up of /boot (using stat instead of lstat)\n");
@@ -815,30 +815,30 @@ int long_test(int argc, char *argv[])
        dumpDir("/boot/directory1");
 
        h = yaffs_open("/boot/slink",O_RDWR,0);
-       
+
        printf("file length is %d\n",(int)yaffs_lseek(h,0,SEEK_END));
-       
+
        yaffs_close(h);
-       
+
        yaffs_unlink("/boot/slink");
 
-       
+
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
-       
+
        // Check chmod
-       
+
        yaffs_lstat("/boot/yyfile",&ystat);
        temp_mode = ystat.st_mode;
-       
+
        yaffs_chmod("/boot/yyfile",0x55555);
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
-       
+
        yaffs_chmod("/boot/yyfile",temp_mode);
        printf("\nDirectory look-up of /boot\n");
        dumpDir("/boot");
-       
+
        // Permission checks...
        PermissionsCheck("/boot/yyfile",0, O_WRONLY,0);
        PermissionsCheck("/boot/yyfile",0, O_RDONLY,0);
@@ -851,44 +851,44 @@ int long_test(int argc, char *argv[])
        PermissionsCheck("/boot/yyfile",S_IWRITE, O_WRONLY,1);
        PermissionsCheck("/boot/yyfile",S_IWRITE, O_RDONLY,0);
        PermissionsCheck("/boot/yyfile",S_IWRITE, O_RDWR,0);
-       
+
        PermissionsCheck("/boot/yyfile",S_IREAD | S_IWRITE, O_WRONLY,1);
        PermissionsCheck("/boot/yyfile",S_IREAD | S_IWRITE, O_RDONLY,1);
        PermissionsCheck("/boot/yyfile",S_IREAD | S_IWRITE, O_RDWR,1);
 
        yaffs_chmod("/boot/yyfile",temp_mode);
-       
+
        //create a zero-length file and unlink it (test for scan bug)
-       
+
        h = yaffs_open("/boot/zlf",O_CREAT | O_TRUNC | O_RDWR,0);
        yaffs_close(h);
-       
+
        yaffs_unlink("/boot/zlf");
-       
-       
+
+
        yaffs_dump_dev("/boot");
-       
+
        fill_disk_and_delete("/boot",20,20);
-       
+
        yaffs_dump_dev("/boot");
-       
+
        fill_files("/boot",1,10000,0);
        fill_files("/boot",1,10000,5000);
        fill_files("/boot",2,10000,0);
        fill_files("/boot",2,10000,5000);
-       
+
        leave_unlinked_file("/data",20000,0);
        leave_unlinked_file("/data",20000,5000);
        leave_unlinked_file("/data",20000,5000);
        leave_unlinked_file("/data",20000,5000);
        leave_unlinked_file("/data",20000,5000);
        leave_unlinked_file("/data",20000,5000);
-       
+
        yaffs_dump_dev("/boot");
        yaffs_dump_dev("/data");
-       
-               
-               
+
+
+
        return 0;
 
 }
@@ -905,26 +905,26 @@ int huge_directory_test_on_path(char *path)
 
        int total = 0;
        int lastTotal = 0;
-       
+
        char str[100];
 
-       
+
        yaffs_start_up();
-       
+
        yaffs_mount(path);
-       
+
        // Create a large number of files
-       
+
        for(i = 0; i < 2000; i++)
        {
          sprintf(str,"%s/%d",path,i);
-         
+
           f = yaffs_open(str,O_CREAT,S_IREAD | S_IWRITE);
           yaffs_close(f);
        }
-       
-       
-       
+
+
+
        d = yaffs_opendir(path);
        i = 0;
        if (d) {
@@ -943,10 +943,10 @@ int huge_directory_test_on_path(char *path)
        break;
        }
        }
-       
+
        yaffs_closedir(d);
        }
-       
+
        return 0;
 }
 
@@ -962,34 +962,34 @@ void rename_over_test(const char *mountpt)
        char a[100];
        char b[100];
        char c[100];
-       
+
        sprintf(a,"%s/a",mountpt);
        sprintf(b,"%s/b",mountpt);
        sprintf(c,"%s/c",mountpt);
-       
+
        yaffs_start_up();
-       
+
        yaffs_mount(mountpt);
-       
+
        printf("Existing files\n");
        dumpDirFollow(mountpt);
-       
-       
-       
+
+
+
        i = yaffs_open(c,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
        printf("File c handle is %d\n",i);
        yaffs_close(i);
-       i = yaffs_open(a,O_CREAT | O_TRUNC | O_RDWR,  S_IREAD | S_IWRITE); 
+       i = yaffs_open(a,O_CREAT | O_TRUNC | O_RDWR,  S_IREAD | S_IWRITE);
        yaffs_close(i);
        i = yaffs_open(b,O_CREAT | O_TRUNC | O_RDWR,  S_IREAD | S_IWRITE);
        yaffs_close(i);
        yaffs_rename(a,b); // rename over
        yaffs_rename(b,a); // rename back again (not renaimng over)
        yaffs_rename(a,b); // rename back again (not renaimng over)
-       
-       
+
+
        yaffs_unmount(mountpt);
-       
+
 }
 
 
@@ -1000,46 +1000,46 @@ int resize_stress_test(const char *path)
    int r;
    char aname[100];
    char bname[100];
-   
+
    char abuffer[1000];
    char bbuffer[1000];
-   
+
    yaffs_start_up();
-   
+
    yaffs_mount(path);
-   
+
    sprintf(aname,"%s%s",path,"/a");
    sprintf(bname,"%s%s",path,"/b");
-   
+
    memset(abuffer,'a',1000);
    memset(bbuffer,'b',1000);
-   
+
    a = yaffs_open(aname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
    b = yaffs_open(bname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-   
+
    printf(" %s %d %s %d\n",aname,a,bname,b);
-  
+
    x = 0;
-   
+
    for(j = 0; j < 100; j++)
    {
                yaffs_lseek(a,0,SEEK_END);
 
-               
+
                for(i = 0; i <20000; i++)
                {
                   //r =        yaffs_lseek(b,i,SEEK_SET);
                        //r = yaffs_write(b,bbuffer,1000);
-                       
+
                        if(x & 0x16)
                        {
                                // shrink
                                int syz = yaffs_lseek(a,0,SEEK_END);
-                               
+
                                syz -= 500;
                                if(syz < 0) syz = 0;
                                yaffs_ftruncate(a,syz);
-                               
+
                        }
                        else
                        {
@@ -1048,12 +1048,12 @@ int resize_stress_test(const char *path)
                                r = yaffs_write(a,abuffer,1000);
                        }
                        x++;
-                       
+
                }
    }
-   
+
    return 0;
-   
+
 }
 
 
@@ -1062,16 +1062,16 @@ int overwrite_test(const char *path)
    char aname[100];
    char bname[100];
    int i;
-   int j;   
+   int j;
    int a;
    int b;
    yaffs_start_up();
-   
+
    yaffs_mount(path);
-   
+
    sprintf(aname,"%s%s",path,"/a");
    sprintf(bname,"%s%s",path,"/b");
-   
+
    b = yaffs_open(bname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
    for(j= 0; j < 500; j++){
        yaffs_write(b,bname,100);
@@ -1080,32 +1080,32 @@ int overwrite_test(const char *path)
                yaffs_write(a,&a,sizeof(a));
        yaffs_close(a);
    }
-   
+
    return 0;
-   
+
 }
 
 
 int root_perm_remount(const char *path)
 {
    struct yaffs_stat s;
-   
+
    yaffs_start_up();
-   
+
    yaffs_mount(path);
-   
+
    yaffs_lstat(path,&s);
    printf("root perms after mount %x\n",s.st_mode);
-   
+
    yaffs_chmod(path, 0777);
 
    yaffs_lstat(path,&s);
    printf("root perms after setting to 0777 is  %x\n",s.st_mode);
-   
+
    yaffs_unmount(path);
-      
+
    return 0;
-   
+
 }
 
 
@@ -1116,54 +1116,54 @@ int resize_stress_test_no_grow_complex(const char *path,int iters)
    int r;
    char aname[100];
    char bname[100];
-   
+
    char abuffer[1000];
    char bbuffer[1000];
 
-   
+
    yaffs_start_up();
-   
+
    yaffs_mount(path);
-   
+
    sprintf(aname,"%s%s",path,"/a");
    sprintf(bname,"%s%s",path,"/b");
-   
+
    memset(abuffer,'a',1000);
    memset(bbuffer,'b',1000);
-   
+
    a = yaffs_open(aname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
    b = yaffs_open(bname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-   
+
    printf(" %s %d %s %d\n",aname,a,bname,b);
-  
+
    x = 0;
-   
+
    for(j = 0; j < iters; j++)
    {
                yaffs_lseek(a,0,SEEK_END);
 
-               
+
                for(i = 0; i <20000; i++)
                {
                   //r =        yaffs_lseek(b,i,SEEK_SET);
                        //r = yaffs_write(b,bbuffer,1000);
-                       
+
                        if(!(x%20))
                        {
                                // shrink
                                int syz = yaffs_lseek(a,0,SEEK_END);
-                               
+
                                while(syz > 4000)
                                {
-                               
+
                                        syz -= 2050;
                                        if(syz < 0) syz = 0;
                                        yaffs_ftruncate(a,syz);
                                        syz = yaffs_lseek(a,0,SEEK_END);
                                        printf("shrink to %d\n",syz);
                                }
-                               
-                               
+
+
                        }
                        else
                        {
@@ -1172,16 +1172,16 @@ int resize_stress_test_no_grow_complex(const char *path,int iters)
                                r = yaffs_write(a,abuffer,1000);
                        }
                        x++;
-                       
-                                       
+
+
                }
-               
+
                printf("file size is %lld\n",(long long)yaffs_lseek(a,0,SEEK_END));
 
    }
-   
+
    return 0;
-   
+
 }
 
 int resize_stress_test_no_grow(const char *path,int iters)
@@ -1191,53 +1191,53 @@ int resize_stress_test_no_grow(const char *path,int iters)
    int r;
    char aname[100];
    char bname[100];
-   
+
    char abuffer[1000];
    char bbuffer[1000];
-   
+
    yaffs_start_up();
-   
+
    yaffs_mount(path);
-   
+
    sprintf(aname,"%s%s",path,"/a");
    sprintf(bname,"%s%s",path,"/b");
-   
+
    memset(abuffer,'a',1000);
    memset(bbuffer,'b',1000);
-   
+
    a = yaffs_open(aname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
    b = yaffs_open(bname, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-   
+
    printf(" %s %d %s %d\n",aname,a,bname,b);
-  
+
    x = 0;
-   
+
    for(j = 0; j < iters; j++)
    {
                yaffs_lseek(a,0,SEEK_END);
 
-               
+
                for(i = 0; i <20000; i++)
                {
                   //r =        yaffs_lseek(b,i,SEEK_SET);
                        //r = yaffs_write(b,bbuffer,1000);
-                       
+
                        if(!(x%20))
                        {
                                // shrink
                                int syz = yaffs_lseek(a,0,SEEK_END);
-                               
+
                                while(syz > 4000)
                                {
-                               
+
                                        syz -= 2050;
                                        if(syz < 0) syz = 0;
                                        yaffs_ftruncate(a,syz);
                                        syz = yaffs_lseek(a,0,SEEK_END);
                                        printf("shrink to %d\n",syz);
                                }
-                               
-                               
+
+
                        }
                        else
                        {
@@ -1246,34 +1246,34 @@ int resize_stress_test_no_grow(const char *path,int iters)
                                r = yaffs_write(a,abuffer,1000);
                        }
                        x++;
-                       
-                                       
+
+
                }
                printf("file size is %lld\n",(long long)yaffs_lseek(a,0,SEEK_END));
 
    }
-   
+
    return 0;
-   
+
 }
 
 int directory_rename_test(void)
 {
        int r;
        yaffs_start_up();
-       
+
        yaffs_mount("/ram");
        yaffs_mkdir("/ram/a",0);
        yaffs_mkdir("/ram/a/b",0);
        yaffs_mkdir("/ram/c",0);
-       
+
        printf("\nDirectory look-up of /ram\n");
        dumpDir("/ram");
        dumpDir("/ram/a");
        dumpDir("/ram/a/b");
 
        printf("Do rename (should fail)\n");
-               
+
        r = yaffs_rename("/ram/a","/ram/a/b/d");
        printf("\nDirectory look-up of /ram\n");
        dumpDir("/ram");
@@ -1281,16 +1281,16 @@ int directory_rename_test(void)
        dumpDir("/ram/a/b");
 
        printf("Do rename (should not fail)\n");
-               
+
        r = yaffs_rename("/ram/c","/ram/a/b/d");
        printf("\nDirectory look-up of /ram\n");
        dumpDir("/ram");
        dumpDir("/ram/a");
        dumpDir("/ram/a/b");
-       
-       
+
+
        return 1;
-       
+
 }
 
 int cache_read_test(void)
@@ -1299,11 +1299,11 @@ int cache_read_test(void)
        int i;
        int sizeOfFiles = 500000;
        char buffer[100];
-       
+
        yaffs_start_up();
-       
+
        yaffs_mount("/boot");
-       
+
        make_a_file("/boot/a",'a',sizeOfFiles);
        make_a_file("/boot/b",'b',sizeOfFiles);
 
@@ -1319,11 +1319,11 @@ int cache_read_test(void)
                yaffs_read(b,buffer,i);
                yaffs_write(c,buffer,i);
        } while(sizeOfFiles > 0);
-       
-       
-       
+
+
+
        return 1;
-       
+
 }
 
 int cache_bypass_bug_test(void)
@@ -1331,46 +1331,46 @@ int cache_bypass_bug_test(void)
        // This test reporoduces a bug whereby YAFFS caching *was* buypassed
        // resulting in erroneous reads after writes.
        // This bug has been fixed.
-       
+
        int a;
        char buffer1[1000];
        char buffer2[1000];
-       
+
        memset(buffer1,0,sizeof(buffer1));
        memset(buffer2,0,sizeof(buffer2));
-               
+
        yaffs_start_up();
-       
+
        yaffs_mount("/boot");
-       
+
        // Create a file of 2000 bytes.
        make_a_file("/boot/a",'X',2000);
 
        a = yaffs_open("/boot/a",O_RDWR, S_IREAD | S_IWRITE);
-       
+
        // Write a short sequence to the file.
        // This will go into the cache.
        yaffs_lseek(a,0,SEEK_SET);
-       yaffs_write(a,"abcdefghijklmnopqrstuvwxyz",20); 
+       yaffs_write(a,"abcdefghijklmnopqrstuvwxyz",20);
 
        // Read a short sequence from the file.
        // This will come from the cache.
        yaffs_lseek(a,0,SEEK_SET);
-       yaffs_read(a,buffer1,30); 
+       yaffs_read(a,buffer1,30);
 
        // Read a page size sequence from the file.
        yaffs_lseek(a,0,SEEK_SET);
-       yaffs_read(a,buffer2,512); 
-       
+       yaffs_read(a,buffer2,512);
+
        printf("buffer 1 %s\n",buffer1);
        printf("buffer 2 %s\n",buffer2);
-       
+
        if(strncmp(buffer1,buffer2,20))
        {
                printf("Cache bypass bug detected!!!!!\n");
        }
-       
-       
+
+
        return 1;
 }
 
@@ -1378,13 +1378,13 @@ int cache_bypass_bug_test(void)
 int free_space_check(void)
 {
        int f;
-       
+
                yaffs_start_up();
                yaffs_mount("/boot");
            fill_disk("/boot/",2);
            f = yaffs_freespace("/boot");
-           
-           printf("%d free when disk full\n",f);           
+
+           printf("%d free when disk full\n",f);
            return 1;
 }
 
@@ -1401,21 +1401,21 @@ int truncate_test(void)
        yaffs_mount("/boot");
 
        yaffs_unlink("/boot/trunctest");
-       
+
        a = yaffs_open("/boot/trunctest", O_CREAT | O_TRUNC | O_RDWR,  S_IREAD | S_IWRITE);
-       
+
        yaffs_write(a,"abcdefghijklmnopqrstuvwzyz",26);
-       
+
        yaffs_ftruncate(a,3);
        l= yaffs_lseek(a,0,SEEK_END);
-       
+
        printf("truncated length is %d\n",l);
 
        yaffs_lseek(a,5,SEEK_SET);
        yaffs_write(a,"1",1);
 
        yaffs_lseek(a,0,SEEK_SET);
-       
+
        r = yaffs_read(a,y,10);
 
        printf("read %d bytes:",r);
@@ -1436,14 +1436,14 @@ void fill_disk_test(const char *mountpt)
 {
        int i;
        yaffs_start_up();
-       
+
        for(i = 0; i < 5; i++)
        {
                yaffs_mount(mountpt);
                fill_disk_and_delete(mountpt,100,i+1);
                yaffs_unmount(mountpt);
        }
-       
+
 }
 
 
@@ -1451,14 +1451,14 @@ void fill_files_test(const char *mountpt)
 {
        int i;
        yaffs_start_up();
-       
+
        for(i = 0; i < 5; i++)
        {
                yaffs_mount(mountpt);
                fill_files(mountpt,2,3,100);
                yaffs_unmount(mountpt);
        }
-       
+
 }
 
 void fill_empty_files_test(const char *mountpt)
@@ -1467,7 +1467,7 @@ void fill_empty_files_test(const char *mountpt)
        yaffs_start_up();
        char name[100];
        int result = 0;
-       
+
        int d,f;
 
        for(i = 0; i < 5; i++)
@@ -1477,7 +1477,7 @@ void fill_empty_files_test(const char *mountpt)
                        sprintf(name,"%s/%d",mountpt,d);
                        result= yaffs_mkdir(name,0);
                        printf("creating directory %s result %d\n",name,result);
-                       
+
                        for(f = 0; result >= 0 && f < 100; f++){
                                sprintf(name,"%s/%d/%d",mountpt,d,f);
                                result= yaffs_open(name,O_CREAT, 0);
@@ -1487,7 +1487,7 @@ void fill_empty_files_test(const char *mountpt)
                }
                yaffs_unmount(mountpt);
        }
-       
+
 }
 
 void long_name_test(const char *mountpt)
@@ -1497,44 +1497,44 @@ void long_name_test(const char *mountpt)
        char fullName[1000];
        char name[300];
        int result = 0;
-       
+
        int f;
-       
+
        // Make a 256 byte name
        memset(name,0,sizeof(name));
        for(i = 0; i < 256; i++)
                name[i] = '0' + i % 10;
-               
+
        sprintf(fullName,"%s/%s",mountpt,name);
 
        for(i = 0; i < 1; i++)
        {
                yaffs_mount(mountpt);
-               
+
                printf("Files at start\n");
                dumpDir(mountpt);
-               
+
                printf("Creating file %s\n",fullName);
-               
+
                f = yaffs_open(fullName,O_CREAT | O_RDWR,0);
                yaffs_close(f);
-               
+
                printf("Result %d\n",f);
-                       
+
                printf("Files\n");
                dumpDir(mountpt);
-               
+
                printf("Deleting %s\n",fullName);
                result = yaffs_unlink(fullName);
                printf("Result %d\n",result);
-               
+
                printf("Files\n");
-               
+
                dumpDir(mountpt);
-               
+
                yaffs_unmount(mountpt);
        }
-       
+
 }
 
 
@@ -1543,34 +1543,34 @@ void lookup_test(const char *mountpt)
        int i;
        int h;
        char a[100];
-       
+
 
        yaffs_DIR *d;
        yaffs_dirent *de;
 
        yaffs_start_up();
-       
+
        yaffs_mount(mountpt);
-                               
+
        d = yaffs_opendir(mountpt);
-       
+
        if(!d)
        {
                printf("opendir failed\n");
        }
        else
        {
-               
+
                for(i = 0; (de = yaffs_readdir(d)) != NULL; i++)
                {
                        printf("unlinking %s\n",de->d_name);
                        yaffs_unlink(de->d_name);
                }
-               
+
                printf("%d files deleted\n",i);
        }
-       
-       
+
+
        for(i = 0; i < 2000; i++){
        sprintf(a,"%s/%d",mountpt,i);
                h =  yaffs_open(a,O_CREAT | O_TRUNC | O_RDWR, 0);
@@ -1581,23 +1581,23 @@ void lookup_test(const char *mountpt)
        for(i = 0; (de = yaffs_readdir(d)) != NULL; i++)
        {
                printf("%d  %s\n",i,de->d_name);
-       }       
-       
+       }
+
        printf("%d files listed\n\n\n",i);
-       
+
        yaffs_rewinddir(d);
        yaffs_readdir(d);
        yaffs_readdir(d);
        yaffs_readdir(d);
-       
+
        for(i = 0; i < 2000; i++){
                sprintf(a,"%s/%d",mountpt,i);
                yaffs_unlink(a);
        }
-       
-               
+
+
        yaffs_unmount(mountpt);
-       
+
 }
 
 void link_test0(const char *mountpt)
@@ -1605,12 +1605,12 @@ void link_test0(const char *mountpt)
        char namea[300];
        char nameb[300];
        int result = 0;
-       
+
 
        yaffs_start_up();
        yaffs_mount(mountpt);
-       
-               
+
+
        sprintf(namea,"%s/a",mountpt);
        sprintf(nameb,"%s/b",mountpt);
 
@@ -1624,7 +1624,7 @@ void link_test0(const char *mountpt)
        yaffs_unlink(nameb);
        printf("b unlinked\n");
         dumpDir(mountpt);
-       
+
        result = yaffs_open(namea,O_CREAT| O_RDWR,0666);
         yaffs_close(result);
        printf("a created\n");
@@ -1655,18 +1655,18 @@ void link_test1(const char *mountpt)
        sprintf(a,"%s/aaa",mountpt);
        sprintf(b,"%s/bbb",mountpt);
        sprintf(c,"%s/ccc",mountpt);
-       
+
        yaffs_start_up();
-       
+
        yaffs_mount(mountpt);
-       
-       
+
+
        h = yaffs_open(a, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
        for(i = 0; i < 100; i++)
                yaffs_write(h,a,100);
-       
+
        yaffs_close(h);
-       
+
        yaffs_unlink(b);
        yaffs_unlink(c);
        yaffs_link(a,b);
@@ -1674,12 +1674,12 @@ void link_test1(const char *mountpt)
        yaffs_unlink(b);
        yaffs_unlink(c);
        yaffs_unlink(a);
-       
-       
+
+
        yaffs_unmount(mountpt);
        yaffs_mount(mountpt);
-       
-       printf("link test done\n");     
+
+       printf("link test done\n");
 }
 
 void handle_test(const char *mountpt)
@@ -1690,9 +1690,9 @@ void handle_test(const char *mountpt)
        char a[100];
 
        sprintf(a,"%s/aaa",mountpt);
-       
+
        yaffs_start_up();
-       
+
        yaffs_mount(mountpt);
 
         for(cycle = 0; cycle < 5; cycle++){
@@ -1703,13 +1703,13 @@ void handle_test(const char *mountpt)
        printf("%d  handle %d\n",i,h);
        i++;
        } while(h >= 0);
-       
+
        while(i >= -1) {
         yaffs_close(i);
         i--;
         }
         }
-       
+
        yaffs_unmount(mountpt);
 }
 
@@ -1718,41 +1718,41 @@ void freespace_test(const char *mountpt)
        int i;
        int h;
        char a[100];
-       
+
        int  f0;
        int f1;
        int f2;
        int f3;
        sprintf(a,"%s/aaa",mountpt);
-       
+
        yaffs_start_up();
-       
+
        yaffs_mount(mountpt);
-       
+
        f0 = yaffs_freespace(mountpt);
-       
+
        h = yaffs_open(a, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-       
+
        for(i = 0; i < 100; i++)
                yaffs_write(h,a,100);
-       
+
        yaffs_close(h);
-       
+
        f1 = yaffs_freespace(mountpt);
-       
+
        yaffs_unlink(a);
-       
+
        f2 = yaffs_freespace(mountpt);
-       
-               
+
+
        yaffs_unmount(mountpt);
        yaffs_mount(mountpt);
-       
+
        f3 = yaffs_freespace(mountpt);
-       
+
        printf("%d\n%d\n%d\n%d\n",f0, f1,f2,f3);
-       
-       
+
+
 }
 
 void simple_rw_test(const char *mountpt)
@@ -1760,49 +1760,49 @@ void simple_rw_test(const char *mountpt)
        int i;
        int h;
        char a[100];
-       
+
        int x;
        int result;
 
        sprintf(a,"%s/aaa",mountpt);
-       
+
        yaffs_start_up();
-       
+
        yaffs_mount(mountpt);
-       
+
        yaffs_unlink(a);
-       
+
        h = yaffs_open(a,O_CREAT| O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-       
+
        for(i = 100000;i < 200000; i++){
                result = yaffs_write(h,&i,sizeof(i));
-               
+
                if(result != 4)
                {
                        printf("write error\n");
                        exit(1);
                }
        }
-       
+
        //yaffs_close(h);
-       
+
        // h = yaffs_open(a,O_RDWR, S_IREAD | S_IWRITE);
-       
-       
+
+
        yaffs_lseek(h,0,SEEK_SET);
-       
+
        for(i = 100000; i < 200000; i++){
                result = yaffs_read(h,&x,sizeof(x));
-               
+
                if(result != 4 || x != i){
                        printf("read error %d %x %x\n",i,result,x);
                }
        }
-       
+
        printf("Simple rw test passed\n");
-       
-       
-       
+
+
+
 }
 
 
@@ -1810,30 +1810,30 @@ void scan_deleted_files_test(const char *mountpt)
 {
        char fn[100];
        char sub[100];
-       
+
        const char *p;
-       
+
        int i;
        int j;
        int k;
        int h;
-       
+
        sprintf(sub,"%s/sdir",mountpt);
        yaffs_start_up();
-       
+
        for(j = 0; j < 10; j++)
        {
                printf("\n\n>>>>>>> Run %d <<<<<<<<<<<<<\n\n",j);
                yaffs_mount(mountpt);
                yaffs_mkdir(sub,0);
-               
-               
+
+
                p = (j & 0) ? mountpt: sub;
-       
+
                for(i = 0; i < 100; i++)
                {
-                 sprintf(fn,"%s/%d",p,i);  
-                 
+                 sprintf(fn,"%s/%d",p,i);
+
                  if(i & 1)
                  {
                          h = yaffs_open(fn,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
@@ -1844,22 +1844,22 @@ void scan_deleted_files_test(const char *mountpt)
                  else
                        yaffs_mkdir(fn,0);
                }
-               
+
                for(i = 0; i < 10; i++)
                {
-                 sprintf(fn,"%s/%d",p,i);  
-                 if(i & 1) 
+                 sprintf(fn,"%s/%d",p,i);
+                 if(i & 1)
                        yaffs_unlink(fn);
                  else
                        yaffs_rmdir(fn);
-                 
+
                }
-                               
+
                yaffs_unmount(mountpt);
        }
-       
-       
-       
+
+
+
 
 }
 
@@ -1877,35 +1877,35 @@ void write_200k_file(const char *fn, const char *fdel, const char *fdel1)
    int h1;
    int i;
    int offs;
-   
+
    h1 = yaffs_open(fn, O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-   
+
    for(i = 0; i < 100000; i+= 10000)
    {
        write_10k(h1);
    }
-   
+
    offs = yaffs_lseek(h1,0,SEEK_CUR);
    if( offs != 100000)
    {
        printf("Could not write file\n");
    }
-   
+
    yaffs_unlink(fdel);
    for(i = 0; i < 100000; i+= 10000)
    {
        write_10k(h1);
    }
-   
+
    offs = yaffs_lseek(h1,0,SEEK_CUR);
    if( offs != 200000)
    {
        printf("Could not write file\n");
    }
-   
+
    yaffs_close(h1);
    yaffs_unlink(fdel1);
-   
+
 }
 
 
@@ -1916,9 +1916,9 @@ void verify_200k_file(const char *fn)
    char x[11];
    const char *s="0123456789";
    int errCount = 0;
-   
+
    h1 = yaffs_open(fn, O_RDONLY, 0);
-   
+
    for(i = 0; i < 200000 && errCount < 10; i+= 10)
    {
        yaffs_read(h1,x,10);
@@ -1930,9 +1930,9 @@ void verify_200k_file(const char *fn)
    }
    if(errCount >= 10)
        printf("Too many errors... aborted\n");
-      
-   yaffs_close(h1);       
-       
+
+   yaffs_close(h1);
+
 }
 
 
@@ -1942,23 +1942,23 @@ void check_resize_gc_bug(const char *mountpt)
        char a[30];
        char b[30];
        char c[30];
-       
+
        int i;
-       
+
        sprintf(a,"%s/a",mountpt);
        sprintf(b,"%s/b",mountpt);
        sprintf(c,"%s/c",mountpt);
-       
 
-       
-       
+
+
+
        yaffs_start_up();
        yaffs_mount(mountpt);
        yaffs_unlink(a);
        yaffs_unlink(b);
-       
+
        for(i = 0; i < 50; i++)
-       {  
+       {
           printf("A\n");write_200k_file(a,"",c);
           printf("B\n");verify_200k_file(a);
           printf("C\n");write_200k_file(b,a,c);
@@ -1968,7 +1968,7 @@ void check_resize_gc_bug(const char *mountpt)
           printf("E\n");verify_200k_file(a);
           printf("F\n");verify_200k_file(b);
        }
-               
+
 }
 
 
@@ -1976,51 +1976,51 @@ void multi_mount_test(const char *mountpt,int nmounts)
 {
 
        char a[30];
-       
+
        int i;
        int j;
-       
+
        sprintf(a,"%s/a",mountpt);
 
        yaffs_start_up();
-       
+
        for(i = 0; i < nmounts; i++){
                int h0;
                int h1;
                int len0;
                int len1;
-               
+
                static char xx[1000];
-               
+
                printf("############### Iteration %d   Start\n",i);
-               if(1 || i == 0 || i == 5) 
+               if(1 || i == 0 || i == 5)
                        yaffs_mount(mountpt);
 
                dump_directory_tree(mountpt);
-               
-               
+
+
                yaffs_mkdir(a,0);
-               
+
                sprintf(xx,"%s/0",a);
                h0 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
-               
+
                sprintf(xx,"%s/1",a);
                h1 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
 
-#if 0          
+#if 0
                for(j = 0; j < 200; j++){
                   yaffs_write(h0,xx,1000);
                   yaffs_write(h1,xx,1000);
                }
 #else
                while(yaffs_write(h0,xx,1000) > 0){
-                  
+
                   yaffs_write(h1,xx,1000);
                }
 #endif
                len0 = yaffs_lseek(h0,0,SEEK_END);
                len1 = yaffs_lseek(h1,0,SEEK_END);
-               
+
                yaffs_lseek(h0,0,SEEK_SET);
                yaffs_lseek(h1,0,SEEK_SET);
 
@@ -2028,12 +2028,12 @@ void multi_mount_test(const char *mountpt,int nmounts)
                   yaffs_read(h0,xx,1000);
                   yaffs_read(h1,xx,1000);
                }
-               
-               
+
+
        //      yaffs_truncate(h0,0);
                yaffs_close(h0);
                yaffs_close(h1);
-               
+
                printf("########### %d\n",i);
                dump_directory_tree(mountpt);
 
@@ -2047,7 +2047,7 @@ void small_mount_test(const char *mountpt,int nmounts)
 {
 
        char a[30];
-       
+
        int i;
        int j;
 
@@ -2056,46 +2056,46 @@ void small_mount_test(const char *mountpt,int nmounts)
        int len0;
        int len1;
        int nread;
-       
+
        sprintf(a,"%s/a",mountpt);
 
        yaffs_start_up();
-       
-       
-       
+
+
+
        for(i = 0; i < nmounts; i++){
-               
+
                static char xx[1000];
-               
+
                printf("############### Iteration %d   Start\n",i);
-               if(1 || i == 0 || i == 5) 
+               if(1 || i == 0 || i == 5)
                        yaffs_mount(mountpt);
 
                dump_directory_tree(mountpt);
-               
+
                yaffs_mkdir(a,0);
-               
+
                sprintf(xx,"%s/0",a);
                if(i ==0){
-               
+
                        h0 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
                        for(j = 0; j < 130; j++)
                                yaffs_write(h0,xx,1000);
                        yaffs_close(h0);
                }
-               
+
                h0 = yaffs_open(xx,O_RDONLY,0);
-               
+
                sprintf(xx,"%s/1",a);
                h1 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
-               
+
                while((nread = yaffs_read(h0,xx,1000)) > 0)
                        yaffs_write(h1,xx,nread);
-               
-               
+
+
                len0 = yaffs_lseek(h0,0,SEEK_END);
                len1 = yaffs_lseek(h1,0,SEEK_END);
-               
+
                yaffs_lseek(h0,0,SEEK_SET);
                yaffs_lseek(h1,0,SEEK_SET);
 
@@ -2103,10 +2103,10 @@ void small_mount_test(const char *mountpt,int nmounts)
                   yaffs_read(h0,xx,1000);
                   yaffs_read(h1,xx,1000);
                }
-               
+
                yaffs_close(h0);
                yaffs_close(h1);
-               
+
                printf("########### %d\n",i);
                dump_directory_tree(mountpt);
 
@@ -2128,42 +2128,42 @@ void small_overwrite_test(const char *mountpt,int nmounts)
        int h0;
        int h1;
 
-       
+
        sprintf(a,"%s/a",mountpt);
 
        yaffs_start_up();
-       
-       
-       
+
+
+
        for(i = 0; i < nmounts; i++){
-               
+
                static char xx[8000];
-               
+
                printf("############### Iteration %d   Start\n",i);
                if(1)
                        yaffs_mount(mountpt);
 
                dump_directory_tree(mountpt);
-               
+
                yaffs_mkdir(a,0);
-               
+
                sprintf(xx,"%s/0",a);
                h0 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
                sprintf(xx,"%s/1",a);
                h1 = yaffs_open(xx, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
-               
+
                for(j = 0; j < 1000000; j+=1000){
                        yaffs_ftruncate(h0,j);
                        yaffs_lseek(h0,j,SEEK_SET);
                        yaffs_write(h0,xx,7000);
                        yaffs_write(h1,xx,7000);
-                       
+
                        if(early_exit)
                                exit(0);
                }
-               
+
                yaffs_close(h0);
-               
+
                printf("########### %d\n",i);
                dump_directory_tree(mountpt);
 
@@ -2177,36 +2177,36 @@ void seek_overwrite_test(const char *mountpt,int nmounts)
 {
         static char xx[5000];
        char a[30];
-       
+
        int i;
        int j;
 
        int h0;
 
-       
+
        sprintf(a,"%s/f",mountpt);
 
        yaffs_start_up();
-       
+
        yaffs_mount(mountpt);
-       
-       
+
+
        for(i = 0; i < nmounts; i++){
-               
+
                h0 = yaffs_open(a, O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
-                       
+
                for(j = 0; j < 100000; j++){
                        yaffs_lseek(h0,0,SEEK_SET);
                        yaffs_write(h0,xx,5000);
                        yaffs_lseek(h0,0x100000,SEEK_SET);
                        yaffs_write(h0,xx,5000);
-                       
+
                        if(early_exit)
                                exit(0);
                }
-               
+
                yaffs_close(h0);
-               
+
        }
 }
 
@@ -2222,33 +2222,33 @@ void checkpoint_fill_test(const char *mountpt,int nmounts)
        char a[50];
        char b[50];
        char c[50];
-       
+
        int i;
        int j;
        int h;
-       
+
        sprintf(a,"%s/a",mountpt);
-       
 
-       
-       
+
+
+
        yaffs_start_up();
-       
+
        for(i = 0; i < nmounts; i++){
                printf("############### Iteration %d   Start\n",i);
                yaffs_mount(mountpt);
                dump_directory_tree(mountpt);
                yaffs_mkdir(a,0);
-               
+
                sprintf(b,"%s/zz",a);
-               
+
                h = yaffs_open(b,O_CREAT | O_RDWR,S_IREAD |S_IWRITE);
-               
-               
+
+
                while(yaffs_write(h,c,50) == 50){}
-               
+
                yaffs_close(h);
-               
+
                for(j = 0; j < 2; j++){
                        printf("touch %d\n",j);
                        yaffs_touch(b);
@@ -2256,7 +2256,7 @@ void checkpoint_fill_test(const char *mountpt,int nmounts)
                        yaffs_mount(mountpt);
                }
 
-               dump_directory_tree(mountpt);           
+               dump_directory_tree(mountpt);
                yaffs_unmount(mountpt);
        }
 }
@@ -2275,7 +2275,7 @@ int make_file2(const char *name1, const char *name2,int syz)
                h1 = yaffs_open(name1,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
        if(name2)
                h2 = yaffs_open(name2,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
-       
+
        while(syz > 0 && n > 0){
                i = (syz > 2500) ? 2500 : syz;
                n = yaffs_write(h1,xx,i);
@@ -2299,12 +2299,12 @@ void checkpoint_upgrade_test(const char *mountpt,int nmounts)
        char d[50];
 
        int j;
-       
+
        sprintf(a,"%s/a",mountpt);
-       
 
-       
-       
+
+
+
        printf("Create start condition\n");
        yaffs_start_up();
        yaffs_mount(mountpt);
@@ -2315,20 +2315,20 @@ void checkpoint_upgrade_test(const char *mountpt,int nmounts)
        sprintf(d,"%s/aa",a);
        make_file2(d,NULL,500000000);
        dump_directory_tree(mountpt);
-       
+
        printf("Umount/mount attempt full\n");
        yaffs_unmount(mountpt);
-       
+
        yaffs_mount(mountpt);
-       
+
        printf("unlink small file\n");
        yaffs_unlink(c);
        dump_directory_tree(mountpt);
-               
+
        printf("Umount/mount attempt\n");
        yaffs_unmount(mountpt);
        yaffs_mount(mountpt);
-       
+
        for(j = 0; j < 500; j++){
                printf("***** touch %d\n",j);
                dump_directory_tree(mountpt);
@@ -2345,26 +2345,26 @@ void checkpoint_upgrade_test(const char *mountpt,int nmounts)
                yaffs_mount(mountpt);
        }
 }
-       
+
 void huge_array_test(const char *mountpt,int n)
 {
 
        char a[50];
 
-       
+
        int i;
        int space;
-       
+
        int fnum;
-       
+
        sprintf(a,"mount point %s",mountpt);
-       
 
-       
+
+
        yaffs_start_up();
 
        yaffs_mount(mountpt);
-       
+
        while(n>0){
                n--;
                fnum = 0;
@@ -2377,9 +2377,9 @@ void huge_array_test(const char *mountpt,int n)
                        printf("verifying file %s\n",a);
                        verify_file_of_size(a,10000000);
                }
-               
+
                printf("\n\n verification/deletion\n\n");
-               
+
                for(i = 0; i < fnum; i++){
                        sprintf(a,"%s/file%d",mountpt,i);
                        printf("verifying file %s\n",a);
@@ -2388,8 +2388,8 @@ void huge_array_test(const char *mountpt,int n)
                        yaffs_unlink(a);
                }
                printf("\n\n done \n\n");
-                       
-                  
+
+
        }
 }
 
@@ -2398,7 +2398,7 @@ void random_write(int h)
 {
        static char buffer[12000];
        int n;
-       
+
        n = random() & 0x1FFF;
        yaffs_write(h,buffer,n);
 }
@@ -2423,38 +2423,38 @@ void random_truncate(int h, char * name)
 }
 
 
-#define NSMALLFILES 10 
+#define NSMALLFILES 10
 void random_small_file_test(const char *mountpt,int iterations)
 {
 
        char a[NSMALLFILES][50];
 
-       
+
        int i;
        int n;
        int h[NSMALLFILES];
        int r;
-       
-       
+
+
        yaffs_start_up();
 
        yaffs_mount(mountpt);
-       
+
        for(i = 0; i < NSMALLFILES; i++){
                h[i]=-1;
                strcpy(a[i],"");
        }
-       
+
        for(n = 0; n < iterations; n++){
-                               
+
                for(i = 0; i < NSMALLFILES; i++) {
                        r = random();
-                       
+
                        if(strlen(a[i]) == 0){
                                sprintf(a[i],"%s/%dx%d",mountpt,n,i);
                                h[i] = yaffs_open(a[i],O_RDWR | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
                        }
-                       
+
                        if(h[i] < -1)
                                printf("Could not open yaffs file %d %d error %d\n",n,i,h[i]);
                        else {
@@ -2483,12 +2483,12 @@ void random_small_file_test(const char *mountpt,int iterations)
                                }
                        }
                }
-                  
+
        }
-       
+
        for(i = 0; i < NSMALLFILES; i++)
                yaffs_close(h[i]);
-               
+
        yaffs_unmount(mountpt);
 }
 
@@ -2496,9 +2496,9 @@ void rmdir_test(const char *mountpt)
 {
        char name[100];
        yaffs_start_up();
-       
+
        yaffs_mount(mountpt);
-       
+
        strcpy(name,mountpt);
        strcat(name,"/");
        strcat(name,"hello");
@@ -2549,6 +2549,50 @@ static void list_xattr(const char *path)
        printf("end\n");
 }
 
+void basic_utime_test(const char *mountpt)
+{
+       char name[100];
+       int h;
+       int result;
+       int val1;
+       struct yaffs_utimbuf utb;
+       struct yaffs_stat st;
+
+       yaffs_start_up();
+
+       yaffs_mount(mountpt);
+
+       strcpy(name,mountpt);
+       strcat(name,"/");
+       strcat(name,"xfile");
+
+       yaffs_unlink(name);
+
+       printf("created\n");
+       h = yaffs_open(name,O_CREAT | O_TRUNC | O_RDWR, S_IREAD | S_IWRITE);
+
+       yaffs_fstat(h,&st); printf(" times %u %u %u\n",st.yst_atime, st.yst_ctime, st.yst_mtime);
+
+       utb.actime = 1000;
+       utb.modtime = 2000;
+       result = yaffs_futime(h,&utb);
+       printf("futime to a 1000 m 2000 result %d\n",result);
+       yaffs_fstat(h,&st); printf(" times %u %u %u\n",st.yst_atime, st.yst_ctime, st.yst_mtime);
+
+
+       utb.actime = 5000;
+       utb.modtime = 8000;
+       result = yaffs_utime(name, &utb);
+       printf("utime to a 5000 m 8000 result %d\n",result);
+       yaffs_fstat(h,&st); printf(" times %u %u %u\n",st.yst_atime, st.yst_ctime, st.yst_mtime);
+
+       result = yaffs_utime(name, NULL);
+       printf("utime to NULL result %d\n",result);
+       yaffs_fstat(h,&st); printf(" times %u %u %u\n",st.yst_atime, st.yst_ctime, st.yst_mtime);
+
+
+}
+
 void basic_xattr_test(const char *mountpt)
 {
        char name[100];
@@ -2665,7 +2709,7 @@ void test_flash_traffic(const char *mountpt)
        yaffs_start_up();
 
        yaffs_mount(mountpt);
-       
+
        dev = yaffs_getdev(mountpt);
 
        strcpy(name0,mountpt);
@@ -2690,7 +2734,7 @@ void link_follow_test(const char *mountpt)
        char hn[100];
        int result;
        int h;
-       
+
        yaffs_trace_mask = 0;
 
        yaffs_start_up();
@@ -2700,7 +2744,7 @@ void link_follow_test(const char *mountpt)
        sprintf(fn,"%s/file",mountpt);
        sprintf(sn,"%s/sym",mountpt);
        sprintf(hn,"%s/hl-sym",mountpt);
-       
+
        h = yaffs_open(fn,O_CREAT| O_RDWR, S_IREAD | S_IWRITE);
        result = yaffs_close(h);
 
@@ -2718,23 +2762,23 @@ int main(int argc, char *argv[])
 {
        random_seed = time(NULL);
        //return long_test(argc,argv);
-       
+
        //return cache_read_test();
-       
+
        // resize_stress_test_no_grow("/flash/flash",20);
        //root_perm_remount("/flash/flash");
-       
+
        //huge_directory_test_on_path("/ram2k");
-       
+
         //yaffs_backward_scan_test("/flash/flash");
        // yaffs_device_flush_test("/flash/flash");
 
        //rename_over_test("//////////////////flash///////////////////yaffs1///////////");
-       
+
        //fill_empty_files_test("/yaffs2/");
        //resize_stress_test("/yaffs2");
        //overwrite_test("/yaffs2");
-       
+
        //long_name_test("/yaffs2");
        //link_test0("/yaffs2");
        //link_test1("yaffs2");
@@ -2752,7 +2796,7 @@ int main(int argc, char *argv[])
 
 
        // handle_test("yaffs2/");
-       
+
        //long_test_on_path("/ram2k");
        // long_test_on_path("/flash");
        //simple_rw_test("/flash/flash");
@@ -2760,23 +2804,24 @@ int main(int argc, char *argv[])
        // rename_over_test("/flash");
        //lookup_test("/flash");
        //freespace_test("/flash/flash");
-       
+
        //link_test("/flash/flash");
-       
+
        // cache_bypass_bug_test();
-       
+
         //free_space_check();
-        
+
         //check_resize_gc_bug("/flash");
-        
+
         //basic_xattr_test("/yaffs2");
         //big_xattr_test("/yaffs2");
 
         //null_name_test("yaffs2");
 
-        test_flash_traffic("yaffs2");
-        link_follow_test("/yaffs2");
+        //test_flash_traffic("yaffs2");
+        // link_follow_test("/yaffs2");
+        basic_utime_test("/yaffs2");
 
         return 0;
-       
+
 }
index 66ba93a778466d794b3dbc1876a18edecad946c8..267e1341bc0d3d09805a94adb94b6e5a89d65372 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 52f1e1114ffcb8f67e7a600022cf508a6fc0b574..836d1f7b97b263a6fcb561045371fb051d45d775 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -26,7 +26,6 @@ const char *yaffs_flashif2_c_version = "$Id: yaffs_fileem2k.c,v 1.24 2010-02-18
 #include "yaffs_guts.h"
 #include "yaffs_fileem2k.h"
 #include "yaffs_packedtags2.h"
-#include "yaffs_tagsvalidity.h"
 
 
 #include <sys/types.h>
@@ -407,7 +406,7 @@ int yflash2_ReadChunkWithTagsFromNAND(struct yaffs_dev *dev,int nand_chunk, u8 *
                /* Got to suck the tags out of the data area */
                if(!data) {
                        localData=1;
-                       data = yaffs_get_temp_buffer(dev,__LINE__);
+                       data = yaffs_get_temp_buffer(dev);
                }
 
                
@@ -428,7 +427,7 @@ int yflash2_ReadChunkWithTagsFromNAND(struct yaffs_dev *dev,int nand_chunk, u8 *
                        retval = YAFFS_FAIL;
                        
                if(localData)
-                       yaffs_release_temp_buffer(dev,data,__LINE__);
+                       yaffs_release_temp_buffer(dev, data);
 
 
 
@@ -460,14 +459,10 @@ int yflash2_ReadChunkWithTagsFromNAND(struct yaffs_dev *dev,int nand_chunk, u8 *
                                nread= read(h,tags,sizeof(struct yaffs_ext_tags));
                                if(nread != sizeof(struct yaffs_ext_tags))
                                         retval =  YAFFS_FAIL;
-                               if(yaffs_check_all_ff((u8 *)tags,sizeof(struct yaffs_ext_tags)))
-                               {
-                                       yaffs_init_tags(tags);
-                               }
+                               if(yaffs_check_all_ff((u8 *)tags, sizeof(struct yaffs_ext_tags)))
+                                       memset(tags, 0, sizeof(struct yaffs_ext_tags));
                                else
-                               {
                                        tags->chunk_used = 1;
-                               }
                        }
                        else
                        {
@@ -599,7 +594,7 @@ int yflash2_QueryNANDBlock(struct yaffs_dev *dev, int block_no, enum yaffs_block
        }
        else if(tags.chunk_used)
        {
-               *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+               *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
                *seq_number = tags.seq_number;
        }
        return YAFFS_OK;
index 2b6f6e9be66a4a6c1847a2cd29385e47f4f13030..e2e8dc38027a8a95a5ca6d6ca3621e5a12454ffd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 5394f0ede224d9bbb1907434e2177f77e18d38f2..98008b505bd8a53ec34b33bc9fbb79b79188e5ed 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -161,12 +161,12 @@ int ynorif1_WriteChunkToNAND(struct yaffs_dev *dev,int nand_chunk,const u8 *data
          */
          
         if(sizeof(struct yaffs_spare) != 16)
-                YBUG();
+                BUG();
         
         if(data && spare)
         {
                 if(spare->page_status != 0xff)
-                        YBUG();
+                        BUG();
                 /* Write a pre-marker */
                 memset(&tmpSpare,0xff,sizeof(tmpSpare));
                 tmpSpare.page_status = YNOR_PREMARKER;
@@ -196,7 +196,7 @@ int ynorif1_WriteChunkToNAND(struct yaffs_dev *dev,int nand_chunk,const u8 *data
                 ynorif1_FlashWrite32(spareAddr,(u32 *)&tmpSpare,16/ 4);
         }
         else {
-                YBUG();
+                BUG();
         }
         
 
index 71cb51f27df008c42934071fd7696d23f0018c7b..72952b4d8f0a529a50ef58f6217aa71a40284b1a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 6e8870b1780dc52aa669ef54cffe8b66e8783ccf..885fb8090a600bfbb56384ea59cafd225aa18c2e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -75,7 +75,7 @@ void yaffsfs_LockInit(void)
 
 u32 yaffsfs_CurrentTime(void)
 {
-       return 0;
+       return time(NULL);
 }
 
 
@@ -83,7 +83,7 @@ static int yaffs_kill_alloc = 0;
 static size_t total_malloced = 0;
 static size_t malloc_limit = 0 & 6000000;
 
-void *yaffs_malloc(size_t size)
+void *yaffsfs_malloc(size_t size)
 {
        void * this;
        if(yaffs_kill_alloc)
@@ -97,7 +97,7 @@ void *yaffs_malloc(size_t size)
        return this;
 }
 
-void yaffs_free(void *ptr)
+void yaffsfs_free(void *ptr)
 {
        free(ptr);
 }
index 5d389b973f5a57c9ef9f57d67552646b255b1e5d..bea5cfb8beaceb81f2bd35d7256390adc89dcab0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 1749c5877634a655ce06dbce7e43d96b7dc0dbdb..f0f431b6a91a2043142418657322b3c71e8169b5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index e86760b8111bd9d99fd3bc861544300cec9f51b1..5bd0affbc742c026414da433f409859f7d7fcf2e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -351,7 +351,7 @@ int nandemul2k_QueryNANDBlock(struct yaffs_dev *dev, int block_no, enum yaffs_bl
        }
        else if(tags.chunk_used)
        {
-               *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+               *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
                *seq_number = tags.seq_number;
        }
        return YAFFS_OK;
index ce86587a824c8d11bcbdacaffccfb1b8c28d1ad2..bc277e346d8c6394c0d9028af3a20618a1a7a02c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index f83aad11e69ad789879193823c9ded641de5aa71..441ee05fe6a7839ae450042c853d955be80f4048 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 5add1e686dd9c249e83a524a4f01628520dbcfe7..06ae645655048bafb710224cdad8f5ade4642702 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 39651011f175638eb35e768015b92537ade6530b..36bfa625ca346b91e29d186aebc736ae2e527470 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index ca5bdf17f3b0c27dafc86d1e06ac9befc09b2ae2..6b1193fc5460ec1ed0e9d227c51a4d35da49a589 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 1fbf5fe215f02958e16d47f52cb1ffde3eb852a2..baa31b1e52588f74b8c9d64ccb5759fed342b517 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index b27b69f8d7981faef43f073eecaa2e21aa5e897b..3e5707003840aebeb5dd52658353ac2d914f5329 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 4a541856e40e071f814026ef7407f74c8c59a083..e0b10e783313cb7d279581fa7249c9acd4c713dc 100644 (file)
@@ -34,9 +34,10 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
                 yaffs_nandif.o yaffs_attribs.o \
                 yaffsfs.o  yaffs_ecc.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
-                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
                 yaffs_checkptrw.o  yaffs_qsort.o\
                 yaffs_nameval.o \
+                yaffs_summary.o \
                 yaffs_allocator.o \
                 yaffs_norif1.o  ynorsim.o \
                 yaffs_bitmap.o \
@@ -52,7 +53,8 @@ YAFFSLIBOBJS  = $(COMMONTESTOBJS) yaffs_python_helper.o
 YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h  \
           yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h  \
-          yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+          yaffs_checkptrw.h yaffs_checkptrw.c \
+          yaffs_summary.c yaffs_summary.h \
           yaffs_nameval.c yaffs_nameval.h yaffs_attribs.h \
           yaffs_trace.h \
           yaffs_allocator.c yaffs_allocator.h \
index 155e770036410c190bc943d57c7e4e3ed3b596b5..68fc95c8306252902ccb0b65a616756fb264c7ab 100644 (file)
@@ -30,12 +30,12 @@ def yaffs_ls(dname):
             isDir  = True if st.st_mode & 0x4000 else False
 
             if isFile :
-                print "File ",se.d_ino, hex(perms), st.st_size, fullname
+                print "File ",se.d_ino, hex(perms), st.st_size, fullname, " times ", st.yst_atime, st.yst_ctime, st.yst_mtime
             elif isDir :
-                print "Dir  ",se.d_ino, hex(perms), fullname
+                print "Dir  ",se.d_ino, hex(perms), fullname, " times ", st.yst_atime, st.yst_ctime, st.yst_mtime
                 yaffs_ls(fullname)
             else :
-               print "Other (",hex(st.st_mode),") ",se.d_ino, hex(perms), fullname
+               print "Other (",hex(st.st_mode),") ",se.d_ino, hex(perms), fullname, " times ", st.yst_atime, st.yst_ctime, st.yst_mtime
 
             sep = yaffs_readdir(dc)
         yaffs_closedir(dc)
@@ -96,4 +96,3 @@ h = yaffs_open(root+"/dd/111",66,0666)
 yaffs_close(h)
 
 yaffs_ls(root)
-
index 333ad586d6c2f846a04b2dee021266928f34f0d2..e473bb3295c09ec12802b7f8098e80c62de9aed6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 1da25fd9702f6f9a8b26f8159d56176aabfefd42..79b6adb24a0f4ebc1f937a1289a2bd847262f751 100644 (file)
@@ -171,21 +171,21 @@ class yaffs_dirent_struct(Structure):
 #yaffs_DIR *yaffs_opendir(const YCHAR *dirname) ;
 yaffs_opendir = ylib.yaffs_opendir
 yaffs_opendir.argtypes = [c_char_p]
-yaffs_opendir.restype = c_int
+yaffs_opendir.restype = c_void_p
 
 #struct yaffs_dirent *yaffs_readdir(yaffs_DIR *dirp) ;
 yaffs_readdir= ylib.yaffs_readdir
-yaffs_readdir.argtypes=[c_int]
+yaffs_readdir.argtypes=[c_void_p]
 yaffs_readdir.restype=POINTER(yaffs_dirent_struct)
 
 #void yaffs_rewinddir(yaffs_DIR *dirp) ;
 yaffs_rewinddir = ylib.yaffs_rewinddir
-yaffs_rewinddir.argtypes = [c_int]
-yaffs_rewinddir.restype = c_int ###### Should be void
+yaffs_rewinddir.argtypes = [c_void_p]
+yaffs_rewinddir.restype = None # void
 
 #int yaffs_closedir(yaffs_DIR *dirp) ;
 yaffs_closedir = ylib.yaffs_closedir
-yaffs_closedir.argtypes = [c_int]
+yaffs_closedir.argtypes = [c_void_p]
 yaffs_closedir.restype = c_int
 
 
index 00db67d715ebf16f4c113cd034ec37723b3c10cd..1389552b54f55fcd46e96da7b703557d059f431e 100644 (file)
@@ -33,7 +33,7 @@ CFLAGS +=    -Wextra -Wpointer-arith
 COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
                 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
-                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
                 yaffs_checkptrw.o  yaffs_qsort.o\
                 yaffs_nameval.o yaffs_attribs.o \
                 yaffs_norif1.o  ynorsim.o nor_stress.o yaffs_fsx.o \
@@ -41,7 +41,8 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
                 yaffs_bitmap.o \
                 yaffs_yaffs1.o \
                 yaffs_yaffs2.o \
-                yaffs_verify.o
+                yaffs_verify.o \
+                yaffs_summary.o
 
 #               yaffs_checkptrwtest.o\
 
@@ -53,14 +54,15 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS))
 YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h  \
           yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
-          yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+          yaffs_checkptrw.h yaffs_checkptrw.c \
           yaffs_nameval.c yaffs_nameval.h \
           yaffs_trace.h yaffs_attribs.h \
           yaffs_allocator.c yaffs_allocator.h \
           yaffs_yaffs1.c yaffs_yaffs1.h \
           yaffs_yaffs2.c yaffs_yaffs2.h \
           yaffs_bitmap.c yaffs_bitmap.h \
-          yaffs_verify.c yaffs_verify.h
+          yaffs_verify.c yaffs_verify.h \
+          yaffs_summary.c yaffs_summary.h
 
 YAFFSDIRECTSYMLINKS =  yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
                       yaffsfs.h yaffs_osglue.h ydirectenv.h \
index 2eedbfa7c750458ae49dd2c5430823cb39b3966c..9eaeefb897293eb2811ba27b6ff334a7cd9a5bd8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 730bd4353c088255a8443867c53bc17bbc37fbff..e62095d785e59e71dd1ac07d157a6aa7be13d3a5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 69c335d067fdba0898871e6dbd38562a89210a00..e7081b24cb239cbfde41fbe541b971ce466e3362 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index b35c75025a821a99191b6593abc42553a4a9d770..5df17f84eca00f0dd14e22a731f6a523600cb017 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 672a33fb2e4bd4c51e5b662acb01f4bb6be6efd3..6e774abdc8f47defd122e73221fe18a99e4fbe60 100644 (file)
@@ -29,10 +29,24 @@ CFLAGS +=    -Wextra -Wpointer-arith
 #CFLAGS+=   -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
 #CFLAGS+=   -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
 
+COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
+                yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
+                yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
+                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
+                yaffs_checkptrw.o  yaffs_qsort.o\
+                yaffs_nameval.o yaffs_attribs.o \
+                yaffs_norif1.o  ynorsim.o  \
+                yaffs_allocator.o \
+                yaffs_bitmap.o \
+                yaffs_yaffs1.o \
+                yaffs_yaffs2.o \
+                yaffs_verify.o
+
 
-COMMONTESTOBJS = yaffscfg2k.o yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
+SSCOMMONTESTOBJS = yaffscfg2k.o yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
-                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
+                yaffs_attribs.o yaffs_allocator.o \
                 yaffs_checkptrw.o  yaffs_qsort.o\
                 yaffs_nameval.o \
                 yaffs_norif1.o  ynorsim.o   \
@@ -49,12 +63,12 @@ YAFFSTESTOBJS  = $(COMMONTESTOBJS) yaffs_tester.o message_buffer.o error_handler
 
 ALLOBJS = $(sort $(YAFFSTESTOBJS))
 
-YAFFSSYMLINKS = devextras.h yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffsinterface.h yportenv.h yaffs_tagscompat.c yaffs_tagscompat.h \
-          yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h  yaffs_nandemul2k.h \
-          yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h yaffs_list.h \
-          yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
+          yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h  \
+          yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
+          yaffs_checkptrw.h yaffs_checkptrw.c \
           yaffs_nameval.c yaffs_nameval.h \
-          yaffs_qsort.c yaffs_qsort.h yaffs_trace.h \
+          yaffs_trace.h yaffs_attribs.h \
           yaffs_allocator.c yaffs_allocator.h \
           yaffs_yaffs1.c yaffs_yaffs1.h \
           yaffs_yaffs2.c yaffs_yaffs2.h \
@@ -62,15 +76,18 @@ YAFFSSYMLINKS = devextras.h yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h ya
           yaffs_verify.c yaffs_verify.h
 
 YAFFSDIRECTSYMLINKS =  yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
-                      yaffsfs.h yaffs_malloc.h ydirectenv.h \
-                      yaffs_flashif.c yaffscfg.h \
-                      yaffs_nandif.c yaffs_nandif.h
+                      yaffsfs.h yaffs_osglue.h ydirectenv.h \
+                      yaffs_flashif.c yaffscfg.h yaffs_qsort.c \
+                      yaffs_nandemul2k.h yaffs_list.h \
+                      yaffs_attribs.c \
+                      yaffs_nandif.c yaffs_nandif.h yportenv.h \
+                      yaffs_hweight.c yaffs_hweight.h
 
 
 DIRECTEXTRASYMLINKS =  yaffscfg2k.c yaffs_fileem2k.c yaffs_fileem2k.h\
                        yaffs_fileem.c yaffs_norif1.c yaffs_norif1.h \
                        yaffs_ramdisk.c yaffs_ramdisk.h yaffs_ramem2k.c \
-                       ynorsim.h ynorsim.c
+                       ynorsim.h ynorsim.c yaffs_osglue.c
 
 SYMLINKS = $(YAFFSSYMLINKS) $(YAFFSDIRECTSYMLINKS) $(DIRECTEXTRASYMLINKS)
 #all: directtest2k boottest
index 1dd272918e27ddfc0e31a371e52518e7f119762b..a9152f3a2dc1c7c301fe6e3db7b6934428fb479d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c07fdffb18a87a046e94cdfebb9276df750cda8c..979f02062223c46b2957b8f23155ddbb3936f105 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1ff21e096e01594be7e3af9713c6dc4b4d45ee41..adefbf8fd4f16141828d2f006576ed4bcec5a05a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2f7984f63ec713f3516df7bbe89b11e8fbb3c9cb..55f9e10a323fbda2b1f2b67ce60aa28d45cbb8a4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 68353d0e00e9e88ddc94c6abc671a0c27f62d3b4..65d2d174479756fe4e00a8e0b90d84d29806a592 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 626609c09a5571260523b918122229c06f486e94..a703175f26b1b77f637a46ef0c73187a510b9f36 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6ad275c599f275d20e3502c1a438e2a94ae661a4..8ca9c1d3deedc18d01de3ba1f9e5262996ac798a 100644 (file)
@@ -33,7 +33,7 @@ CFLAGS +=    -Wextra -Wpointer-arith
 COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
                 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
-                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
                 yaffs_checkptrw.o  yaffs_qsort.o\
                 yaffs_nameval.o yaffs_attribs.o \
                 yaffs_norif1.o  ynorsim.o  \
@@ -59,7 +59,7 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS)) $(PYTHONOBJS)
 YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
           yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
-          yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+          yaffs_checkptrw.h yaffs_checkptrw.c \
           yaffs_nameval.c yaffs_nameval.h \
           yaffs_trace.h yaffs_attribs.h \
           yaffs_allocator.c yaffs_allocator.h \
index 6182abfb660723613dac99cd5ea033fc6c837a76..4d6e33dd205c7f73ed546b90554079e2e304eb5e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3ab251072bbbe5b98e1633cfd6e4ecca2479fa5e..dd7febe3d65287ab2f77d83be950692de86d10f6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8d74acf54c6d290e01730660988100c01cc00819..05e41f4e5526d4cd67502a864c60e131708b27ac 100644 (file)
@@ -33,7 +33,7 @@ CFLAGS +=    -Wextra -Wpointer-arith
 COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
                 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
-                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
                 yaffs_checkptrw.o  yaffs_qsort.o\
                 yaffs_nameval.o yaffs_attribs.o \
                 yaffs_norif1.o  ynorsim.o  \
@@ -63,7 +63,7 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS)) $(PYTHONOBJS)
 YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
           yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
-          yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+          yaffs_checkptrw.h yaffs_checkptrw.c \
           yaffs_nameval.c yaffs_nameval.h \
           yaffs_trace.h yaffs_attribs.h \
           yaffs_allocator.c yaffs_allocator.h \
index e21e77d35a09426de3524f6001adadc762bf3df5..079ed25e9a6dfe41d60fb4b0af3e7a15cb6b42ed 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 48adc94e113d9bab49de7e54847d5bd3771cfbde..0b33479afff2b5246e66a68279123a70e196d5f1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0f900390c4de70c1b3578321287a6d4e343a558e..871dc5678eaba9aa6d741e4ab8135215db402c9c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 40d3492e9b1e94ccb4fbdf080268451e2dd3e71a..6274934155622d61beb7c3843d4a0ca54e3af947 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8cdaacebaf200d25aeb88305a695448cfb3bdd78..94e8959213d2a8c0e6bec9a82df538f03629593a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 219c96d8871ef2f13b85cebece1132348a639874..7ef91d0fe0789d08e8c998472fa6de6b50081d74 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f22a57b505929b58fe79f9c593ce949872120ba6..575e7ae70b6de6fc60943a746fecd23c93b226ee 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index aac3bcdeaabdbb4f05b86d9b0203ef9feb432bfe..7572aa8ddc2c15654626c6ed1566a1348a675a84 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9714c19a68e43040ca8c2daeb85dd06c44ff4a31..b46c21133df294fd654660b70f1a6795b6736b09 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ceb29fa8414d93c757e4f8f94851ea3c6b6756cc..611fe7d5d49a727f312130a54fc8d3482eb4faa9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index aa9cd5bbf36be46ab30e761172a6ed56c611a25a..cd4e5f20ebdabafd24c3ed38011bebd8ccf2ff45 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 31b6c14b0e93de5080d59bdd0743dab651d9b86f..9d308336b4ae3bd01d8ceb0d50f6502c076d87d7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 87a824bf5c20374feacd859f96d44218e6fbd9d1..daeb8a4b26198bf18cf60c0499203a48e9706272 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f9e4224dc509dd5f21153ff52ac902761bbd9269..d64bd293fdf611900a11f7030771b9d5f0d1ecb9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 688d66e1593f03e0f74f13a271987bbd28c7b3a3..9e99590eba90ba35e6106dc0c666c5fbf5ea7f45 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cf19013d3f5c5f7c9d974bc8010a653d51329d4e..02517cb4f414924ac486cdc96b2e1815aa58cf93 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a6f149728d4be8232bc47effdba96acdc5bb0d48..6982e772975460612180e3824b84bb1d3e51b19a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4d1b88181697427a4f07398bfb68237145b2bbcb..cb8fdf269a50e02dde83b388c036bd53b673a1f7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a348003dce86158f734b0c6ab6d0c1c6a7550cc7..2820d680e893ef7733ac244a729807c25c641c94 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3d6220ee444d59e4a543eca6b60ec48cbca9b540..0332f6fd5c841a0ff3b82975f2cb9901054e8f69 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f798ce91c54d4b7a48bc23fc6b4bc57c2e023727..ef339c592d38ea4d9983fa9b83dcb3090b67d5c3 100644 (file)
@@ -33,7 +33,7 @@ CFLAGS +=    -Wextra -Wpointer-arith
 COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
                 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
-                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
                 yaffs_checkptrw.o  yaffs_qsort.o\
                 yaffs_nameval.o yaffs_attribs.o \
                 yaffs_norif1.o  ynorsim.o  \
@@ -120,7 +120,7 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS))
 YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
           yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
-          yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+          yaffs_checkptrw.h yaffs_checkptrw.c \
           yaffs_nameval.c yaffs_nameval.h \
           yaffs_trace.h yaffs_attribs.h \
           yaffs_allocator.c yaffs_allocator.h \
index e29764565337d63412b29e24768985b74c8930d8..50723c3e1e6efbb907f64e836757706e51479a4e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 72376b598778c89dd346f7df3e9e2ede49a94e6d..c7d67d28ebb095ea359be04a1da8154497c1a5f8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b2864a00b9a754a0e5f99c369bc07d07ffefa1ae..a3f6463304d3ec866645db8e413ee90fb8dd83ee 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 725ead233ee19cfcf55f3562bc304e9165185ef0..ed0d336dcbac30a19d8b4786c521f38a0256b011 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index da4f23e06f324a6e933114df4f68126bf753d085..1e516bc60d40525559bf488d1e449048c614e352 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9919498340b7eafea73e50a10f035154ab137af2..e4b4a198c27b0ced97d4ec51bbac6173918faa87 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8aaa35df9ef969d579c01e6de9d54a6414198422..1cbd0a60022cce21bc0965787e2863d35819ac00 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7cb624ba190f954d369425fc9401137619acb162..1c0864c87d76587c6d7f5b63e247b3e725127f6f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f8ba13a37717f2236a41a477e153db30e4a57aa5..f7b7e07f1543f45b7bb0fcf8f02486ee8bcd3d3f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 62fe9e2cdf063ec4ab53f286c1b634b5c1204fea..90768bb98b8502907017f4d7719695e2b6b552bf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8338cc48a47c68020b879ab6087ed101dd7c20d4..715e2360a8a9ea370bf21ffafb47db7b61843af9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 089aeab025dec01d59445305adc7bbbb2470fcae..cb2f71bc8bd15dcb9dd49a0954f30dba912e0a59 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9f574d78f184e739a1c98382edac8d1bd3330c9b..49fbbf09f8d46ea02d06cf0ad03ee7f0e96d95e1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 45e8e6da643eec09198e37ced284e909e5e567c0..096e95263b1cd30b5150425fc35e454ad9c9e909 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a233250b6a19df26e4b73ae495b579a1e62a63af..95bf32c32a16ff549a1168e76449db26e009bbfd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 40dc02795f7db1bc593fc31d392c2cf6ec62708b..f37ac2e0616fc27f063b0588d7cfe75246667e66 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3746886a1fbdd731548b153bf5b0ec00143dfa97..8e58b17fd2e3e74ddd31f5836a49a08c932d51b0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ed24f95b2f975100020e892a6d8f01b329c92b89..68361f05647ea307ebcf0e04b71105775680b30d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a436dbb2c95a5e0ae0a8cb9edd4ce5c86a0c2265..2015a65e542106b2f82ab2d7ede6ad6ecbb9bf04 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 41afd0947fb7c1a15b5792d660e200c93eefa980..b38f9eb8a2c2d97a2a51392fe0ba7dfce47e1f4c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2dda9151b9435b66402ade6fd6323900850d48ce..afd3e07c2ab9bc33627a5f9930cf1c8396a533d4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0f18c9007eea0891b0a1daaad4f5aeefc64fb7ec..917ab56db52dc7c91291fbc50db3aad0a6c66af6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5944ec190a04ea83bde4c5ba31a06ca4a4000ddd..056033783ef7a8bec627cb741b1f97e1e3b1d122 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ebf91fb3cd225247cccbfb0a71d963901be182e3..47a0dc453612f3104e5ba1fc853a0d3f386b7e11 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 71e76d033776d321df295099b198276ab8481168..5b1e8222a175be97ab2fed8a366f415f00ebc6f5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f9e2bf85c3be4734b7171f275998116d79e51789..cc3f93cd4ed2b214d64a5fdefc36576e232aefb0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 47646f34eed383779fce220752f9ff11a0354168..7259fcbdcf6818aaa28ab29393dfec53e8070324 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 11b3dc4bf1c1321302c6a13400ce7ddce4eb631b..2ec932f3c0343e33ce1695c798bca86d1570e3bf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 04e5f8bb125d2abc2891ef3afcd60425bb773ef8..df0205f3676cbc3592d5b983946aca19e562aaed 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ba3e5a5b7aeae1e930848c5635a35e29333613dd..b45db14bfca9fe1877cae8134ae2e8e464407bcc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ae62f544e0e0d11af40e8f3057f16050873e68d7..d60c451c4806de0eb80aaa63ae745d9fdbda8870 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3254f6206fcfb684946865f59632c8bfc054d00e..4cc5c860d275677524f5942f524d4d0c8e935618 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1df90c57c31ff7ac0b940a30ede4a73d018e65ec..bad59615f6165a57f886dc1d7e956c7efbb6f15e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f47f53c3277d788758341fc7ea112de8990ac08a..7ccaef2fbe524917a87b133eea77196846af5990 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9c7faa3ab1ffa6fa90593031aed6fe12ab39bec2..41e5aa4261c09ee4b750a2ede3fca016e4dc78b7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5d6686e01aac1188d1685062927b245ae046f572..5a5362b72f913c4c5182980f06c1febabcb2d7a9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d93148527aac752c919efa08fe6ff739767b2a00..1ea97e4b233f964adeea1a46b7e027d6377c61fe 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 16f28f0979f173b19c2ad039d199613272a8d899..33c1c20a9994fd895fe17495c9ee260c6185b30f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a070a8a58988eedaf3a240ad8f67129713216f5e..e29821d9f15daa4977c25a1330b7ad7b253fac58 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 583c8b1c88f5b939c3ce0eca02e5d4c083bbaa61..cd754cb93046225bba53f2f0619a04417a44236d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7915422b59235a1a376f348a5d794e3264e2caad..458731579885855d94331a2717824c004cb94a41 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 47c10c7088c8393fef45f73d022255098c8b3941..923ec3055314e1748bdb97445ed06064990695e4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 26e701c9d4f90c3fed673d5bbb60878334fea04c..fd8af69e4f2b14551711e565578363fa4cb410ae 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9b3f2d33150fd2592e08f26b54044ca90a95bb7e..53df16f725f0f4e4e44bb47b4611b49c98c13621 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 00da37b9237e692029c49bb55bc1a8bb890c66ae..339b34604f5fa4a24843fd47cc8bc9a125d2de3f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ec589e81493f235cdc22c92c1c1a705c720d929b..e18fd5f85081f5df99344c0e8afaeb610100126a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a058d98467a5f662da669021d004b0e30f5819c2..983323189535b25eca941ebe00b1d704e8993ce2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 68ca4f888a76502ba0faa9a559c7aaffd52be52c..2ca551b370ea5d2b48ab4c8f4ab34f2fa7d7f74c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 096f783e6bdf193d069eb19d347ae07fc13f3ee2..99e502183c44e6333b1d7a15b0b777f000bb743f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 901d2d2360c316a68bbb191f2c6e9f9be3cda859..8b3023c99b574411ec64e784f321af2e9991fb49 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 07ef59d87dc71b4edf5f404596d3a9b5af8d628c..2a0f63a62be856c45ac892b7ee4a33c7a175f5f9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 170203d6ffd30ff10b0241e49573c8a790f2b2f8..0bc50359860042fc7a14771713707ce9bd1f5c49 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f919744668cec629f63afb49d832fc4a422d1371..e0f5a99a94e13049fb3adce750f131219b5f56ff 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7cfc1f1d46c4aed9af7e986e19860220999c6027..4f1ad93a0a147caf875a6bce8fd7041b3d870701 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ff924be2d6ff8f7f9ffea12567d8773c060a3d10..e1a035688f870686e7d615e3a71ef4a28d91f168 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a040fed891b896d858261a0bbe53af8d490a1fa6..643893e4d8a90693cc3e3420e3ce7c3e4c03dbfe 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ce31a4cb336fbf493ee8fbe687fdbf687a6f0e07..faed470b2f16dcf1d70d29963c645c567365c274 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 14be155df60c79e7a476fc12dd6ff9f85b049799..c37d7c4791c9169ecb2093dc7ae612c08737c76a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 61bb7b4a9e1646ea9c75a601530de4d85622de6c..6ea6e60dd204dbd22846c8bc3fd3fcd3cc6268ed 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0c7e2dcd3d2f4247f33c7d08722c1fcbdeaf37be..4d018be7264d787d5b190441869057bb527d92d2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c3fcfea9d77f4d6933fb2093e7578d5167f1f009..250ebc68a716e924297d8bb4f0bebef7dc8be578 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d360f638bd4a5c4c0fedc12cf46cf07164088419..1c871df3d070bb80d8f2e3da29383327bc4d452b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2bc5005979466976b98afc9f8e1b9fd59f4e69d9..f96e0d2bd88df1ecf153057d25abddc054a5c3aa 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0197876591f361cad76e67f89f29f6f98eb01d81..3bd69a16fc5f029a669b5dcbf9fe38672b8319d2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7711d505bf284e3d1b0e1e018e83c7d57ac6c9e5..b272b8a5e6f37c79b93359de2758dab3f6de3d6c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 905e691039de0f44680f21aaf2a24ed45e7aeab5..179548dd102b14bd60c0fa80b5bf7df538d82653 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0e0786a91ad6210fa6be786efe8796545360708a..2c3089fecd03f9e0b7da3f5e7d1ebaed09d4b8b2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d562c5691b91b9c760599659db6fb9c0f1ef4b05..5dc15df1b5a49471c0228a35b863a3edc6911d14 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 98209040bbd9e72b914dc30d7989c17b622c9b13..bad5f0171772323b38c412d56227cce2329b89a3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 28ecb0061cbc0d9769b69da93b5ce9e0db8e1627..53580bb48a7f7154d417864a9374104c35e39a53 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 801d7a982fc29373c7cbf8641c22350e548fa0c8..1320ea4b31cc88c56be9159cfa345825f9e4adf5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5c2b8df54818fe07eef32ea93c8772cfb4dcfdbb..69bd343d0b29287d33f5466df9211935301b0174 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c2417fb030e593486e6ca5a57f34eb81d45000a3..c7380a6e6a90f5d2125ab7d2e83fa4c511f62679 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f1fcceab4a6e144e6d02f8cf67a82ffa7ef181a0..b22b4203b4bba0ba1d4f7a6afeb0949df78bd6fc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9daf090ffa1b79afc0ca7660ea4f6b99e0c02081..5cb6eceee29a0c9dc4377c968f1d8a3b677d104b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f88d00314b81b551b11314883f6a877800887208..fe10807282aade3943eeafe8b76e39cfedbc2b92 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e31af7f7516de28b43f4022b4791baccca30890d..41a74505880614fb3854c6ceb7a79d3506e7414e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b912a15e482857eb42849726f7837d751f2e2ce6..b948db748172b13755476c4c78ac5cb23962e7bf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8d714d82cb296069500517817172c8031864b382..bc141ded8b874d91da80f0ad7713fd4bab9edab8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8644be7454c4a6a034d755b17d35405a18eb46c2..91183ed70ce63b1c036d00dbdb61f72f7b86f433 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 29f3cd0e7ea7446049b695b3c4f134bd80dab091..5cee2475b5096de196842ffae19ffa944a4b2efd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 068664b387990f30f5404621c1a771d4b9d1cca3..b387dcf7418aff8d554be9f91119780df503ba79 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 40f2d359b9e7279c910721f6cb6cc9cb919163f6..c3cd19a1e6c41bf38b427e7681960439b67261f6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 11e4cbe494884f11228c50de0494bd6e8f91a1bb..4c1aab94f2e56dc73c3e373c41f2aa8300518aeb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index bac5471ab59b8e5d1a8c5735537173b7a749cd82..3451c549a192b638535c70f6764c2c57fa9672ce 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d50b50574fdc311e206a347c60a1b0aaf2b10e38..54b1f75c7196a5440de80e1ca89983b5426aa006 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index dfdc80d65ae3a43f288185b0e144b3e1c654be6a..c19ddea89f6ce8f642c974e6f24678451d1563b3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d4921f8e4831cc75e84f15c81dd7b2952e5df2c3..4c293b11652522494e638c414917f8aab89f063d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 546ebea2eed0195cc93ab7522a08f31e97dadab2..dace9f98e09316012d7e65807d8dabf12f82d025 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 453d8c289b343c2c2624dce531e3ab697038a6c4..f6b063ececc24f9c0d412be7373b709fae7c44f5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cff6ac14255e95d817bd80c0d7db91c4b9b8320a..cec8fec99bb60dfd4485dd8cafe49ad2b89f74d3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cbb9e0fc1b75b690ea9036dfbc299b085deda39c..bd12182623b7a70a78da46682b63d5e0f9a0a1a0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3f6e0c24e6deeed345ae89a7d6cdfff97d4ae1a3..ce10399e4a4d11f2d67bb2505a1438e52b9567ed 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index fb689bbaac1cebb5ecbdf91522dd06810f51f398..4661790a41bbf9f19b43851ca033bce1a3a8db32 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a4e3081d7ba6310aa7d07a81cad1e7e125e563c2..729fad1a6d2e93822d41f827ff1236e6a1e49723 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0e8ef42699d98abbae9a82ca1e5d9c4cc31cdec9..4d6c8a10ca6a1a037bd9245100d372e3e1542962 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cb380098be9c265f5df81ebb6822753b713f987c..6c570a5ef0ae182ba366f6587d355213cb2f3260 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9788997773926a9b6327c907a5ed90116acb082c..429e5df39d30bba76715b66791c8733bf243fc4e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1e09d6f1d5b44c3165bce76b415eca06e3848cae..d384b98eef54d5c3388904fc3eb61d240d13e23a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 895013c742de93b39909b44af51d77e0239ddd5f..db1b3c4c1b9b4bd40fce06e2be80c6fe43961c49 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 15096ead04a2a2a76c8e0f5e866395c12f21f0b1..31f5e08e78c55f54f7968d73cd7b107fee897791 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 49a5fd65df94295ca35605580f1c37635612690c..948d583c52376c332a7faf268975f1165f569f88 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1068bb89b65c6ac705cb203995e3ca32a4f76065..e7855b052100210bd2a33a33f09872eca51dfee5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 18ba18271a6292cc0686330e17a2b8614474cf10..d1120e349b9d1e2f038fc38c3b637af706387500 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index dcb25fa831614a08955dc200d6a3756e70689765..484447d544664e29e02ab11ed58419c0572218ba 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7ae00386c46668e3c8ac67331b64f8593d622167..afd5110bb2a8946215546343021e92f6556ba696 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7fe80f6c05c4580654c08c809622eb9c939c40bf..e9f75acde61bb3e3491f057ff9a574fcea019696 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8db7c7fc06072303db36dfcd749095bfd63c2da8..c7a5228c755a1413c785d75c448ea24eb935e195 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 36ae0d91ad6f7983769dec49e287ccc4665f4fc5..185aafe43acf4ed691825434370482de6a89d8ef 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 16e18584e1377b8c87629b7be47ab36ce09344af..e7d526bc1a01d1e8d69deba014b98244c8d62f35 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 432c6cee70ff5989c93ba05b2e716f1a67e423b2..1d999a866931bacb0a4902ff27622510ceedf61a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a0d91ac07f8fa823fad02fea575e0fcf5ed0aa13..b41da9030bf41ec22d409a7cb0d672f877a2dfc1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cc4c5c21a6239d226ddacf15dd99b74070c8ee64..1e3d1e6c3bfc0a4482f04030b7b6841b01ac4978 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 05dee0b49012ad50bdf5f6fa3fad2ff933b533a6..5fe35efe65c1918b30888b05530d2758fce754a0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5a88c40d28a07e2da52ab53a0b37099cf731bd53..7aa8aab1dfaff7eba633f7c1b62b496469a73d0b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ec6630f3f707db5e16e271c8cab629f79019fab2..0d3c508510cac0922e4d53a194f2a75831c00294 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 848c9b4ae467d82b32833e256eb5817fa22829d1..18a540b004f7ece8a246a3bef0074dc06b739e56 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index afb32a296d11d8284e103d8de17c358f69c1bf09..9772ed9a71909b347b5d4273d649bdffafdc36d5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 31c0900b19072c2b92dfe379d568876c94756934..388ea53638079569c31228904cc093327a93a61a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cfdb1303130cddf9467c6589eba90e4896e4d94d..d477fd1139933bcb8eda92b4e927efb99089206c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ed3ddb519880492e555ec37cd22b0a2586900104..816cebc62e38b2071a4ee4465255fdb1ba9c6813 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 271002da416ed8c8ea616931159d65a6c9fc830a..ce378c7e9610c3625d5cf34522e4d75c3b0f3430 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b7d917dcab3ddf9772b85cb0c3449e1698e64f5f..88ace93abd1ce7c6f4c84bf1855aee551d4381a0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 11e636ef854ca49631bdea72d29a69589f84cdc0..81fff9175145e0f207574aafbc7b82d2b4795fdc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4c109b1b8df3b10075cd6c0fd6a5311e91107b53..5c7f3e4e50a4b352b682280bda7798e87e8d5bb0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 56039013bab539e7894d12dcda40db7f14066574..6ec7eb0cce318aea4da24665c97b3afd78ecb3c0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 533f18d64a8d6ca28e7b3e9ffeb3327535df707a..43d0ad928bbaa1688f13254017606476d746aa1a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 39f712e4c48f4cdc3f8d0a6cd4041386c5095604..0d8a4adb9ca4762074a1b1e8920c7cc5e3ed70a1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2976178de618e1513be26edf28d7a4698da6ab45..3267f94c26a40ec23c01d98373813f27dd852b1c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5ea7a4fcc136d55f84f2da8ebcabad71aba1af64..16f18b65738bd85cccba45d8eec4b691ea583632 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c5aee184a924a230bcd2271a86429ee9579a4d6d..a04e796bc21b405204c4762506bf07f4ee36cb13 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 50813c39bc644ceb41ab0ec0ecfafa43e47adcfb..2972c0601896e6fb8eb32d9b92a9a06a3dd992f5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6bfad0891e2ae85dcb9ec4d0083cef4df765edf5..62c8065a51b47aed91aee83aa417465045b150f7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7b0b537ca59e3ef81b5553de83ff9a3e056c6348..a967eb86de41e1771ea400274a3fb34e52ced490 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5602f3cf369aa98bf11bbe20e7cceb4b147ad035..32d1e0b2d3bc7e0a827a9acdf6e747c541f2647c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index bafee352c41ae4cbcbc7f0233364e07531037700..0aadf96628c3f336645f7b5e78e09058a33c8379 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index bfbd48b0c22f8a8bb715b2cb35934f7d05f9de1c..da4abd6b1b195513be4b1d2bd4b8bd42df22215c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8ce4bcd7d78d0b0782eba5f1a761c43136fdd687..6ff4b9907a7c4890ed2a04c43ff3ffcec8675a48 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b0b5b735081deb668a127c83db25befa99029f34..6df0d2bb382a4a7eea542ceb18c24f1c7352212a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d8ff17c44d5f1799bfc658547ec2d23c37b989a1..4a43f026275143bb8b07d9b42c68f047def230e9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0f8530ddb1c039ae995d976563bcd7fc149c800c..bc0e6f2e87b2c15e84d94fb45b330cecfaea3a91 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index af10217bcca8f8b0ea5d7a847609bc8b858afd10..190f197ac565874e409a4e83ef62f78275838b03 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f102fdedf114cc64d475534a1edf0966ed4b499a..84ed1c39f0cad729ef2b98193f2774d2438d6af6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9854bae4e143e31c690257554152853372d6bef2..2c2855941743b2d683d8a3bcc0d5d5f43cd41441 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c6f4264e345944d0d862ab3f9e97ab7abccd14ed..29af47fc0b96b22a863e36c3908699354b5d55f7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6911c803a3fb6583e355094a986c6cce7baa619d..8cec748bd9c0642c7a5cb471d05647a9b167f457 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2d3a24479b1d441c6f0e4adc5eff9dee811d431d..a2503095e818fe8b786c33caddc8962aa6101895 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4dae8dca26ffa2a5bc6f3d83a0f5cc2fbf2bd738..25dc8f942c72e1f6b13d069a3bff54c8135fb9f9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6e83eb43abd66bc7b4e4ba688fbe8e2199ea5238..1612dae6b12bb715bfd9fe90873675be4fd6cb4d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ec1881b3cc81c4c4db323bf55c04185c4f3fc64f..081acca64def925bed3179d2596d7b13fe03e2c5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8e2c3e0ed308b317c79754baea502fd3e97f5965..a0f6add2d43bf87aa03f90f03137c350efc8c64c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d14af528a7d5469fe3624388427fd29b28ae9c58..6d1d488de1285a75c622e57054458260408c6bd6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1d1ecbddb3675ff6d42840f6c4725b11bf8cf82f..835d86aa4d3100aa6eda2ac45348e378736b40e2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b460df23c306ba2c05816dc48ecaf6c2c693935f..884a6de6a793024c5b30021cd1e0b6f0df2a9c06 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 466890c8b8f06a91cae30d650d7d72b7ed8de11d..80ea321aa8e988b26d6a93981782ea48a5d5b3e5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5b3baa6bd49940eda2d472290732c33efaf692ec..ac18311123724cd95cb6d5280af28a833a490d8a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 96083aeca8fed38e02a4b2a533ec7a448a77cbec..b6005801c9de9c5626a2dbaaa98c7acd7f547e8e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9a48599d445b1add8ffe7d21e6892417d6a6332f..d778594f9429f81395c23161a986b16d7521ce60 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8aec2e6f76db4689db2d3f87abf15e2f48cc2792..665ff9faa56b9b26d1b3b7746c17b9ec2ae87c2f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5db0c4665ebdbaa2dd918fcae056693b53311082..948a884f90987da5cd3dcfcd0132c7cce6f5771f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f5f41a7f1d9abe9cbc9adf2425b81d25f9b29323..a6b91bcca57b028981a1fcf8933cb2b78eabbccb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a5d4c9631ebca7b4335687fb9dabeba8493e58fd..f8d85f43587a585d0b595058856147d747f3f9de 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3427b23297e96a9898f73864d161083089132194..543775bd48110f653328c26dc8deec5aaf9f80c3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b59b454f481abd00a87b6d1bd3af9946700680c6..5e016d30932de8682042aa925742690948b8dc1e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b83594e266ef8fa1dfc22a9d9880bac97e59c247..2d94fa4d60753e8d267495332dc2a070f1c055ea 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9b5b3382b860d3e16064223c01bfefcd501f9a64..c1c7376b635275012724cca6a2d67dc00852e4ab 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a33a1d1086d4c2363929d51372792cae0e0df48d..9a4497982bf116448e4ee7179dabc709f26ae3a2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 816f7868dc092eb5f17088b676c9cb93a832dacc..0c11adfaa84ec244b997a7abab02eb0221d44c48 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index dba259eaa76695acf11ebb9d27e22a05a5ea4fbf..630b82d1bbf7c72e46e1818b7dde1044d993f571 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5b8528cda853ebf85ec71c2ca37eba2ec6e8990f..54961d68c8fbc10880838a051c994ab32ae86768 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 84cc3d181939677c2981c220271df44421bd4b3d..ee20c303ac66454931065df799585ff8aa9802f2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4be6ecd791b44128f019a5649df728f29d30a356..e454fc6fad5054f4fd507c4f1653b6fc8e8294ff 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f62623066b377f77b1fa758200c5f2e84bf9cab1..c417bb372d26e64f8bcd38241c552018e3f4972b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 570b40617685d8f823775c26a10c4a8e2aba1a8c..29a7a01b2a5346e29ebc482df82addfb919807b7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 70bbfaf326abd3409922f30e1165b8026e3973fb..f7dad34d47f63cbc89c6820acbb6f856cb864808 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 23ad51dfd2e7f7ef38248abe89a9abc414ab6229..b786e66db63ff2d26bb910ced8c046a42427a9b1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 57832a9ecdc53b0d07f7f983eb906478879f9a13..3fb5c516e7a4a00b3c81165e601e84a579226561 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0a84931b7df544639b78fc5d866a1f1de5e29315..81fe54d615ba5095cbb11210bbbde8258093feca 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 572ffe1600d1c85b9ab4673bc0c1c41ece1cfd0e..42f12ba2506adbd5469e41634bb6708bf91580e2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 57405c66a0ee92de0fa9df04061a0114d9bf9ac6..716ce3bc58075ca80e4dffa31e23c9b75f0da867 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8bf856d6e953e7dc4f55af5df1c249d1dd8105e9..d065b2e3a36f540011ed43713b2db85f13132dbc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4db43429265a8bc734cdc3c902e54e0b0fef0a08..e3540e829103af0c31a7fdab8c91445207fd333f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 92a1e743b21dc0317209dc206ff0a3ef2e9917ab..976474206334ca320b9010691c8e59b9d760a673 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index dfaec01b6aba1b0f0f275b3d0ccc2059ce1e841e..b4c2f877c3cb6033f38897de899ad90af06c717a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6f5a6738ee21311f15258aaab94765375b04cd0f..96804a13379c7c61b200a54dfe3c88243daf7ea7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 27fde7e57c4837219d7ee5313f03d1db50819045..c69b944c997dda9fb4f51898e7fe4e6cbe95639b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0b3630815e654d92f57540167f1af78a28e75bc7..e0d6b3233bffc51063ea398d64969096f707e8e4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7a914e4054c433ac52af3a7f46b5f02e1e9d2df7..26eb0d748799bc1a86ad0f89f6137672d7886547 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f073d2067145f98ef3454d5b018efbc5e143e317..c53a7b8edb80aeafcae62b283319e9343d54f9d8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 73522e8419187153202a17291d0a9ceeba0ae4c8..538cb09a688773267ac6218ecc2257e8ef362a77 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9fc6a2eccb5601b524af965791ff78adf4ad527a..cb73609efc701481d95114452cf1c2ad9b0bfff4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 010d8848e1de3b27e306378f59db8171b2119a16..aa8ee2a07b87b236fcd5d26fb021bd83282d0715 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index af7b7542aeccb61fa60249fdbde023286f45b830..52c88ad73ce7cdaa832374109efa2e869ed727f0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3fc83e09665f1bf053a9692c9e3a526c668a156b..9001c91dc90dbf599ac968f325ace42dc6ca94ab 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 04de1134bc2470b44880e963204c626180536fd8..c3d9a71957d43a9aebbb35d2db8dd00a5452856d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 83cc32af1710077fcb6f8e94ff4cfd4e7790f727..618b2cb39b8e4c4c93078836eb7472530e4a6e32 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5bcbf2b87d0f2b12f75c85a51a46cc8fd292595d..922f4312a566e057e35abfa2361792572ead026e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ebc2107a93ba6f076e431f96e6666a1044f230e4..2efa65d2f7c342b10af263ce5f5da56c4d2cf6d8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index fb596ca6c9843c63c9fcc58be63e568cba82e330..c1f6c90fd8ab71bd053acd577acf380f43205506 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2e02ad3f0c5d619f4c592b50df878f807927a2bf..58779b135f287c1ff31505925bb6cf30253d5caa 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a0d86e296b89a6640f7eed0729fc0dcf78e6a388..ddbbf191b0c35208e0714fbe5bf5f35b968c4612 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1531cbb3f3a8beaa247b1c892324f969d31528b5..71770f3c2962085cdf117665e95478517ba5f9bf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5d0a67052226af6ee3e92f7e101afd6cfb141105..3246a52fe0ca87b7a7148a755750edfa0dc61338 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index fac12d703728e34679f8f56b436d690372ee8560..9f985bb12974855287a417dd47a0ba4f5c8d1e1d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0a1380f3048764f976b81a4eb26c015c426a25e0..2c831bb983b39310707ead5746228eb25da13b1f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 60335a4a802a32d04ced13f2a73eadab8123e5ae..50cd3f61b822e92bea93728e23706ac227f0263f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0f44248a734f3493028f3c1f3c42c771fefd2526..0ce0312d146be7dbe929548327a8794434db7a7a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9ee2f5f3a6095734914d7cb67f89e448d7caf01e..4b0af38ff02fe889780baa9a904d9b8a26d529c6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 228f73614d0469a0101113570203fe7590afcf79..06d75819d09b6e868a91f55af8193d205d291948 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 852745286f855b45c2216f23eb6f78a851777828..b6e9d717431b5176bf36295b9ef3a7a10674fa5d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c3eba4a94431a5a08c7d9a47d6b96524bf314d57..b5a8dd71b8aaed1be85ed82601be8ad208d411fd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index abc576a83afee6733be379a848bda142dcec86da..f43e4d026fe30c67e778b8d3e9c69a79a278c236 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 098430809fb0050779200c498539fc6a470e7443..4ec6a7467fbfaa54c8c7b2cda0cdb8762b909109 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d611dd29aed0737a27914ea288d6cd2660682c75..6f8ef2d6da825ce3a733210f571a7589e5d09e05 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0773b7d18a9d2879dc91a30a41d9fca3a4cae0bf..981c79929c86bdd0e03e207d2a67b94ef3649a1b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index da822566d02e60fca9d75bfd3b71ff2f77475019..0fc304f9ae0f70f0ee6af7691ab5b932208f9279 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4e497cd85ac43b1899a3b5f0ac808c2a62e1af31..d076b5976cba477df734fae1adeeb5a6c9e00cfc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 28b9b0ba359a8e395e9ecb4815ac93ae3aeda49d..93fbf82b4636df236573ce1e81b4364c5d40fbee 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 98e3b3bab2f5bbb797db52c2bad4cd1ebe7e5a86..1bcf4034fccca8bab6147b13c8103d416b856e29 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index bc01b474310cd0caa6187cabe8062ff24c443cb5..2458a771a3b561ce50478aa270c1dac3f23edf0d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1ae921692f2b1ceeaae1193eda6eadf088e6f125..76447bc87cba2664a2d012904fd55cb31185d592 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d17f5b88618b04bc6c26a524c95094af1488dcb7..0fc055a031081297025750ca283defad4819f8ee 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 873f0127171a4d46f8112faefcd432e56c3afd20..101c458a4bd6bf68b7dbe3f94dd8fc5453c448c9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index df25d55b06574fefb8ad5502541b9d755ae1f07d..79b8d65384526a018d08805c727990a53a630cdd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1f89ee7b576b2cf0a9b474209fd4db75be11101d..53506b42f883046f048a72edfb410e58b158ccec 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b425da44cc7b0495d7ced9a8455c8d830b8fc1dd..a5ebd6b7688b9890a8bdb6549504023a1709d049 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6bde97cfe1652e9c21cc7289be55c0d0a91faa6d..b70551dbf86741f29c3716f13ff26da0b84d7f31 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f4b5b6731ac80535d796b427050bb6188bc24f42..30ee880054be2e7056b8ad44e947bd95546dfa30 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 813de5c9a15c2da121f1b721c7e60560b653dfe9..babe1abca0d213ba98fd9b8f92d6651014bdb708 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d37a5a1bfc1ca877f60cf0d66a321038aee02c24..435bea183bd1a70a3949e89f94f0003a612d4fe4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c9be564d32fd96f4c09f4e4ac3783c3f41f0d6fa..aea41fb84b7e0e284e3e38da7fcfd8fd0a54b5ff 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e5bf18e259aa32b2606cafa59d6f70c92e73f869..ae703ccf8a9bc745b98331ed46ee9cd194ff201e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e86f9239a71223d5f3bae3f8fa87f31254567f3a..d8797ea7a51b1f0b41146707785ef0321aca1661 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6772e7dffa8d6e924f8da87615222a622b46c585..83da84c93888aae6c3767df04d468d8f1ac98572 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index fbb37c1607a63dad76cdbedb97fafbba492747b2..1ebc4b12e1dcf12ee458ed9eb2df82a1c907c6f4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 75746953751491e28a8862ae4761d32182b63172..e870f4c283f3b1eb067f3b22c5d5aefc295571d6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 64dcfd75f39afb00e4ce51a4aade58a01db5cb71..276cb7caa43032b41a33a562f7966902900918eb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 00646fbf02f7831a92e3c65ab0c133ba8e30c1e7..c9e50a4a67e8384a0b7eeef41c28772944f537af 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index fbb37c1607a63dad76cdbedb97fafbba492747b2..1ebc4b12e1dcf12ee458ed9eb2df82a1c907c6f4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 75746953751491e28a8862ae4761d32182b63172..e870f4c283f3b1eb067f3b22c5d5aefc295571d6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cc55fb139d085fd439aeac2c29216bd058805a68..170081e70c6d46ed9f417d6c7e6fe1e7f75a83c4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 00f2fe4cdf0f483d1f25ea2d777bf929efa9a658..7fcc4db35a1dd90db176e4dc4e8388564980049e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 432be36c72c8bf6ee117e3fc9e75fd5331445a77..c5e2a261bc10f8b32893c147c4997fa1d00cf608 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9924d31b706773c2af1c44c219ad1291e41ea08c..9b1fa7435dc232fac037aa4d2ad3e8abe0022ddf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 716d7dcfff92bfe7a87c3f596ebca83f1591afc5..a430577a4552553898a9513c6afca373b965b7bc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c44b5c60229f8e31b057957d6e5d9d6bc479cfb5..cd76d403780f3431b5874bac8e590bdf4d0bd21f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 37eafa515bf6b17fd81fbf64c3bc0f0fd342f323..c6e8b88d3ecf7c79ef30d48982e18986d8f1f8eb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f1f1f7484e1f6d713f447a756a66147691040e85..fd6b2c63ec4e40504c3d16361d05a0a9ed0c0c59 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0c45302f3bed959248cf7052a412c69014bfbf9b..0d6c072869aaa40e4a9fca2ab822fe8aee66ce5a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 56d4ce319e04d5968dfca14c39fa6e3e55f4a289..4055b6ec4bd216183c1970c243de8b1397f583ef 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d3cfcc395c9613e3bbb8c5b7eb1d04d75ea366d7..24795908873997c42356f997b281460460f7e742 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8a1d9cedcff16b3e3d87ada5f91abda8e4722e92..0cd4d32cdb736ba3984571b39c361c647a4ea783 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 47570775deee69dfd9b6524c4e965ced65225a36..02568629f1c28f36e5a9a44d8b5fe2685882770e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1b00f66ea3e51b184032222a80e01c61830ea8aa..371fdff840393a9a5df8b6c6e787c6052706f6e5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d788d62555e94d713ace7d2ddbbddf0c4a2b6304..7252638792be14821ff557df67ceaff7e03e86f7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cdc99692fed2876acdd07fd97b91db345c88555d..c63a41fe0f5dc593665dff32e539cafa63cc9d15 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 851297fd3fc9a4f7d120465829c2a41854b3cea9..768a2d6c9ae7535ac98d8b7195d60f157e88d550 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cdabca45c4c28d017ad8c2a132aad91ba0fc78da..484b6f64fae7d664ea807f76f8cf713901996e3f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ea73a2f727caf43132118d94c896eadce254dc12..7977a9eaf577ce431f62f9a712db294b5d1e0ac2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2844f3269c5d886c4310f45728cc8e4025aec460..8738cb03142d1881fec6a639153215138f93f8f3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 998905a777347de940c9792e3a41e8463550e1a9..f173e3f14f803b20014dfc3914cda6c75b5da1fd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ce3cf90c6bf4d0355dd65f1334dbea642f4b8eb4..f4649bba5812a5fff8f0a9c020ce5a86446ceacf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d6eb84c7515cf02a5df1122642de72e9fdf9e0f3..70e3db7a495d84d9f9a146cec7ace8a52b24adeb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1b99f954211c16e7861b1d259af064df61bdcfa7..ac10f05ba16d1a2f3b02f8a749ea7de0b11b756e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 34852362099511cb93eb7a583b30fb3db61b4998..f86b705b7d685654f7a57382045eb0fae746a792 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ffdd09ddd92bd91c6f74bea45725b1e87ef4e7e7..9d19aa6ffb0c2618219b448b98cdf2526b38ffa7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9550cce7eb4cefb2aa786ae7d66e991e1ae030a8..a47e2c563d07a3e036f5f0160378c7afb0f7d34e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0cdb2564d7a6a53dd7b74506cd23f1f12988f57a..375a41df4c18f4180495898b8cf332a3b49f6ca4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9b15fa5f31aa1206b046a25321d22f8501cb2ead..9b37209fd835119c098a2faa92e130b1ed6d84e9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1b99f954211c16e7861b1d259af064df61bdcfa7..ac10f05ba16d1a2f3b02f8a749ea7de0b11b756e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cea18f0175ca5c9790ec4255e924123d235e9bad..b191dbb9d18839ec4febbcb0fa830e733ebfd9cb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b68bd5c77ef1596a0ad7cd83f43762311d9d8a7c..07cbec16cf990d87368c8afbf67ebdaaf0742783 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8954828fc06e4d08a33778add0dc4b479547a104..efc87d0f2405c031e10a5f4e284b4d1618632405 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a5c8136b888aa7993affa5bec341b730b1971091..57f8c42907a78b2e6d294ae65ddbed7c65d4db89 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2fd79820c8cad82dbac89c3593e3a3f9b43b1572..3775cc93ff4a26915355e987f5f5c9501dd9c3e5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e0445bc5e4a69ad695e35e4cce987fd40dea005c..036ca2a15a9c5703289486ce2ffeac92d4e2b68a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 14949a857127201032e7b4a5c8c08b98a4505bc1..738a56a74aad897a3068ce922488ee52f3ce40dc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0503c1767533468312d54c37a17adb8c49487069..88eb0119f9fec8c4c4eb8744281db4e196633b80 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d77930640391b3791bc7145226bdd35bc7a74553..3518ae26d2f2ab7f271cb21c5c7ccf69f30fe04b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7ab77aa66fe8915385f1617edbf37fe132d2f122..7508222aa839e3c1f8d254412e74b32e8a09c2ad 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 13c0ae08a01b4f2b78ce96e6d2632c1750bb4942..028b122b9132dfe4ca5afd435c72df4605ed7ae9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6b65c2dcd45555ca9d32c3863f668dda3104b8e5..a4a0e1fff74a05d19bd503d753e2d6a118da00ed 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a7942df80b67b15402b21dbee33fac141f7dc4cd..651995256a2c0daea90b111a932eb8390b0af99c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7ed43b8e83c6657443ee5956556721128ed8d039..b64958493cadbf3e6860e9e28c7ed91c25ad7d06 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1aec8575de1ec2c128fc52e625dc0ec7c934b3b0..f5d627184a6e156d8ca9597f00e331c717dd357c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1dd61360cb852f43f7835531c31273b0369faaa5..0e50000de4a1b35f98bd3ac7bf46ebbbfbb37643 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 413d08f77b83176262469b69bd88444702e3bca3..45f5685886f25a1f18291df17d45539a6ffda15f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a00f4dcd62d90a81eeaa3f9a43a574a73e9bcb68..2e2b6ac4dc44d5ad2d88bfa5b33041a8255be789 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 60b6ccadd0dcb4e6ee3db27bf706263a87997723..6b8c046a0d7fee12bee6d68f8d050520ca080a2a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2c1688ae9f3200c42e4539b0f15e8e5df72579bd..e388486b5832b4a58169470e39a9c84033ae1111 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 17e28e69420e4716b9ad21c14ded1598e047e5f5..ce467f618a5787a3add3d64e877d26e314ea1dd6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a09043566371226f6c047576cfb95c1f46e88c04..4d394f91745ab0b40ee6f0a489e3e002521d0ec8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7b092c8b5f8e3b1ffaac544fc24ed2783bfa4084..79f39974109f163a5811570b18eb17945c0c5e15 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8edd10be00b041f4efce43e57f7add88eb976cf3..b3fcfccd24f40858e7ee37aa452ba7d15413d10e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 838df1eaceb72b92030ed873bcca7d644f94c126..f3aa8f75a33bd475fcf4e35270539689905c53d3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e389483baa5dbd7370f963bdd16658948016695d..5e5b78b92bc71260d09e7485e8c11bb3c40f446d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ab83a8d1659b2b99b43934f1fa2a96b48a7f5c45..eee9adaf67458e90e1bd7dcdd3022b74cd8022ed 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2cef067da0fc078e1897c103c95141ebe07cf22f..05e173ba3ecfcf5a645c916b0e1bd6500a145c9c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e2a4ecac46d8b95eb7e2157f8a96fdd08c5be374..c4d9f35f1f70added6e09f53145c2473fd4c347d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ff40ea550de5bc38d6b54260ec1334880e788937..f0927cacd141d1b203cb1c3b7ce7631f7f8e6754 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 826a2d2f21cc264fdb9a22d51caf71d97a575b45..47ac8c6f846d28694e5c137fe5643ec050d40dae 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b4b0260afd74c03bd4a037b3aa2ac8da6b9b3b59..ab201d928913f57aaf8b3930a7c3c327b1c71157 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9a740b8e65bd5e701fcb3d9002cdb3c2ebf446f6..92938e21fe2ec7472463fe23f1399c38bf4484bc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a2f82096dc7fde7ba8480f52828e084beec39440..7fd4b23b71ce16e21df56fdef7ff101ad17bcfdd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1b4cce836fc665d39afcbbf86a2f6dfe2918b307..334cc615f1cddce984c96cb1e5c895ee8c742235 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ea5d58682038714644727acdb49e862aab399b53..35c438c16ef73470a52d9fce2d1162ec961f92fc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c4a59105b1214807eb3ab490303ceb83704b47ec..c6773d32b99ad7c3f260fe8d8e02f578f3cb86e0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c279f8f900262a2a6571c785bb596f2014797013..0973a8ee846fe5e3988cb81de7443d6b373d7ce6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e2f37b640d582b8bc6392778407ed7d838ac8748..3fb07cdbfef8bd3338601da28272aa09a607be9a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3f4e2fde08027ba58896cdb3360225d2e4e358fb..12f71b2c3452385810623fdfdb8576f1c5d330e1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ddebec1d3b56800de36adc51c5a63a5aaabb1de5..be7405721aaba4cd287443a18efa6284e33a4d19 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e41bfeb94d4e9af7b58dd71b7f3c88712c33618f..7a3dbc8038bb299de15e7bd2ac018af13d580e80 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 31f988002149cbd27d33d7d9afbbb863c3d3a79e..5eddb78b067456fe92cb1914947a0c5b6431f75e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 04359f7bffc62d07d0ce8c7cc7e4769acd9e728d..5a715405be61e2f81a61d159b9704b912bb6926e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 843d835256b9de9bdd911133de8679e65df1e438..69ff9d574d947beca4e51f492f0d9e5192871c7c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7b637168815ff38c12d222253e119af623598c52..ff3a3dc36296346887c549568917e4b728ea2750 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f4b007219b5ed5db181168e0e9a2dc33b1373fdb..91712387d3c04b951c506c9855309216d5fef61f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4d05ab235a1ec07f05b6dc1a0340bbd5309f33cc..777e74bd3ddad41a2a7781933fa49a9cc6666408 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 64129b16ed8f9309fad3855728ce625826e8a569..eac4e923ed29c923f6c5b0a5b83a5e8d26a292a3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b6dc53d23d865d9ace1bee582604868af1a18bba..f5574c5b3f8e4e132aa9307e110c190b3faadf12 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cd4b60a7612750cf336883e4e34d511466d13d9a..4be8df031305fb7645e451839b8535f1218fe53d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 963314004f7e4ff088f5712f0fb05211189ef518..2dee1a72de8aa407a8691e27b89544c8a9c64ff5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3844b0ef6d01e78f7a0a435b9623afb4579ca1e0..680f0aaab2c5b6473982abfc22bc6ed6ae35a0f3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e8f26eb4336da2f6aac289c3566c8ef2623d1176..684b01e2ea5b4b45936d0db85e471415a2256959 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 74a0b622f7f4a75a22724568657849f903fca83a..89627746239fc9e869bbeb079d7b30a5eba1098b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 428d365ae195118092c7e4936cb7b1dfc002ce5c..c8db976b65c0d43288a2d2402525685511e0191a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f7ab9ddd0643c3e62b259da2337370e8a2cb4bee..4aecb4457d418c25f3c1c9cecae286a72c1b89a4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 373436c105482e331fe365d148586bb608bc972e..ffb556459bced21268c3d5ae9e26d5cfceacd282 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d4b9d1ce1f5ed4332e926bf9a5375eaa6a7394bb..e4acc08c9235d21a10d579ff4187562d722b1c99 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 14a87b76298d3518adb75dda8d9c5486c12f4f01..8ccd1217a0cfcc40779bf3b2c2fdb537334d373c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 9f7b03ee503029687ed06d1003d19084d4fb0fed..df54fef9d35fa7456b449e84cb664a00b31a440c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 82a7c9c396c95e64c48a1626bc9ca60b9224f8a8..3cf2a86729a9288d6d48efa5c1367142093474a6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d8998362b1e838a541f02962b02b8e3ce9b13ea4..dce9acf5f495da018642ea6e670acfebec6099a9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1db71469b31de44d99ecd569b7905ef4182d50af..6efc43826cae7e4f7ffc74b6912727ca8dc02c6d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 90ae4a41bf63f324f7dd7f6adfd8f3185a74185b..f14005ef696065dea0e30ec31838f77ec326d128 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e3aec49819612a17cb7a8e13c13693904889d1d9..afa692fc831c163bf4bb4aeea95adf1bc4e1ada5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4497b7ce41128bebeef18be5a0ee9e8a3744333d..7b6e1cddba023747606a856dddc9ea2e6471de08 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 3db9760dffd604e3360974abac5664734de8e26a..eabe97c6453b25c5b5b85fee89d064d5e0ff283f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c8c35df2eb59541a96988d107ff2527aeaac175c..53caa55476d1594ee7db407082999702f23fc60e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 2fa1ad16d52980788c82b5187a24aea0a9ef5bcf..07358838c3be146860e643a0fb33b432df06f413 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c3e054b7910411aab413c651dbe49f9355c9f42a..aad9f46268d3faf424c9d727c46ee695695c0a16 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f2ec0af9d514c0e101a8409721154402b6403c90..968dc9940ad31213425d607fef2b2bf0013af441 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b4f0c52a0d6d5aa0a30d31a850c1c64d5adae6a0..6c3b1d76f11fcca0169c17bd4bf77a8b61593200 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4f64395f16e9e4ee348addb36a66087f65a9ea97..26f516c3230e03195b25e382b00f85a455c9dbfd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c31f389655f2e3003afa7fabc73572c53f7cc9bf..d95501ea600410b7d0ef668ac3fd78c6434cd3a1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 487ae8de4c87642965736d9130d72fa997a2d125..683354cdf3716de08ab6c9c27f6a7d81b5220706 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 359639d67957293e4fa86305f0755832f5339e4e..e77f3a9344b32561d93dcca2e8a0a4df59383e80 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6f82e1d2f8ddbe99fc45bfd936ad12f42b46a1ac..db127820ee488760d828951171948c6a48ac72dc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e4cd7f9e91f0d6cb90f5e5e480bac5adf50ab5d5..185e39d30496e02360cc48fe9a3592af9d22c0ca 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 94a304a67b8f3303140df9ed70a8afa1ac8e11ac..fa071f6eb29bd6a8cc38d6207462726a515264f2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 26c70a1bbbabc44924d64cf3c644110c19619bcd..6e6ef405828ce8b21c65ab7c2534e17cc9c1a136 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7a71a5e70957499e3b1ef0925f47d7e06dc07f0e..d7b84511317023c78a40488cfe28b331843834d3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b6bd10fc105d6ec0c851a7711f20ea3f59c7f712..d6000d9ee11064066d920d5c5ef48d87e606f21f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4e485ef1f5a194d757de9369c1ebe8d7ea3765e4..f39e822a05774cc40805a5d9286dd6744a0be15e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0b4bb01f6052743537af4726bb5a0a76484941c9..c7aa61e0a74aab50c5dd4a5b2f8305ff57f5d6eb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index fb7274b3759e7a07905d4e60a7b047a8d2f3345a..3ac429b6f1ebb3f1ab8845e639a869d899247810 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6f03a457eb198928c8c252929b01c98c73625fdb..098325e7d02a3cf053d1c71642f14ea349c690dc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 552aab68367d00e941a9f93a2b69423863efc2df..62bc182631f1a8c812da204c07e39abae2193cb3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cbd91daaa7592bd1279b036cc2fd8dfae109f8b5..998b14c16622f07eb638d4341dd780ffc8188d1d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index fd4ef7331ea1344848072c8022d90d84fe0cb265..eea78329332665b754f4667197d7dc02ee4a9193 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 21b2873c273eaaf1d12c59fb3466e919ce42f0e6..d1697d19e9dbb19d3a720ef3246ff2001049d28b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 07fe6a44ed7d5388ea315838c03dfd45db4a3210..897e89fe54c55a20fa41c47a7e6e06ebecbe1bb6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 67da0ad09be5113418999bbdbea31d82ff02bd3f..6696b06576368cda7fccc9d426203c501a8e4e61 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a2a7da9a0397984f9747ff3d6bae476e5308944a..582bde9a9351968527b74808deddd5cd9f46c8d1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0263ca1d6d16285e1824dc8c42f6f331d8aea46d..a2d010f646508deb91b98b7db8bcfbe6bde09247 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 24120d4fac0dee455fd773913b69041c24c6cbae..f5196255094b4c80b4e696b2bae46f465f473b7e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ae0662dd8a567ca4d4a8f5cd85a57ebc0f748b1c..2840a6737e4d57fcbf611394214a2737d49df0ae 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 45bde5158d18c690e76c2c51e0edad62d2aaffe2..6bb96cf45a7aa52d142c28a909849b5d12c80c3d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 95827e950cd66a17bfb0ef0351e008ff21e557a9..58fa590b139474b71c842cd4dccf4953c6196bc9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index bbc96b5f651b257cb5fbce39f7f417a7b498f8c3..72d2c37cc73e0c3dd0a8bd858bdd3dc4683964d7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7ec30cfe66b5d8fe4afe81bedfe1b2811310a527..4570db178437b19e0fad45f597a8e053f5a56ef0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 654673fa35975e29c7329e9d75deda30cea06e87..dfc5edeb1494130b6c48da78abd68371c230649e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4436da6ceaf209f7a3e142278cb3facfbb1cc3ed..f45b59592dede94e68d95cf67b3ea91574389768 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index bab34766ce78a61d831c30fc8138689a5f3c1361..fbff6782bb3a143832ca119452f3afc1583d3161 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ca5d6602c799039ab730009ad27a13613c42ebc9..37ddb0e8f7346b9728e156a48dead84253e6abb9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6d4b2c865e3291c943c709f7d6afc758cfb3a506..3d9681e2a5001b44f1ea7c70d613e856b8ea932a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f7d04e817a1ee04e6f2f9fc462d30a3498ae2c66..f0462770d2e15afd57b729b94b0e943ddeb3a2c7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a9802ac2961d5ea2ad15bfb0fea3b286c64ac960..5138ae2027e34e14a6b51ef6c80f732552451b16 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0515ab1556ed54458ed1366026a4ef601a1af760..64d9ee14a37c3cf9dbebc670d92a39490cfc495e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index dffaeb9c166250f9cdf9442241efcee4980956d8..712927c56b1a782444b7b65c254e300d6e8f2572 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 113b14840fd045734db81907d27dcfc248465139..9875304f6756b744df83b4a96d6c397522585a37 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1d419b8b5052777ab6eb2161ffb1fe2ed619167b..e5f13d436d680e32631bee2697873daee7c28d8f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b08989facef217ae4be0c90d4b574394eea4d056..c6085d2f988b2af66e393b9544c533b05c847c33 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a436614b59090c698a328be195f208e4182a565c..ee8112cddc41d9ebee6db97abe1f9ba77a68f65a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 78d9ceff9eb24e6a2f6e77898fd40c6398abbc36..e75d12164e96fb17692c3d2c6725503b332af1c7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a4c1565bbac8b116e5c72a1b9b6a1769eec1e022..ae7be8bb0099a4a1cd26acd38e8e8da0fe3b3a25 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f59dce0550b32ce5f14f02a98866c46658a29adf..7e1d602feaad6607b482162739e2a9b3ca27e525 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 0cc6ea2efc279825fc7b5510196ba595cddb72b6..9101e848c30a3499a8126a96a52b55e188e5b898 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 96bfcfa8421d3de1d48b10977e55b9a8b4c83b8a..29dea18e242ae72162c4ca914369213b13b204ab 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a2f97a56094b1c5d242e4d98e5ad730c8d93ae2e..75b8ea9bba47fa128b1c8ddc5e70b8c071648f69 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 811120611093f8b03498c5aef59f2a248f0cb4dc..3bcfcc32e5e3d71f5aa7f14aff3a0ea5a5ff74f6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a6e2ea57b16f54ad75a9aa094016eac3aaa8c06e..d9983fd9ec118b6ff91ef2f75ffea0245093e37a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d0b1408475803b4c82554c2f7ad8b29abbefa7b5..c3272fe2eb63c8f7194b7eef3502c6eca3d27d5e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index fc2e13b806f9deb28da92f920793ce7a16a9914d..3e5825e64853e8c6b85d454f9ce9dfc01ef38471 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index cafc508f4c4460613a0876b5a44f9db8593c12b1..ba51300b0f8b1d74780f986963fa27e5a97030eb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b698dff0d3060aaf9e12bf38e636ccb78b83ad97..15329f22145744388541f82ce401ef43801dd8d1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 4311438955e5ee4c33ca8c21c7f15f3698c4da2d..d492b89e85123717b9aaaf46cdf941036ceba568 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index dc2b1fa691786655e8d576d924a5b6518f7b74e8..32e16a4675a7072a5c860382299caa4ee437e95d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 982f2bdc04077a7e4cad9ef6fae3364213eac23d..e18c80388f2172c2d842d115079e9bc579a202ac 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e60f11762fee3fc82154f11d79b6eb4e38ca2f35..e36af09bf4ea6fd0161bdd08b913e989d6c629f9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index b7f7c128bf3eba4c12ee49479e59e33eb940acb8..5a20f88b9df3e55b60f5fae6d0a188fae58930c0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 75746953751491e28a8862ae4761d32182b63172..e870f4c283f3b1eb067f3b22c5d5aefc295571d6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 88c93dda7528fef5f07efbf5056f700eaf7a6090..d056fdefbcf71c77fa57ba367e5db0e98f5acaa6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c40b6a36ed989b7e03de5949a844b3df6ce0016a..2cdbf91784fbffdf20e79b7e4fe4408707284e8e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index ecceb2228025947488facf9dc005f80fe778b4e7..a76512f550b1b4762e1949b8ddee17794106bf0e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 557689f54e3984fb6ac05d06d712a5aa2f0af57d..a409eef24f12383bf2173d7ed8f01c8b225df1ca 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7472451905c21cbc9740db13336bac02eeced57a..74283a24552ac339eac75b7cc601ab5efc7f12ea 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 630ccbdb33ac04996bc17b0d7a12599fb25da379..21ea93b445d64a724bbe2be681a4112b4dd47a33 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5788bdeb478b441d5713447b57b637e597cdd7c4..9c318dd49cba5e9342f397fd68a2eb20d8bfeee3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f08866650c5876e5c34356e527b59f139d0e4d16..7178f4d74ca04971fcd6a340a8a66e09cc48bd85 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 6695ccadec0c2c8b2e97316af9b2d57955060dc3..166c52110e98deb6c4160b03caa06e0d85ba67ce 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 022d5d467d8771676a3643b8055e6a44b49616e0..bc079b2de143832a4bc3a2d66a424f3939137e1e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5ed718e0cd4298ce86bb788c93564780b0a27151..c1cb4ddc27c1b8cb1752fc3552c31e608b37f1e7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index db03ed65c5cc688ba4e3b15b40da39e88a70755f..facef12eb6e2d1bf08aefee0813e798f08fed8d3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f0071eaede6d022da8b9fa1dbc267a9604a1b10a..fed646c15837e5db79d299cca57e57cd0aa23c26 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index e66008ab21b8328c03590b38282ac70e85ee2cab..c0e7aa1124f7776319b216cce890681b05ec704d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index a17dd8944a63cc391e7e3ef09b1a7e56204d96d4..99994660cba9dae57ad7814e27c94ce3c562d273 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 1596e449ae066bbe9325f8492a5bf2c1d92d2550..20885276d611a02212cfd71de39cb9b32a59db5a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 8006b79b8c15dde8f7908e8c7fca7a1b24034724..e7334714d8f341192acf23fac598a79561e08013 100644 (file)
@@ -33,7 +33,7 @@ CFLAGS +=    -Wextra -Wpointer-arith
 COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
                 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
-                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_tagsvalidity.o yaffs_nand.o \
+                yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o \
                 yaffs_checkptrw.o  yaffs_qsort.o\
                 yaffs_nameval.o yaffs_attribs.o \
                 yaffs_norif1.o  ynorsim.o  \
@@ -58,7 +58,7 @@ ALLOBJS = $(sort $(YAFFSTESTOBJS))
 YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
           yaffs_nand.c yaffs_nand.h yaffs_getblockinfo.h \
-          yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \
+          yaffs_checkptrw.h yaffs_checkptrw.c \
           yaffs_nameval.c yaffs_nameval.h \
           yaffs_trace.h yaffs_attribs.h \
           yaffs_allocator.c yaffs_allocator.h \
index 55084a2ba5477f781f34dc02cb2203dbe28d2001..c31f62728a43f56b627f71cd68ef2e95575a54c3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index f635294c731caa91d4cfded96dc410666ad7cb5e..cb4708a6668c28b1bfa0493d97566752762097b1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 5e1af5485f550039ae3d1a05940bc5130dc3b744..a4bd4152ff98689f0fe6b6c9fc044279696b920c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 87cb3df3c950c039970b4f8a5c11e09fb65a8599..f60d6949af6767566d544d2e00599e7a6d38830b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 047611310afe2316c4a30ad07ea8f5aa16ca8052..416fdcb7e5416fffefee5148603f0afca1e58776 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index c242a93bf6cd6228b3c118182c34d243a1d5f36a..a499b87aaec51731dbe3d8b33f94408f5dbf9bd2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 52b78d0f664a6b22bf7c842bdb2b89326b49a265..9b75a0b17d7e1920807f2b54e917a40a6bffe2a6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 106793f650f8b2e723ff9523ec413bdd28c549af..edfed0dce35a1612cbc0cff06f2cad2972f331ee 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index d4f584b62a3fe68fc3cfb177cb3278a70fe66398..96a91f8da16684b765287c456b8d22d95ad9e88c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 307a30c9558b9750326750b8af21cd8077a354bf..61fcab53343321880f48ae059d70d1f3fe71ccff 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 86e5e6eece13a1557a75cafc82bffd672285188e..416341af4eb9a5fb19eb27592f04ccdad52b4f1f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 6757eec83cc3a352233e974e0d44841c9bff12e0..dfdb798b77ed1c43ea7c5ef8da15700e552cba80 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 95ac613f13f7dc97b853db39d9258d1b8c7a51ff..f7c1998d996c3073ff0f709d77b9c25fdcc0f2be 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index b1691700e4201504f79ecdd9c358fbc983fb8833..a7b854fc47f5a56f0adc9da9bf248043d04af441 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 75a66defef8aa3e6a28de97b44a8433b6d34f44c..40e01aa820e804c608ab833308f59cc41d60e607 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index d283b875eae137ae8ec0102c4aeaaa4b025088ec..9851683d02be1382185b94c5c7c5a99c9c74e9c9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -45,9 +45,9 @@ int yaffs_hweight8(u8 x)
 
 int yaffs_hweight32(u32 x)
 {
-       return hweight8(x & 0xff) + 
-               hweight8((x >> 8) & 0xff) +
-               hweight8((x >> 16) & 0xff) +
-               hweight8((x >> 24) & 0xff);
+       return yaffs_hweight8(x & 0xff) + 
+               yaffs_hweight8((x >> 8) & 0xff) +
+               yaffs_hweight8((x >> 16) & 0xff) +
+               yaffs_hweight8((x >> 24) & 0xff);
 }
 
index cfe38dda0ca6ad8748a28e1d2d86b2b638f0363a..58d826c6f02af312f8d3d04a62b95454d8102707 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 6bb464606a4c192256013cfb8fa3136ff7657014..f1c52544b27f2c4524a4800de29c0cc11ba971e6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 739e118970cbde17bb75c4cb1ce041b80cbdb585..cb0c4e64de223f7c7bb0a48ab11c66991575b5d2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index e103757f12fe36316ca477dbc237d065a859e56c..b93b55ac98f1788b60b4781272de3d034a318ac0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -92,7 +92,7 @@ int ynandif_ReadChunkWithTagsFromNAND(struct yaffs_dev * dev, int nand_chunk,
                
                if(!data) {
                        localData = 1;
-                       data = yaffs_get_temp_buffer(dev,__LINE__);
+                       data = yaffs_get_temp_buffer(dev);
                }
                spare = NULL;
                spareSize = 0;
@@ -133,7 +133,7 @@ int ynandif_ReadChunkWithTagsFromNAND(struct yaffs_dev * dev, int nand_chunk,
        }
 
        if(localData)
-               yaffs_release_temp_buffer(dev,data,__LINE__);
+               yaffs_release_temp_buffer(dev, data);
        
        return retval;
 }
@@ -184,7 +184,7 @@ int ynandif_QueryNANDBlock(struct yaffs_dev *dev, int blockId,
                }
                else 
                {
-                       *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+                       *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
                        *seq_number = tags.seq_number;
                }
        }
index a130f3c3881bc12b9028ec2a889e9fb199114b7c..5065e7f14232a0a0335a915812f010df8d05b6d1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index ab05fd4fb0903b535474ebf6c9f243b6bb8c5bad..e81c8e87e197e0d87e67d885fbbf904275acdfba 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -32,8 +32,8 @@ u32 yaffsfs_CurrentTime(void);
 
 void yaffsfs_SetError(int err);
 
-void *yaffs_malloc(size_t size); 
-void yaffs_free(void *ptr);
+void *yaffsfs_malloc(size_t size);
+void yaffsfs_free(void *ptr);
 
 void yaffsfs_OSInitialisation(void);
  
index 9157b829095d870c7dc8eee68c1582a971602f1b..f8320334a3a222cee6d5430935ee9a4efad2d2fd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index e4f6df07565dfd5e1fe776425f1a92266c081014..568fe1efbd98182ba937a786600cce2ca0ec75d9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -90,7 +90,7 @@ static yaffsfs_Handle yaffsfs_handle[YAFFSFS_N_HANDLES];
 static int yaffsfs_handlesInitialised;
 
 
-unsigned yaffs_set_trace(unsigned  tm) 
+unsigned yaffs_set_trace(unsigned  tm)
 {
        yaffs_trace_mask = tm;
        return yaffs_trace_mask;
@@ -143,7 +143,7 @@ static yaffsfs_Inode *yaffsfs_HandleToInode(int handle)
 {
        yaffsfs_FileDes *fd = yaffsfs_HandleToFileDes(handle);
 
-       if(fd && fd->handleCount > 0 && 
+       if(fd && fd->handleCount > 0 &&
                fd->inodeId >= 0 && fd->inodeId < YAFFSFS_N_HANDLES)
                return  &yaffsfs_inode[fd->inodeId];
 
@@ -169,7 +169,7 @@ static int yaffsfs_FindInodeIdForObject(struct yaffs_obj *obj)
 {
        int i;
        int ret = -1;
-       
+
        if(obj)
                obj = yaffs_get_equivalent_obj(obj);
 
@@ -190,7 +190,7 @@ static int yaffsfs_GetInodeIdForObject(struct yaffs_obj *obj)
        int i;
        int ret;
        yaffsfs_Inode *in = NULL;
-       
+
        if(obj)
                obj = yaffs_get_equivalent_obj(obj);
 
@@ -208,8 +208,8 @@ static int yaffsfs_GetInodeIdForObject(struct yaffs_obj *obj)
                in->iObj = obj;
                in->count++;
        }
-       
-       
+
+
        return ret;
 }
 
@@ -227,12 +227,12 @@ static int yaffsfs_CountHandles(struct yaffs_obj *obj)
 static void yaffsfs_ReleaseInode(yaffsfs_Inode *in)
 {
        struct yaffs_obj *obj;
-       
+
        obj = in->iObj;
 
        if(obj->unlinked)
                yaffs_del_obj(obj);
-       
+
        obj->my_inode = NULL;
        in->iObj = NULL;
 
@@ -247,7 +247,7 @@ static void yaffsfs_PutInode(int inodeId)
                        yaffsfs_ReleaseInode(in);
                        in->count = 0;
                }
-       }       
+       }
 }
 
 
@@ -307,7 +307,7 @@ static int yaffsfs_GetHandle(int handle)
 {
        yaffsfs_Handle *h = yaffsfs_HandleToPointer(handle);
 
-       if(h && h->useCount > 0){       
+       if(h && h->useCount > 0){
                h->useCount++;
                return 0;
        }
@@ -340,7 +340,7 @@ static int yaffsfs_PutHandle(int handle)
 {
        yaffsfs_Handle *h = yaffsfs_HandleToPointer(handle);
 
-       if(h && h->useCount > 0){       
+       if(h && h->useCount > 0){
                h->useCount--;
                if(h->useCount < 1){
                        yaffsfs_PutFileDes(h->fdId);
@@ -366,7 +366,7 @@ static void yaffsfs_BreakDeviceHandles(struct yaffs_dev *dev)
                        h->fdId = 0;
                }
                if(fd && fd->handleCount>0 && obj && obj->my_dev == dev){
-                       
+
                        fd->handleCount = 0;
                        yaffsfs_PutInode(fd->inodeId);
                        fd->inodeId = -1;
@@ -403,10 +403,10 @@ int yaffsfs_IsPathDivider(YCHAR ch)
 
 int yaffsfs_CheckNameLength(const char *name)
 {
-       int retVal = 0;         
+       int retVal = 0;
 
        int nameLength = strnlen(name,YAFFS_MAX_NAME_LENGTH+1);
-               
+
        if(nameLength == 0){
                yaffsfs_SetError(-ENOENT);
                retVal = -1;
@@ -415,7 +415,7 @@ int yaffsfs_CheckNameLength(const char *name)
                retVal = -1;
        }
 
-       return retVal;  
+       return retVal;
 }
 
 
@@ -438,7 +438,7 @@ static int yaffsfs_alt_dir_path(const YCHAR *path, YCHAR **ret_path)
         * Curveball: Need to handle multiple path dividers:
         * eg. /foof/sdfse///// -> /foo/sdfse
         */
-       if(path_length > 0 && 
+       if(path_length > 0 &&
                yaffsfs_IsPathDivider(path[path_length-1])){
                alt_path = kmalloc(path_length + 1, 0);
                if(!alt_path)
@@ -546,7 +546,7 @@ static int yaffsfs_CheckPath(const YCHAR *path)
                        n++;
                path++;
        }
-       
+
        return (*path) ? -1 : 0;
 }
 
@@ -659,13 +659,13 @@ static struct yaffs_obj *yaffsfs_DoFindDirectory(struct yaffs_obj *startDir,
 
                                dir = yaffsfs_FollowLink(dir,symDepth,loop);
 
-                               if(dir && dir->variant_type != 
+                               if(dir && dir->variant_type !=
                                        YAFFS_OBJECT_TYPE_DIRECTORY){
                                        if(notDir)
                                                *notDir = 1;
                                        dir = NULL;
                                }
-                               
+
                        }
                }
        }
@@ -712,7 +712,7 @@ static struct yaffs_obj *yaffsfs_FindObject(struct yaffs_obj *relDir,
 
 
 /*************************************************************************
- *     Start of yaffsfs visible functions. 
+ *     Start of yaffsfs visible functions.
  *************************************************************************/
 
 int yaffs_dup(int handle)
@@ -841,7 +841,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
                        if( writeRequested && !(obj->yst_mode & S_IWRITE))
                                openDenied = 1;
 
-                       if( !errorReported && writeRequested && 
+                       if( !errorReported && writeRequested &&
                                obj->my_dev->read_only){
                                openDenied = 1;
                                yaffsfs_SetError(-EROFS);
@@ -881,7 +881,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
 
 
 
-                               if((!sharedReadAllowed && readRequested)|| 
+                               if((!sharedReadAllowed && readRequested)||
                                        (!shareRead  && alreadyReading) ||
                                        (!sharedWriteAllowed && writeRequested) ||
                                        (!shareWrite && alreadyWriting)){
@@ -936,10 +936,10 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
                        if(inodeId<0) {
                                /*
                                 * Todo: Fix any problem if inodes run out, though that
-                                * can't happen if the number of inode items >= number of handles. 
+                                * can't happen if the number of inode items >= number of handles.
                                 */
                        }
-                       
+
                        fd->inodeId = inodeId;
                        fd->reading = readRequested;
                        fd->writing = writeRequested;
@@ -955,7 +955,7 @@ int yaffs_open_sharing(const YCHAR *path, int oflag, int mode, int sharing)
                                 yaffs_resize_file(obj,0);
                } else {
                        yaffsfs_PutHandle(handle);
-                       if(!errorReported) 
+                       if(!errorReported)
                                yaffsfs_SetError(0); /* Problem */
                        handle = -1;
                }
@@ -985,7 +985,7 @@ int yaffs_Dofsync(int handle,int datasync)
                yaffsfs_SetError(-EBADF);
        else if(obj->my_dev->read_only)
                yaffsfs_SetError(-EROFS);
-       else {          
+       else {
                yaffs_flush_file(obj,1,datasync);
                retVal = 0;
        }
@@ -1077,7 +1077,7 @@ int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte, int isPread, int
                        startPos = fd->position;
 
                pos = startPos;
-                                       
+
                if(yaffs_get_obj_length(obj) > pos)
                        maxRead = yaffs_get_obj_length(obj) - pos;
                else
@@ -1103,7 +1103,7 @@ int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte, int isPread, int
                        if(nToRead > nbyte)
                                nToRead = nbyte;
 
-                       /* Tricky bit... 
+                       /* Tricky bit...
                         * Need to reverify object in case the device was
                         * unmounted in another thread.
                         */
@@ -1123,8 +1123,8 @@ int yaffsfs_do_read(int handle, void *vbuf, unsigned int nbyte, int isPread, int
                                nbyte-=nRead;
                        else
                                nbyte = 0; /* no more to read */
-                                       
-                                       
+
+
                        if(nbyte > 0){
                                yaffsfs_Unlock();
                                yaffsfs_Lock();
@@ -1216,7 +1216,7 @@ int yaffsfs_do_write(int handle, const void *vbuf, unsigned int nbyte, int isPwr
                        if(nToWrite > nbyte)
                                nToWrite = nbyte;
 
-                       /* Tricky bit... 
+                       /* Tricky bit...
                         * Need to reverify object in case the device was
                         * remounted or unmounted in another thread.
                         */
@@ -1373,7 +1373,7 @@ off_t yaffs_lseek(int handle, off_t offset, int whence)
                        fSize = yaffs_get_obj_length(obj);
                        if(fSize >= 0 && (fSize + offset) >= 0)
                                pos = fSize + offset;
-               } 
+               }
 
                if(pos >= 0 && pos <= YAFFS_MAX_FILE_SIZE)
                        fd->position = pos;
@@ -1492,7 +1492,7 @@ int yaffs_rename(const YCHAR *oldPath, const YCHAR *newPath)
        obj = yaffsfs_FindObject(NULL,oldPath,0,0,NULL,NULL,NULL);
        newobj = yaffsfs_FindObject(NULL,newPath,0,0,NULL,NULL,NULL);
 
-       /* If the object being renamed is a directory and the 
+       /* If the object being renamed is a directory and the
         * path ended with a "/" then the olddir == obj.
         * We pass through NULL for the old name to tell the lower layers
         * to use olddir as the object.
@@ -1527,7 +1527,7 @@ int yaffs_rename(const YCHAR *oldPath, const YCHAR *newPath)
                /*
                 * It is a directory, check that it is not being renamed to
                 * being its own decendent.
-                * Do this by tracing from the new directory back to the root, 
+                * Do this by tracing from the new directory back to the root,
                 * checking for obj
                 */
 
@@ -1671,6 +1671,95 @@ int yaffs_fstat(int fd, struct yaffs_stat *buf)
        return retVal;
 }
 
+static int yaffsfs_DoUtime(struct yaffs_obj *obj,const struct yaffs_utimbuf *buf)
+{
+       int retVal = -1;
+       int result;
+
+       struct yaffs_utimbuf local;
+
+       obj = yaffs_get_equivalent_obj(obj);
+
+       if(obj && obj->my_dev->read_only) {
+               yaffsfs_SetError(-EROFS);
+               return -1;
+       }
+
+
+       if(!buf){
+               local.actime = Y_CURRENT_TIME;
+               local.modtime = local.actime;
+               buf = &local;
+       }
+
+       if(obj){
+               obj->yst_atime = buf->actime;
+               obj->yst_mtime = buf->modtime;
+               obj->dirty = 1;
+               result = yaffs_flush_file(obj,0,0);
+               retVal = result == YAFFS_OK ? 0 : -1;
+       }
+
+       return retVal;
+}
+
+int yaffs_utime(const YCHAR *path, const struct yaffs_utimbuf *buf)
+{
+       struct yaffs_obj *obj=NULL;
+       struct yaffs_obj *dir=NULL;
+       int retVal = -1;
+       int notDir = 0;
+       int loop = 0;
+
+       if(!path){
+               yaffsfs_SetError(-EFAULT);
+               return -1;
+       }
+
+       if(yaffsfs_CheckPath(path) < 0){
+               yaffsfs_SetError(-ENAMETOOLONG);
+               return -1;
+       }
+
+       yaffsfs_Lock();
+
+       obj = yaffsfs_FindObject(NULL,path,0,1,&dir,&notDir,&loop);
+
+       if(!dir && notDir)
+               yaffsfs_SetError(-ENOTDIR);
+       else if(loop)
+               yaffsfs_SetError(-ELOOP);
+       else if(!dir || !obj)
+               yaffsfs_SetError(-ENOENT);
+       else
+               retVal = yaffsfs_DoUtime(obj,buf);
+
+       yaffsfs_Unlock();
+
+       return retVal;
+
+}
+int yaffs_futime(int fd, const struct yaffs_utimbuf *buf)
+{
+       struct yaffs_obj *obj;
+
+       int retVal = -1;
+
+       yaffsfs_Lock();
+       obj = yaffsfs_HandleToObject(fd);
+
+       if(obj)
+               retVal = yaffsfs_DoUtime(obj,buf);
+       else
+               /* bad handle */
+               yaffsfs_SetError(-EBADF);
+
+       yaffsfs_Unlock();
+
+       return retVal;
+}
+
+
 #ifndef CONFIG_YAFFS_WINCE
 /* xattrib functions */
 
@@ -1702,11 +1791,11 @@ static int yaffs_do_setxattr(const YCHAR *path, const char *name,
        if(follow)
                obj = yaffsfs_FollowLink(obj,0,&loop);
 
-       if(!dir && notDir) 
+       if(!dir && notDir)
                yaffsfs_SetError(-ENOTDIR);
-       else if(loop) 
+       else if(loop)
                yaffsfs_SetError(-ELOOP);
-       else if(!dir || !obj) 
+       else if(!dir || !obj)
                yaffsfs_SetError(-ENOENT);
        else {
                retVal = yaffs_set_xattrib(obj,name,data,size,flags);
@@ -1748,7 +1837,7 @@ int yaffs_fsetxattr(int fd, const char *name, const void *data, int size, int fl
        yaffsfs_Lock();
        obj = yaffsfs_HandleToObject(fd);
 
-       if(!obj) 
+       if(!obj)
                yaffsfs_SetError(-EBADF);
        else {
                retVal = yaffs_set_xattrib(obj,name,data,size,flags);
@@ -1788,11 +1877,11 @@ static int yaffs_do_getxattr(const YCHAR *path, const char *name, void *data, in
        if(follow)
                obj = yaffsfs_FollowLink(obj,0,&loop);
 
-       if(!dir && notDir) 
+       if(!dir && notDir)
                yaffsfs_SetError(-ENOTDIR);
-       else if(loop) 
+       else if(loop)
                yaffsfs_SetError(-ELOOP);
-       else if(!dir || !obj) 
+       else if(!dir || !obj)
                yaffsfs_SetError(-ENOENT);
        else {
                retVal = yaffs_get_xattrib(obj,name,data,size);
@@ -1872,11 +1961,11 @@ static int yaffs_do_listxattr(const YCHAR *path, char *data, int size, int follo
        if(follow)
                obj = yaffsfs_FollowLink(obj,0,&loop);
 
-       if(!dir && notDir) 
+       if(!dir && notDir)
                yaffsfs_SetError(-ENOTDIR);
-       else if(loop) 
+       else if(loop)
                yaffsfs_SetError(-ELOOP);
-       else if(!dir || !obj) 
+       else if(!dir || !obj)
                yaffsfs_SetError(-ENOENT);
        else {
                retVal = yaffs_list_xattrib(obj, data,size);
@@ -1956,11 +2045,11 @@ static int yaffs_do_removexattr(const YCHAR *path, const char *name, int follow)
        if(follow)
                obj = yaffsfs_FollowLink(obj,0,&loop);
 
-       if(!dir && notDir) 
+       if(!dir && notDir)
                yaffsfs_SetError(-ENOTDIR);
-       else if(loop) 
+       else if(loop)
                yaffsfs_SetError(-ELOOP);
-       else if(!dir || !obj) 
+       else if(!dir || !obj)
                yaffsfs_SetError(-ENOENT);
        else {
                retVal = yaffs_remove_xattrib(obj,name);
@@ -2045,17 +2134,17 @@ int yaffs_get_wince_times(int fd, unsigned *wctime, unsigned *watime, unsigned *
                retVal = 0;
        } else
                /*  bad handle */
-               yaffsfs_SetError(-EBADF);               
-       
+               yaffsfs_SetError(-EBADF);
+
        yaffsfs_Unlock();
-       
+
        return retVal;
 }
 
 
-int yaffs_set_wince_times(int fd, 
-                                                 const unsigned *wctime, 
-                                                 const unsigned *watime, 
+int yaffs_set_wince_times(int fd,
+                                                 const unsigned *wctime,
+                                                 const unsigned *watime,
                                                   const unsigned *wmtime)
 {
         struct yaffs_obj *obj;
@@ -2140,11 +2229,11 @@ int yaffs_access(const YCHAR *path, int amode)
        obj = yaffsfs_FindObject(NULL,path,0,1, &dir,&notDir,&loop);
        obj = yaffsfs_FollowLink(obj,0,&loop);
 
-       if(!dir && notDir) 
+       if(!dir && notDir)
                yaffsfs_SetError(-ENOTDIR);
-       else if(loop) 
+       else if(loop)
                yaffsfs_SetError(-ELOOP);
-       else if(!dir || !obj) 
+       else if(!dir || !obj)
                yaffsfs_SetError(-ENOENT);
        else if((amode & W_OK) && obj->my_dev->read_only)
                yaffsfs_SetError(-EROFS);
@@ -2199,11 +2288,11 @@ int yaffs_chmod(const YCHAR *path, mode_t mode)
        obj = yaffsfs_FindObject(NULL,path,0,1, &dir, &notDir,&loop);
        obj = yaffsfs_FollowLink(obj,0,&loop);
 
-       if(!dir && notDir) 
+       if(!dir && notDir)
                yaffsfs_SetError(-ENOTDIR);
-       else if(loop) 
+       else if(loop)
                yaffsfs_SetError(-ELOOP);
-       else if(!dir || !obj) 
+       else if(!dir || !obj)
                yaffsfs_SetError(-ENOENT);
        else if(obj->my_dev->read_only)
                yaffsfs_SetError(-EROFS);
@@ -2268,7 +2357,7 @@ int yaffs_mkdir(const YCHAR *path, mode_t mode)
        }
        if(alt_path)
                path = alt_path;
-       
+
        yaffsfs_Lock();
        parent = yaffsfs_FindDirectory(NULL,path,&name,0,&notDir,&loop);
        if(!parent && notDir)
@@ -2398,7 +2487,7 @@ int yaffs_sync(const YCHAR *path)
                yaffsfs_SetError(-ENAMETOOLONG);
                return -1;
        }
-        
+
         yaffsfs_Lock();
         dev = yaffsfs_FindDevice(path,&dummy);
         if(dev){
@@ -2407,17 +2496,17 @@ int yaffs_sync(const YCHAR *path)
                else if(dev->read_only)
                        yaffsfs_SetError(-EROFS);
                else {
-                        
+
                         yaffs_flush_whole_cache(dev);
                         yaffs_checkpoint_save(dev);
                         retVal = 0;
-                        
-                }      
+
+                }
         }else
                 yaffsfs_SetError(-ENODEV);
 
         yaffsfs_Unlock();
-        return retVal;  
+        return retVal;
 }
 
 
@@ -2572,7 +2661,7 @@ loff_t yaffs_totalspace(const YCHAR *path)
        yaffsfs_Lock();
        dev = yaffsfs_FindDevice(path,&dummy);
        if(dev  && dev->is_mounted){
-               retVal = (dev->param.end_block - dev->param.start_block + 1) - 
+               retVal = (dev->param.end_block - dev->param.start_block + 1) -
                        dev->param.n_reserved_blocks;
                retVal *= dev->param.chunks_per_block;
                retVal *= dev->data_bytes_per_chunk;
@@ -2607,12 +2696,12 @@ int yaffs_inodecount(const YCHAR *path)
           if(n_obj > dev->n_hardlinks)
                retVal = n_obj - dev->n_hardlinks;
        }
-       
+
        if(retVal < 0)
                yaffsfs_SetError(-EINVAL);
-       
+
        yaffsfs_Unlock();
-       return retVal;  
+       return retVal;
 }
 
 
@@ -2652,7 +2741,7 @@ typedef struct
         struct yaffs_obj *dirObj;           /* ptr to directory being searched */
         struct yaffs_obj *nextReturn;       /* obj to be returned by next readddir */
         int offset;
-        struct list_head others;       
+        struct list_head others;
 } yaffsfs_DirectorySearchContext;
 
 
@@ -2769,7 +2858,7 @@ yaffs_DIR *yaffs_opendir(const YCHAR *dirname)
                         if(!search_contexts.next)
                                 INIT_LIST_HEAD(&search_contexts);
 
-                        list_add(&dsc->others,&search_contexts);       
+                        list_add(&dsc->others,&search_contexts);
                         yaffsfs_SetDirRewound(dsc);
                }
 
@@ -2910,11 +2999,11 @@ int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz)
 
        obj = yaffsfs_FindObject(NULL,path,0,1, &dir,&notDir,&loop);
 
-       if(!dir && notDir) 
+       if(!dir && notDir)
                yaffsfs_SetError(-ENOTDIR);
-       else if(loop) 
+       else if(loop)
                yaffsfs_SetError(-ELOOP);
-       else if(!dir || !obj) 
+       else if(!dir || !obj)
                yaffsfs_SetError(-ENOENT);
        else if(obj->variant_type != YAFFS_OBJECT_TYPE_SYMLINK)
                yaffsfs_SetError(-EINVAL);
@@ -2971,9 +3060,9 @@ int yaffs_link(const YCHAR *oldpath, const YCHAR *linkpath)
                yaffsfs_SetError(-EEXIST);
        else if(lnk_dir->my_dev != obj->my_dev)
                yaffsfs_SetError(-EXDEV);
-       else {          
+       else {
                retVal = yaffsfs_CheckNameLength(newname);
-               
+
                if(retVal == 0) {
                        lnk = yaffs_link_obj(lnk_dir,newname,obj);
                        if(lnk)
@@ -3003,7 +3092,7 @@ int yaffs_mknod(const YCHAR *pathname, mode_t mode, dev_t dev)
 /*
  * D E B U G   F U N C T I O N S
  */
+
 /*
  * yaffs_n_handles()
  * Returns number of handles attached to the object
index 29d81fcd47bade17629b09d6d28cb6092a15ba71..6b6b328bd1f07b6661986176f31b37c22ed3cc24 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -77,6 +77,13 @@ struct yaffs_stat{
 #endif
 };
 
+
+struct yaffs_utimbuf {
+       unsigned long actime;
+       unsigned long modtime;
+};
+
+
 int yaffs_open(const YCHAR *path, int oflag, int mode) ;
 
 int yaffs_close(int fd) ;
@@ -106,6 +113,10 @@ int yaffs_stat(const YCHAR *path, struct yaffs_stat *buf) ;
 int yaffs_lstat(const YCHAR *path, struct yaffs_stat *buf) ;
 int yaffs_fstat(int fd, struct yaffs_stat *buf) ;
 
+int yaffs_utime(const YCHAR *path, const struct yaffs_utimbuf *buf);
+int yaffs_futime(int fd, const struct yaffs_utimbuf *buf);
+
+
 int yaffs_setxattr(const char *path, const char *name, const void *data, int size, int flags);
 int yaffs_lsetxattr(const char *path, const char *name, const void *data, int size, int flags);
 int yaffs_fsetxattr(int fd, const char *name, const void *data, int size, int flags);
@@ -130,8 +141,8 @@ int yaffs_get_wince_times(int fd, unsigned *wctime, unsigned *watime, unsigned *
 
 #endif
 
-int yaffs_chmod(const YCHAR *path, mode_t mode); 
-int yaffs_fchmod(int fd, mode_t mode); 
+int yaffs_chmod(const YCHAR *path, mode_t mode);
+int yaffs_fchmod(int fd, mode_t mode);
 
 int yaffs_mkdir(const YCHAR *path, mode_t mode) ;
 int yaffs_rmdir(const YCHAR *path) ;
@@ -150,10 +161,10 @@ int yaffs_remount(const YCHAR *path, int force, int read_only);
 
 int yaffs_sync(const YCHAR *path) ;
 
-int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath); 
-int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz); 
+int yaffs_symlink(const YCHAR *oldpath, const YCHAR *newpath);
+int yaffs_readlink(const YCHAR *path, YCHAR *buf, int bufsiz);
 
-int yaffs_link(const YCHAR *oldpath, const YCHAR *newpath); 
+int yaffs_link(const YCHAR *oldpath, const YCHAR *newpath);
 int yaffs_mknod(const YCHAR *pathname, mode_t mode, dev_t dev);
 
 loff_t yaffs_freespace(const YCHAR *path);
@@ -190,9 +201,9 @@ unsigned  yaffs_get_trace(void);
 
 
 /*
- * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Timothy Manning <timothy@yaffs.net>
index 7063fa649fb25b4e0329ae9ff43925d45bc0d86b..7860b848f21548cc4c6f3432425e839c94893344 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -29,8 +29,8 @@
 #include "yaffs_hweight.h"
 
 #include "assert.h"
-#define YBUG() assert(0)
-//#define YBUG() do { *((int *)0) =1;} while(0)
+#define BUG() assert(0)
+//#define BUG() do { *((int *)0) =1;} while(0)
 
 
 #define YCHAR char
@@ -53,10 +53,10 @@ void yaffs_qsort(void *aa, size_t n, size_t es,
 #define inline __inline__
 #endif
 
-#define kmalloc(x,flags) yaffs_malloc(x)
-#define kfree(x)   yaffs_free(x)
-#define vmalloc(x) yaffs_malloc(x)
-#define vfree(x) yaffs_free(x)
+#define kmalloc(x,flags) yaffsfs_malloc(x)
+#define kfree(x)   yaffsfs_free(x)
+#define vmalloc(x) yaffsfs_malloc(x)
+#define vfree(x) yaffsfs_free(x)
 
 #define cond_resched()  do {} while(0)
 
index 4208e806661fa8f1d95a58bd0e1d9ab623052b84..0d0d0faa2cf6ca04f4b5340830deaa74e2df3b35 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -24,11 +24,6 @@ typedef unsigned short u16;
 typedef unsigned u32;
 
 
-#ifndef WIN32
-#include <sys/stat.h>
-#endif
-
-
 #ifdef CONFIG_YAFFS_PROVIDE_DEFS
 /* File types */
 
@@ -44,10 +39,6 @@ typedef unsigned u32;
 #define DT_WHT         14
 
 
-#ifndef WIN32
-#include <sys/stat.h>
-#endif
-
 /*
  * Attribute flags.
  * These are or-ed together to select what has been changed.
@@ -227,6 +218,22 @@ struct iattr {
 #define S_IFMT         0170000
 #endif
 
+#ifndef S_IFSOCK
+#define S_IFSOCK       0140000
+#endif
+
+#ifndef S_IFIFO
+#define S_IFIFO                0010000
+#endif
+
+#ifndef S_IFCHR
+#define S_IFCHR                0020000
+#endif
+
+#ifndef S_IFBLK
+#define S_IFBLK                0060000
+#endif
+
 #ifndef S_IFLNK
 #define S_IFLNK                0120000
 #endif
@@ -239,6 +246,15 @@ struct iattr {
 #define S_IFREG                0100000
 #endif
 
+#define S_ISSOCK(m)    (((m) & S_IFMT) == S_IFSOCK)
+#define S_ISLNK(m)     (((m) & S_IFMT) == S_IFLNK)
+#define S_ISDIR(m)     (((m) & S_IFMT) == S_IFDIR)
+#define S_ISREG(m)     (((m) & S_IFMT) == S_IFREG)
+#define S_ISBLK(m)     (((m) & S_IFMT) == S_IFBLK)
+#define S_ISCHR(m)     (((m) & S_IFMT) == S_IFCHR)
+#define S_ISFIFO(m)    (((m) & S_IFMT) == S_IFIFO)
+
+
 #ifndef S_IREAD 
 #define S_IREAD                0000400
 #endif
@@ -278,8 +294,8 @@ struct iattr {
 #define Y_DUMP_STACK() do { } while (0)
 #endif
 
-#ifndef YBUG
-#define YBUG() do {\
+#ifndef BUG
+#define BUG() do {\
        yaffs_trace(YAFFS_TRACE_BUG,\
                "==>> yaffs bug: " __FILE__ " %d",\
                __LINE__);\
index 59c26b085a8d8dce6a5b72d0ed7426792191d633..e7482bc49f8650fece50e9d9e1defffd6616fb32 100755 (executable)
@@ -1,4 +1,4 @@
-\#!/bin/sh
+#!/bin/sh
 # Script that gathers data erased vs free data from /proc/yaffs_stats and simultaneously \
 # plots it using gnuplot.
 
@@ -25,9 +25,24 @@ i=0;
 rm -f $log_file
 
 while [ ! -e $done_file ] ; do
-       erased_blocks=$(cat /proc/yaffs | grep n_erased_blocks | cut -d ' ' -f 2)
-       free_chunks=$(cat /proc/yaffs | grep n_free_chunks | cut -d ' ' -f 2)
-
+       xx='1'
+       erased_blocks='2'
+       while [ "$xx" !=  "$erased_blocks" ] ; do
+               xx=$(cat /proc/yaffs | grep n_erased_blocks | cut -d ' ' -f 2)
+               erased_blocks=$(cat /proc/yaffs | grep n_erased_blocks | cut -d ' ' -f 2)
+               if [ -z "$xx" ] ; then
+                       xx='bad value'
+               fi
+       done
+       xx='1'
+       free_chunks='2'
+       while [ "$xx" != "$free_chunks" ] ; do
+               xx=$(cat /proc/yaffs | grep n_free_chunks | cut -d ' ' -f 2)
+               free_chunks=$(cat /proc/yaffs | grep n_free_chunks | cut -d ' ' -f 2)
+               if [ -z "$xx" ] ; then
+                       xx='bad value'
+               fi
+       done
        erased_chunks=$(($erased_blocks*64))
        str=" $i, 0, $free_chunks, $erased_chunks"
        echo $str
index d1e5cf0ed97a4a20ef6ba0555ca15f79c7e42d31..4e92dfc09f0f71e2fc36b124981a5dd8a760c584 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 83cf0c1fada93acf630fe2c2457d9760651d8368..c5b6cf1dbd5e3d3e83200392a52fde3981b1b174 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Martin Fouts <Martin.Fouts@palmsource.com>
 
 #ifdef YAFFS_OUT_OF_TREE
 
-/* DO NOT UNSET THESE THREE. YAFFS2 will not compile if you do. */
 #define CONFIG_YAFFS_FS
-#define CONFIG_YAFFS_YAFFS1
-#define CONFIG_YAFFS_YAFFS2
+#define CONFIG_YAFFS_DEBUG
 
-/* These options are independent of each other.  Select those that matter. */
+#endif
 
-/* Default: Not selected */
-/* Meaning: Yaffs does its own ECC, rather than using MTD ECC */
-/* #define CONFIG_YAFFS_DOES_ECC */
+#endif
 
-/* Default: Selected */
-/* Meaning: Yaffs does its own ECC on tags for packed tags rather than use mtd */
-#define CONFIG_YAFFS_DOES_TAGS_ECC
-
-/* Default: Not selected */
-/* Meaning: ECC byte order is 'wrong'.  Only meaningful if */
-/*          CONFIG_YAFFS_DOES_ECC is set */
-/* #define CONFIG_YAFFS_ECC_WRONG_ORDER */
-
-/* Default: Not selected */
-/* Meaning: Always test whether chunks are erased before writing to them.
-           Use during mtd debugging and init. */
-/* #define CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED */
-
-/* Default: Not Selected */
-/* Meaning: At mount automatically empty all files from lost and found. */
-/* This is done to fix an old problem where rmdir was not checking for an */
-/* empty directory. This can also be achieved with a mount option. */
-#define CONFIG_YAFFS_EMPTY_LOST_AND_FOUND
-
-/* Default: Unselected */
-/* Meaning: Select to disable block refreshing. */
-/* Block Refreshing periodically rewrites the oldest block. */
-/* #define CONFIG_DISABLE_BLOCK_REFRESHING */
-
-/* Default: Unselected */
-/* Meaning: Select to disable background processing */
-/* #define CONFIG_DISABLE_BACKGROUND */
-
-/* Default: Selected */
-/* Meaning: Enable XATTR support */
-#define CONFIG_YAFFS_XATTR
-
-/*
-Older-style on-NAND data format has a "page_status" byte to record
-chunk/page state.  This byte is zeroed when the page is discarded.
-Choose this option if you have existing on-NAND data in this format
-that you need to continue to support.  New data written also uses the
-older-style format.
-Note: Use of this option generally requires that MTD's oob layout be
-adjusted to use the older-style format.  See notes on tags formats and
-MTD versions in yaffs_mtdif1.c.
-*/
-/* Default: Not selected */
-/* Meaning: Use older-style on-NAND data format with page_status byte */
-/* #define CONFIG_YAFFS_9BYTE_TAGS */
-
-#endif /* YAFFS_OUT_OF_TREE */
-
-#endif /* __YAFFS_CONFIG_H__ */
index 4cba57b536dedc5c879807e674470d14dbbbab84..d1028ffc7e122bd9f00e7f468dfd43f9a96417f8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index ba6b6e483ce7fb8b35a5635e6af133236a5317a3..ed54d53505eb37821617d6ae3c12eee7c21536af 100755 (executable)
@@ -57,11 +57,13 @@ if [ $MULTIORSINGLE = m ]; then
    MTD1_CODE="yaffs_mtdif1_multi.c"
    MTD2_CODE="yaffs_mtdif2_multi.c"
    YPORTENV="yportenv_multi.h"
+   KCONFIG_SRC="Kconfig_multi"
 elif [ $MULTIORSINGLE = s ]; then
    VFS_CODE="yaffs_vfs_single.c"
    MTD1_CODE="yaffs_mtdif1_single.c"
    MTD2_CODE="yaffs_mtdif2_single.c"
    YPORTENV="yportenv_single.h"
+   KCONFIG_SRC="Kconfig_single"
 
    echo ""
    echo "*** Warning ***"
@@ -90,7 +92,7 @@ PATCHLEVEL=`grep -s PATCHLEVEL <$LINUXDIR/Makefile | head -n 1 | sed s/'PATCHLEV
 SUBLEVEL=`grep -s SUBLEVEL <$LINUXDIR/Makefile | head -n 1 | sed s/'SUBLEVEL = '//`
 
 # Can we handle this version?
-if [ $VERSION -ne 2  -o $PATCHLEVEL -lt 6  ]
+if [ $VERSION$PATCHLEVEL -lt 26  ]
 then
        echo "Cannot patch kernel version $VERSION.$PATCHLEVEL.$SUBLEVEL, must be 2.6.x or higher"
        exit 1;
@@ -142,10 +144,10 @@ then
    echo "already there then delete $YAFFSDIR and re-run this script"
    echo " eg.  \"rm -rf $YAFFSDIR\" "
 else
-   rm yaffs*.mod.c
+   rm yaffs*.mod.c 2> /dev/null
    mkdir $LINUXDIR/fs/yaffs2
    $CPY  $PWD/Makefile.kernel $LINUXDIR/fs/yaffs2/Makefile
-   $CPY $PWD/Kconfig $LINUXDIR/fs/yaffs2
+   $CPY $PWD/$KCONFIG_SRC $LINUXDIR/fs/yaffs2/Kconfig
    $CPY $PWD/*.c $PWD/*.h  $LINUXDIR/fs/yaffs2
    rm $LINUXDIR/fs/yaffs2/yaffs_vfs*.c $LINUXDIR/fs/yaffs2/yaffs_mtdif[12]*.c
    rm $LINUXDIR/fs/yaffs2/yportenv*.h
index 395f4eac548953198785806e66c7dd8bf2045d5f..9cbb5892ba2ec87adbf465653be57cd7324b8c06 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -55,7 +55,7 @@ void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
                } else {
                        T(YAFFS_TRACE_ALWAYS,
                                (TSTR("NULL tnode cache\n")));
-                       YBUG();
+                       BUG();
                }
 
                if(allocator->object_cache){
@@ -64,7 +64,7 @@ void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
                } else {
                        T(YAFFS_TRACE_ALWAYS,
                                (TSTR("NULL object cache\n")));
-                       YBUG();
+                       BUG();
                }
 
                kfree(allocator);
@@ -72,7 +72,7 @@ void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
        } else {
                T(YAFFS_TRACE_ALWAYS,
                        (TSTR("Deinitialising NULL allocator\n")));
-               YBUG();
+               BUG();
        }
        dev->allocator = NULL;
 }
@@ -110,7 +110,7 @@ void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
        T(YAFFS_TRACE_ALLOCATE,(TSTR("Initialising yaffs allocator\n")));
 
        if(dev->allocator)
-               YBUG();
+               BUG();
        else if(mount_id >= 10){
                T(YAFFS_TRACE_ALWAYS,(TSTR("Bad mount_id %u\n"),mount_id));
        } else {
@@ -121,7 +121,7 @@ void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
                if(!dev->allocator){
                        T(YAFFS_TRACE_ALWAYS,
                                (TSTR("yaffs allocator creation failed\n")));
-                       YBUG();
+                       BUG();
                        return;
 
                }
@@ -141,7 +141,7 @@ void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
                else {
                        T(YAFFS_TRACE_ALWAYS,
                                (TSTR("yaffs cache creation failed\n")));
-                       YBUG();
+                       BUG();
                }
 
 
@@ -159,7 +159,7 @@ void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
                else {
                        T(YAFFS_TRACE_ALWAYS,
                                (TSTR("yaffs cache creation failed\n")));
-                       YBUG();
+                       BUG();
                }
        } 
 }
@@ -169,7 +169,7 @@ struct yaffs_tnode *yaffs_alloc_raw_tnode(struct yaffs_dev *dev)
 {
        yaffs_Allocator *allocator = dev->allocator;
        if(!allocator || !allocator->tnode_cache){
-               YBUG();
+               BUG();
                return NULL;
        }
        return kmem_cache_alloc(allocator->tnode_cache, GFP_NOFS);
@@ -185,11 +185,11 @@ struct yaffs_obj *yaffs_alloc_raw_obj(struct yaffs_dev *dev)
 {
        yaffs_Allocator *allocator = dev->allocator;
        if(!allocator){
-               YBUG();
+               BUG();
                return NULL;
        }
        if(!allocator->object_cache){
-               YBUG();
+               BUG();
                return NULL;
        }
        return kmem_cache_alloc(allocator->object_cache, GFP_NOFS);
index 19677ad47afd524d93a7be86f913a3b75da3ff94..354745210f63c1bd6357641cda604ecb9d3eb865 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system. 
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -48,7 +48,7 @@ void nandmtd2_pt2buf(struct yaffs_dev *dev, yaffs_PackedTags2 *pt, int is_raw)
 
                if (n == 0) {
                        T(YAFFS_TRACE_ERROR, (TSTR("No OOB space for tags" TENDSTR)));
-                       YBUG();
+                       BUG();
                }
 
                for (i = 0; i < sizeof(yaffs_PackedTags2); i++) {
@@ -58,7 +58,7 @@ void nandmtd2_pt2buf(struct yaffs_dev *dev, yaffs_PackedTags2 *pt, int is_raw)
                                n = mtd->oobinfo.oobfree[j][1];
                                if (n == 0) {
                                        T(YAFFS_TRACE_ERROR, (TSTR("No OOB space for tags" TENDSTR)));
-                                       YBUG();
+                                       BUG();
                                }
                        }
                        dev->spareBuffer[k] = ptab[i];
@@ -86,7 +86,7 @@ void nandmtd2_buf2pt(struct yaffs_dev *dev, yaffs_PackedTags2 *pt, int is_raw)
 
                if (n == 0) {
                        T(YAFFS_TRACE_ERROR, (TSTR("No space in OOB for tags" TENDSTR)));
-                       YBUG();
+                       BUG();
                }
 
                for (i = 0; i < sizeof(yaffs_PackedTags2); i++) {
@@ -96,7 +96,7 @@ void nandmtd2_buf2pt(struct yaffs_dev *dev, yaffs_PackedTags2 *pt, int is_raw)
                                n = mtd->oobinfo.oobfree[j][1];
                                if (n == 0) {
                                        T(YAFFS_TRACE_ERROR, (TSTR("No space in OOB for tags" TENDSTR)));
-                                       YBUG();
+                                       BUG();
                                }
                        }
                        ptab[i] = dev->spareBuffer[k];
@@ -140,7 +140,7 @@ int nandmtd2_WriteChunkWithTagsToNAND(struct yaffs_dev * dev, int nand_chunk,
                T(YAFFS_TRACE_ALWAYS,
                  (TSTR
                  ("Write chunk with null tags or data!" TENDSTR)));
-               YBUG();
+               BUG();
        }
 
        if (retval == 0)
index 49bf03b1baac34d115bf7b6fb45716ef2e20076b..710ebbf3186b1f7ab40520cd6f223679fe125ad0 100644 (file)
@@ -16,7 +16,7 @@
 
 #KERNELDIR = /usr/src/kernel-headers-2.4.18
 
-CFLAGS =   -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL
+CFLAGS =    -O2 -Wall -DCONFIG_YAFFS_UTIL
 CFLAGS+=   -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
 CFLAGS+=   -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
 
@@ -25,30 +25,43 @@ MAKETOOLS =
 
 CC=$(MAKETOOLS)gcc
 
-COMMONLINKS = yaffs_ecc.c
-COMMONOBJS = $(COMMONLINKS:.c=.o)
+COMMON_BASE_C_LINKS = yaffs_ecc.c
+COMMON_BASE_LINKS = $(COMMON_BASE_C_LINKS) yaffs_ecc.h yaffs_guts.h yaffs_packedtags2.h yaffs_trace.h
+COMMON_DIRECT_C_LINKS = yaffs_hweight.c
+COMMON_C_LINKS = $(COMMON_DIRECT_C_LINKS) $(COMMON_BASE_C_LINKS)
+COMMON_DIRECT_LINKS= $(COMMON_DIRECT_C_LINKS) yportenv.h yaffs_hweight.h yaffs_list.h
+COMMONOBJS = $(COMMON_C_LINKS:.c=.o)
 
 MKYAFFSSOURCES = mkyaffsimage.c
 MKYAFFSIMAGEOBJS = $(MKYAFFSSOURCES:.c=.o)
 
 MKYAFFS2SOURCES = mkyaffs2image.c
-MKYAFFS2LINKS = yaffs_packedtags2.c yaffs_tagsvalidity.c
+MKYAFFS2LINKS = yaffs_packedtags2.c
 MKYAFFS2IMAGEOBJS = $(MKYAFFS2SOURCES:.c=.o) $(MKYAFFS2LINKS:.c=.o)
 
+BASE_LINKS = $(MKYAFFSLINKS) $(MKYAFFS2LINKS) $(COMMON_BASE_LINKS)
+DIRECT_LINKS = $(MKYAFFS_DIRECT_LINKS) $(MKYAFFS2_DIRECT_LINKS) $(COMMON_DIRECT_LINKS)
+ALL_LINKS = $(BASE_LINKS) $(DIRECT_LINKS)
+
 all: mkyaffsimage mkyaffs2image
 
-$(COMMONLINKS) $(MKYAFFSLINKS) $(MKYAFFS2LINKS):
+$(BASE_LINKS):
        ln -s ../$@ $@
 
+$(DIRECT_LINKS):
+       ln -s ../direct/$@ $@
+
+$(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) : $(ALL_LINKS)
+
 $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) : %.o: %.c
        $(CC) -c $(CFLAGS) $< -o $@
 
-mkyaffsimage: $(COMMONOBJS) $(MKYAFFSIMAGEOBJS)
-       $(CC) -o $@ $(COMMONOBJS) $(MKYAFFSIMAGEOBJS)
+mkyaffsimage: $(MKYAFFSIMAGEOBJS) $(COMMONOBJS)
+       $(CC) -o $@  $^
 
-mkyaffs2image: $(COMMONOBJS) $(MKYAFFS2IMAGEOBJS)
-       $(CC) -o $@ $(COMMONOBJS) $(MKYAFFS2IMAGEOBJS)
+mkyaffs2image: $(MKYAFFS2IMAGEOBJS) $(COMMONOBJS)
+       $(CC) -o $@ $^
 
 
 clean:
-       rm -f $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) $(COMMONLINKS) $(MKYAFFSLINKS) $(MKYAFFS2LINKS) mkyaffsimage mkyaffs2image core
+       rm -f $(COMMONOBJS) $(MKYAFFSIMAGEOBJS) $(MKYAFFS2IMAGEOBJS) $(ALL_LINKS) mkyaffsimage mkyaffs2image core
index fa2229bbd06bc4131f30d7248fc3ef7ba2ef33b0..5292b667ae7f1639baef227529dce953ef051509 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -34,7 +34,6 @@
 #include "yaffs_ecc.h"
 #include "yaffs_guts.h"
 
-#include "yaffs_tagsvalidity.h"
 #include "yaffs_packedtags2.h"
 
 unsigned yaffs_trace_mask=0;
@@ -188,7 +187,7 @@ static int write_chunk(u8 *data, u32 id, u32 chunk_id, u32 n_bytes)
        if (write(outFile,data,chunkSize) != chunkSize)
                fatal("write");
 
-       yaffs_init_tags(&t);
+       memset(&t, 0, sizeof(t));
        
        t.chunk_id = chunk_id;
 //     t.serial_number = 0;
@@ -230,52 +229,41 @@ static int write_chunk(u8 *data, u32 id, u32 chunk_id, u32 n_bytes)
 // This one is easier, since the types are more standard. No funky shifts here.
 static void object_header_little_to_big_endian(struct yaffs_obj_hdr* oh)
 {
-    int i;    
     oh->type = SWAP32(oh->type); // GCC makes enums 32 bits.
     oh->parent_obj_id = SWAP32(oh->parent_obj_id); // int
     oh->sum_no_longer_used = SWAP16(oh->sum_no_longer_used); // u16 - Not used, but done for completeness.
     // name = skip. Char array. Not swapped.
     oh->yst_mode = SWAP32(oh->yst_mode);
-#ifdef CONFIG_YAFFS_WINCE // WinCE doesn't implement this, but we need to just in case. 
-    // In fact, WinCE would be *THE* place where this would be an issue.
-    // Why? WINCE is little-endian only.
 
-    {
-        int n = sizeof(oh->not_for_wince)/sizeof(oh->not_for_wince[0]);
-        for(i = 0; i < n; i++)
-            oh->not_for_wince[i] = SWAP32(oh->not_for_wince[i]);
-    }
-#else
     // Regular POSIX.
     oh->yst_uid = SWAP32(oh->yst_uid);
     oh->yst_gid = SWAP32(oh->yst_gid);
     oh->yst_atime = SWAP32(oh->yst_atime);
     oh->yst_mtime = SWAP32(oh->yst_mtime);
     oh->yst_ctime = SWAP32(oh->yst_ctime);
-#endif
 
     oh->file_size = SWAP32(oh->file_size); // Aiee. An int... signed, at that!
     oh->equiv_id = SWAP32(oh->equiv_id);
     // alias  - char array.
     oh->yst_rdev = SWAP32(oh->yst_rdev);
 
-#ifdef CONFIG_YAFFS_WINCE
     oh->win_ctime[0] = SWAP32(oh->win_ctime[0]);
     oh->win_ctime[1] = SWAP32(oh->win_ctime[1]);
     oh->win_atime[0] = SWAP32(oh->win_atime[0]);
     oh->win_atime[1] = SWAP32(oh->win_atime[1]);
     oh->win_mtime[0] = SWAP32(oh->win_mtime[0]);
     oh->win_mtime[1] = SWAP32(oh->win_mtime[1]);
-#else
 
-    {
-        int n = sizeof(oh->room_to_grow)/sizeof(oh->room_to_grow[0]);
-        for(i=0; i < n; i++)
-            oh->room_to_grow[i] = SWAP32(oh->room_to_grow[i]);
-    }
-#endif
+    oh->reserved[0] = SWAP32(oh->reserved[0]);
+    oh->reserved[1] = SWAP32(oh->reserved[1]);
+
+    oh->inband_shadowed_obj_id = SWAP32(oh->inband_shadowed_obj_id);
+    oh->inband_is_shrink = SWAP32(oh->inband_is_shrink);
+    oh->shadows_obj = SWAP32(oh->shadows_obj);
+    oh->is_shrink = SWAP32(oh->is_shrink);
 }
 
+
 static int write_object_header(int id, enum yaffs_obj_type t, struct stat *s, int parent, const char *name, int equivalentObj, const char * alias)
 {
        u8 bytes[chunkSize];
index 02ad521a02bb92edc41de6c67134550b299459f1..5dbe51ae674895dcff83269aa508223314cb8b82 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -132,8 +132,8 @@ static u16 yaffs_calc_name_sum(const char *name)
 
 static void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
 {
-       yaffs_ecc_cacl(data , spare->ecc1);
-       yaffs_ecc_cacl(&data[256] , spare->ecc2);
+       yaffs_ecc_calc(data , spare->ecc1);
+       yaffs_ecc_calc(&data[256] , spare->ecc2);
 }
 
 static void yaffs_calc_tags_ecc(struct yaffs_tags *tags)
@@ -275,54 +275,33 @@ static void object_header_little_to_big_endian(struct yaffs_obj_hdr* oh)
     oh->sum_no_longer_used = SWAP16(oh->sum_no_longer_used); // u16 - Not used, but done for completeness.
     // name = skip. Char array. Not swapped.
     oh->yst_mode = SWAP32(oh->yst_mode);
-#ifdef CONFIG_YAFFS_WINCE // WinCE doesn't implement this, but we need to just in case. 
-    // In fact, WinCE would be *THE* place where this would be an issue!
-    oh->not_for_wince[0] = SWAP32(oh->not_for_wince[0]);
-    oh->not_for_wince[1] = SWAP32(oh->not_for_wince[1]);
-    oh->not_for_wince[2] = SWAP32(oh->not_for_wince[2]);
-    oh->not_for_wince[3] = SWAP32(oh->not_for_wince[3]);
-    oh->not_for_wince[4] = SWAP32(oh->not_for_wince[4]);
-#else
+
     // Regular POSIX.
     oh->yst_uid = SWAP32(oh->yst_uid);
     oh->yst_gid = SWAP32(oh->yst_gid);
     oh->yst_atime = SWAP32(oh->yst_atime);
     oh->yst_mtime = SWAP32(oh->yst_mtime);
     oh->yst_ctime = SWAP32(oh->yst_ctime);
-#endif
 
     oh->file_size = SWAP32(oh->file_size); // Aiee. An int... signed, at that!
     oh->equiv_id = SWAP32(oh->equiv_id);
     // alias  - char array.
     oh->yst_rdev = SWAP32(oh->yst_rdev);
 
-#ifdef CONFIG_YAFFS_WINCE
     oh->win_ctime[0] = SWAP32(oh->win_ctime[0]);
     oh->win_ctime[1] = SWAP32(oh->win_ctime[1]);
     oh->win_atime[0] = SWAP32(oh->win_atime[0]);
     oh->win_atime[1] = SWAP32(oh->win_atime[1]);
     oh->win_mtime[0] = SWAP32(oh->win_mtime[0]);
     oh->win_mtime[1] = SWAP32(oh->win_mtime[1]);
-    oh->room_to_grow[0] = SWAP32(oh->room_to_grow[0]);
-    oh->room_to_grow[1] = SWAP32(oh->room_to_grow[1]);
-    oh->room_to_grow[2] = SWAP32(oh->room_to_grow[2]);
-    oh->room_to_grow[3] = SWAP32(oh->room_to_grow[3]);
-    oh->room_to_grow[4] = SWAP32(oh->room_to_grow[4]);
-    oh->room_to_grow[5] = SWAP32(oh->room_to_grow[5]);
-#else
-    oh->room_to_grow[0] = SWAP32(oh->room_to_grow[0]);
-    oh->room_to_grow[1] = SWAP32(oh->room_to_grow[1]);
-    oh->room_to_grow[2] = SWAP32(oh->room_to_grow[2]);
-    oh->room_to_grow[3] = SWAP32(oh->room_to_grow[3]);
-    oh->room_to_grow[4] = SWAP32(oh->room_to_grow[4]);
-    oh->room_to_grow[5] = SWAP32(oh->room_to_grow[5]);
-    oh->room_to_grow[6] = SWAP32(oh->room_to_grow[6]);
-    oh->room_to_grow[7] = SWAP32(oh->room_to_grow[7]);
-    oh->room_to_grow[8] = SWAP32(oh->room_to_grow[8]);
-    oh->room_to_grow[9] = SWAP32(oh->room_to_grow[9]);
-    oh->room_to_grow[10] = SWAP32(oh->room_to_grow[10]);
-    oh->room_to_grow[11] = SWAP32(oh->room_to_grow[11]);
-#endif
+
+    oh->reserved[0] = SWAP32(oh->reserved[0]);
+    oh->reserved[1] = SWAP32(oh->reserved[1]);
+
+    oh->inband_shadowed_obj_id = SWAP32(oh->inband_shadowed_obj_id);
+    oh->inband_is_shrink = SWAP32(oh->inband_is_shrink);
+    oh->shadows_obj = SWAP32(oh->shadows_obj);
+    oh->is_shrink = SWAP32(oh->is_shrink);
 }
 
 static int write_object_header(int obj_id, enum yaffs_obj_type t, struct stat *s, int parent, const char *name, int equivalentObj, const char * alias)
similarity index 56%
rename from yaffs_tagsvalidity.h
rename to utils/yutilsenv.h
index 36a021fc8fa8bf07bcd4fa8f8f003901056a4121..487573fc6cf30b8a9771822b983629d6c6110c9d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
  */
 
-#ifndef __YAFFS_TAGS_VALIDITY_H__
-#define __YAFFS_TAGS_VALIDITY_H__
 
-#include "yaffs_guts.h"
+#ifndef __YAFFS_UTILSENV_H__
+#define __YAFFS_UTILSENV_H__
 
-void yaffs_init_tags(struct yaffs_ext_tags *tags);
-int yaffs_validate_tags(struct yaffs_ext_tags *tags);
+#define YCHAR char
+#define YUCHAR unsigned char
+
+#include <sys/types.h>
+#include <string.h>
+#include "yaffs_list.h"
+#include "yaffs_hweight.h"
+
+#define hweight8(x) yaffs_hweight8(x)
+#define hweight32(x) yaffs_hweight32(x)
+
+#define yaffs_trace(...) do {} while (0)
 #endif
index f9cd5becd8f470fc76302ec5498b077fa6c631d9..c8f2861c53ee928159657b620fb9c11f913f2324 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 #include "yaffs_trace.h"
 #include "yportenv.h"
 
-#ifdef CONFIG_YAFFS_KMALLOC_ALLOCATOR
-
-void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
-{
-       dev = dev;
-}
-
-void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
-{
-       dev = dev;
-}
-
-struct yaffs_tnode *yaffs_alloc_raw_tnode(struct yaffs_dev *dev)
-{
-       return (struct yaffs_tnode *)kmalloc(dev->tnode_size, GFP_NOFS);
-}
-
-void yaffs_free_raw_tnode(struct yaffs_dev *dev, struct yaffs_tnode *tn)
-{
-       dev = dev;
-       kfree(tn);
-}
-
-void yaffs_init_raw_objs(struct yaffs_dev *dev)
-{
-       dev = dev;
-}
-
-void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
-{
-       dev = dev;
-}
-
-struct yaffs_obj *yaffs_alloc_raw_obj(struct yaffs_dev *dev)
-{
-       dev = dev;
-       return (struct yaffs_obj *)kmalloc(sizeof(struct yaffs_obj));
-}
-
-void yaffs_free_raw_obj(struct yaffs_dev *dev, struct yaffs_obj *obj)
-{
-
-       dev = dev;
-       kfree(obj);
-}
-
-#else
+/*
+ * Each entry in yaffs_tnode_list and yaffs_obj_list hold blocks
+ * of approx 100 objects that are themn allocated singly.
+ * This is basically a simplified slab allocator.
+ *
+ * We don't use the Linux slab allocator because slab does not allow
+ * us to dump all the objects in one hit when we do a umount and tear
+ * down  all the tnodes and objects. slab requires that we first free
+ * the individual objects.
+ *
+ * Once yaffs has been mainlined I shall try to motivate for a change
+ * to slab to provide the extra features we need here.
+ */
 
 struct yaffs_tnode_list {
        struct yaffs_tnode_list *next;
@@ -81,7 +47,7 @@ struct yaffs_allocator {
        struct yaffs_tnode_list *alloc_tnode_list;
 
        int n_obj_created;
-       struct yaffs_obj *free_objs;
+       struct list_head free_objs;
        int n_free_objects;
 
        struct yaffs_obj_list *allocated_obj_list;
@@ -89,14 +55,12 @@ struct yaffs_allocator {
 
 static void yaffs_deinit_raw_tnodes(struct yaffs_dev *dev)
 {
-
        struct yaffs_allocator *allocator =
            (struct yaffs_allocator *)dev->allocator;
-
        struct yaffs_tnode_list *tmp;
 
        if (!allocator) {
-               YBUG();
+               BUG();
                return;
        }
 
@@ -106,7 +70,6 @@ static void yaffs_deinit_raw_tnodes(struct yaffs_dev *dev)
                kfree(allocator->alloc_tnode_list->tnodes);
                kfree(allocator->alloc_tnode_list);
                allocator->alloc_tnode_list = tmp;
-
        }
 
        allocator->free_tnodes = NULL;
@@ -118,14 +81,15 @@ static void yaffs_init_raw_tnodes(struct yaffs_dev *dev)
 {
        struct yaffs_allocator *allocator = dev->allocator;
 
-       if (allocator) {
-               allocator->alloc_tnode_list = NULL;
-               allocator->free_tnodes = NULL;
-               allocator->n_free_tnodes = 0;
-               allocator->n_tnodes_created = 0;
-       } else {
-               YBUG();
+       if (!allocator) {
+               BUG();
+               return;
        }
+
+       allocator->alloc_tnode_list = NULL;
+       allocator->free_tnodes = NULL;
+       allocator->n_free_tnodes = 0;
+       allocator->n_tnodes_created = 0;
 }
 
 static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
@@ -140,7 +104,7 @@ static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
        struct yaffs_tnode_list *tnl;
 
        if (!allocator) {
-               YBUG();
+               BUG();
                return YAFFS_FAIL;
        }
 
@@ -148,7 +112,6 @@ static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
                return YAFFS_OK;
 
        /* make these things */
-
        new_tnodes = kmalloc(n_tnodes * dev->tnode_size, GFP_NOFS);
        mem = (u8 *) new_tnodes;
 
@@ -176,7 +139,6 @@ static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
         * NB If we can't add this to the management list it isn't fatal
         * but it just means we can't free this bunch of tnodes later.
         */
-
        tnl = kmalloc(sizeof(struct yaffs_tnode_list), GFP_NOFS);
        if (!tnl) {
                yaffs_trace(YAFFS_TRACE_ERROR,
@@ -188,7 +150,7 @@ static int yaffs_create_tnodes(struct yaffs_dev *dev, int n_tnodes)
                allocator->alloc_tnode_list = tnl;
        }
 
-       yaffs_trace(YAFFS_TRACE_ALLOCATE,"Tnodes added");
+       yaffs_trace(YAFFS_TRACE_ALLOCATE, "Tnodes added");
 
        return YAFFS_OK;
 }
@@ -200,7 +162,7 @@ struct yaffs_tnode *yaffs_alloc_raw_tnode(struct yaffs_dev *dev)
        struct yaffs_tnode *tn = NULL;
 
        if (!allocator) {
-               YBUG();
+               BUG();
                return NULL;
        }
 
@@ -223,7 +185,7 @@ void yaffs_free_raw_tnode(struct yaffs_dev *dev, struct yaffs_tnode *tn)
        struct yaffs_allocator *allocator = dev->allocator;
 
        if (!allocator) {
-               YBUG();
+               BUG();
                return;
        }
 
@@ -235,17 +197,24 @@ void yaffs_free_raw_tnode(struct yaffs_dev *dev, struct yaffs_tnode *tn)
        dev->checkpoint_blocks_required = 0;    /* force recalculation */
 }
 
+/*--------------- yaffs_obj alloaction ------------------------
+ *
+ * Free yaffs_objs are stored in a list using obj->siblings.
+ * The blocks of allocated objects are stored in a linked list.
+ */
+
 static void yaffs_init_raw_objs(struct yaffs_dev *dev)
 {
        struct yaffs_allocator *allocator = dev->allocator;
 
-       if (allocator) {
-               allocator->allocated_obj_list = NULL;
-               allocator->free_objs = NULL;
-               allocator->n_free_objects = 0;
-       } else {
-               YBUG();
+       if (!allocator) {
+               BUG();
+               return;
        }
+
+       allocator->allocated_obj_list = NULL;
+       INIT_LIST_HEAD(&allocator->free_objs);
+       allocator->n_free_objects = 0;
 }
 
 static void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
@@ -254,7 +223,7 @@ static void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
        struct yaffs_obj_list *tmp;
 
        if (!allocator) {
-               YBUG();
+               BUG();
                return;
        }
 
@@ -262,11 +231,10 @@ static void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
                tmp = allocator->allocated_obj_list->next;
                kfree(allocator->allocated_obj_list->objects);
                kfree(allocator->allocated_obj_list);
-
                allocator->allocated_obj_list = tmp;
        }
 
-       allocator->free_objs = NULL;
+       INIT_LIST_HEAD(&allocator->free_objs);
        allocator->n_free_objects = 0;
        allocator->n_obj_created = 0;
 }
@@ -274,13 +242,12 @@ static void yaffs_deinit_raw_objs(struct yaffs_dev *dev)
 static int yaffs_create_free_objs(struct yaffs_dev *dev, int n_obj)
 {
        struct yaffs_allocator *allocator = dev->allocator;
-
        int i;
        struct yaffs_obj *new_objs;
        struct yaffs_obj_list *list;
 
        if (!allocator) {
-               YBUG();
+               BUG();
                return YAFFS_FAIL;
        }
 
@@ -292,27 +259,19 @@ static int yaffs_create_free_objs(struct yaffs_dev *dev, int n_obj)
        list = kmalloc(sizeof(struct yaffs_obj_list), GFP_NOFS);
 
        if (!new_objs || !list) {
-               if (new_objs) {
-                       kfree(new_objs);
-                       new_objs = NULL;
-               }
-               if (list) {
-                       kfree(list);
-                       list = NULL;
-               }
+               kfree(new_objs);
+               new_objs = NULL;
+               kfree(list);
+               list = NULL;
                yaffs_trace(YAFFS_TRACE_ALLOCATE,
                        "Could not allocate more objects");
                return YAFFS_FAIL;
        }
 
        /* Hook them into the free list */
-       for (i = 0; i < n_obj - 1; i++) {
-               new_objs[i].siblings.next =
-                   (struct list_head *)(&new_objs[i + 1]);
-       }
+       for (i = 0; i < n_obj; i++)
+               list_add(&new_objs[i].siblings, &allocator->free_objs);
 
-       new_objs[n_obj - 1].siblings.next = (void *)allocator->free_objs;
-       allocator->free_objs = new_objs;
        allocator->n_free_objects += n_obj;
        allocator->n_obj_created += n_obj;
 
@@ -328,21 +287,22 @@ static int yaffs_create_free_objs(struct yaffs_dev *dev, int n_obj)
 struct yaffs_obj *yaffs_alloc_raw_obj(struct yaffs_dev *dev)
 {
        struct yaffs_obj *obj = NULL;
+       struct list_head *lh;
        struct yaffs_allocator *allocator = dev->allocator;
 
        if (!allocator) {
-               YBUG();
+               BUG();
                return obj;
        }
 
        /* If there are none left make more */
-       if (!allocator->free_objs)
+       if (list_empty(&allocator->free_objs))
                yaffs_create_free_objs(dev, YAFFS_ALLOCATION_NOBJECTS);
 
-       if (allocator->free_objs) {
-               obj = allocator->free_objs;
-               allocator->free_objs =
-                   (struct yaffs_obj *)(allocator->free_objs->siblings.next);
+       if (!list_empty(&allocator->free_objs)) {
+               lh = allocator->free_objs.next;
+               obj = list_entry(lh, struct yaffs_obj, siblings);
+               list_del_init(lh);
                allocator->n_free_objects--;
        }
 
@@ -354,43 +314,44 @@ void yaffs_free_raw_obj(struct yaffs_dev *dev, struct yaffs_obj *obj)
 
        struct yaffs_allocator *allocator = dev->allocator;
 
-       if (!allocator)
-               YBUG();
-       else {
-               /* Link into the free list. */
-               obj->siblings.next = (struct list_head *)(allocator->free_objs);
-               allocator->free_objs = obj;
-               allocator->n_free_objects++;
+       if (!allocator) {
+               BUG();
+               return;
        }
+
+       /* Link into the free list. */
+       list_add(&obj->siblings, &allocator->free_objs);
+       allocator->n_free_objects++;
 }
 
 void yaffs_deinit_raw_tnodes_and_objs(struct yaffs_dev *dev)
 {
-       if (dev->allocator) {
-               yaffs_deinit_raw_tnodes(dev);
-               yaffs_deinit_raw_objs(dev);
 
-               kfree(dev->allocator);
-               dev->allocator = NULL;
-       } else {
-               YBUG();
+       if (!dev->allocator) {
+               BUG();
+               return;
        }
+
+       yaffs_deinit_raw_tnodes(dev);
+       yaffs_deinit_raw_objs(dev);
+       kfree(dev->allocator);
+       dev->allocator = NULL;
 }
 
 void yaffs_init_raw_tnodes_and_objs(struct yaffs_dev *dev)
 {
        struct yaffs_allocator *allocator;
 
-       if (!dev->allocator) {
-               allocator = kmalloc(sizeof(struct yaffs_allocator), GFP_NOFS);
-               if (allocator) {
-                       dev->allocator = allocator;
-                       yaffs_init_raw_tnodes(dev);
-                       yaffs_init_raw_objs(dev);
-               }
-       } else {
-               YBUG();
+       if (dev->allocator) {
+               BUG();
+               return;
+       }
+
+       allocator = kmalloc(sizeof(struct yaffs_allocator), GFP_NOFS);
+       if (allocator) {
+               dev->allocator = allocator;
+               yaffs_init_raw_tnodes(dev);
+               yaffs_init_raw_objs(dev);
        }
 }
 
-#endif
index 4d5f2aec89ff64c3ebf560d8fbec60aa2c93edca..a8cc3226421f7af8b923ca1bb494b9e56772a9e7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 9b47d376310c5acba0fe1614a8b52add6ee94ea0..fe914e558b64cba94ef599e8b463cde40bf8117b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 33d541d69441b430a8629f6a62b5e78559f4b520..5b21b085b73397d8e4862baec9bf61d93c09a293 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 7df42cd0066ed84aa29836948516dd130ac23b7b..4440e930d6bcd802a282c79651d9c00b9643be5d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -23,7 +23,7 @@ static inline u8 *yaffs_block_bits(struct yaffs_dev *dev, int blk)
                yaffs_trace(YAFFS_TRACE_ERROR,
                        "BlockBits block %d is not valid",
                        blk);
-               YBUG();
+               BUG();
        }
        return dev->chunk_bits +
            (dev->chunk_bit_stride * (blk - dev->internal_start_block));
@@ -36,7 +36,7 @@ void yaffs_verify_chunk_bit_id(struct yaffs_dev *dev, int blk, int chunk)
                yaffs_trace(YAFFS_TRACE_ERROR,
                        "Chunk Id (%d:%d) invalid",
                        blk, chunk);
-               YBUG();
+               BUG();
        }
 }
 
@@ -52,7 +52,6 @@ void yaffs_clear_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
        u8 *blk_bits = yaffs_block_bits(dev, blk);
 
        yaffs_verify_chunk_bit_id(dev, blk, chunk);
-
        blk_bits[chunk / 8] &= ~(1 << (chunk & 7));
 }
 
@@ -61,15 +60,14 @@ void yaffs_set_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
        u8 *blk_bits = yaffs_block_bits(dev, blk);
 
        yaffs_verify_chunk_bit_id(dev, blk, chunk);
-
        blk_bits[chunk / 8] |= (1 << (chunk & 7));
 }
 
 int yaffs_check_chunk_bit(struct yaffs_dev *dev, int blk, int chunk)
 {
        u8 *blk_bits = yaffs_block_bits(dev, blk);
-       yaffs_verify_chunk_bit_id(dev, blk, chunk);
 
+       yaffs_verify_chunk_bit_id(dev, blk, chunk);
        return (blk_bits[chunk / 8] & (1 << (chunk & 7))) ? 1 : 0;
 }
 
@@ -77,6 +75,7 @@ int yaffs_still_some_chunks(struct yaffs_dev *dev, int blk)
 {
        u8 *blk_bits = yaffs_block_bits(dev, blk);
        int i;
+
        for (i = 0; i < dev->chunk_bit_stride; i++) {
                if (*blk_bits)
                        return 1;
index cf9ea58da0d93cefd0ef9b8c9530127f351f7413..e26b37d89ae4729ade0e8fba5dea9ae307913969 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 4e40f437e655e8a04873c325f608a8cdd64238a2..997a618aee86c80435e722a22e87a58f7bc9b620 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -44,7 +44,7 @@ static int yaffs_checkpt_erase(struct yaffs_dev *dev)
 
                        if (dev->param.
                            erase_fn(dev,
-                                    i - dev->block_offset /* realign */ )) {
+                                    i - dev->block_offset /* realign */)) {
                                bi->block_state = YAFFS_BLOCK_STATE_EMPTY;
                                dev->n_erased_blocks++;
                                dev->n_free_chunks +=
@@ -65,6 +65,7 @@ static void yaffs2_checkpt_find_erased_block(struct yaffs_dev *dev)
 {
        int i;
        int blocks_avail = dev->n_erased_blocks - dev->param.n_reserved_blocks;
+
        yaffs_trace(YAFFS_TRACE_CHECKPOINT,
                "allocating checkpt block: erased %d reserved %d avail %d next %d ",
                dev->n_erased_blocks, dev->param.n_reserved_blocks,
@@ -136,6 +137,7 @@ static void yaffs2_checkpt_find_block(struct yaffs_dev *dev)
 
 int yaffs2_checkpt_open(struct yaffs_dev *dev, int writing)
 {
+       int i;
 
        dev->checkpt_open_write = writing;
 
@@ -167,32 +169,32 @@ int yaffs2_checkpt_open(struct yaffs_dev *dev, int writing)
                memset(dev->checkpt_buffer, 0, dev->data_bytes_per_chunk);
                dev->checkpt_byte_offs = 0;
                return yaffs_checkpt_erase(dev);
-       } else {
-               int i;
-               /* Set to a value that will kick off a read */
-               dev->checkpt_byte_offs = dev->data_bytes_per_chunk;
-               /* A checkpoint block list of 1 checkpoint block per 16 block is (hopefully)
-                * going to be way more than we need */
-               dev->blocks_in_checkpt = 0;
-               dev->checkpt_max_blocks =
-                   (dev->internal_end_block - dev->internal_start_block) / 16 +
-                   2;
-               dev->checkpt_block_list =
-                   kmalloc(sizeof(int) * dev->checkpt_max_blocks, GFP_NOFS);
-               if (!dev->checkpt_block_list)
-                       return 0;
-
-               for (i = 0; i < dev->checkpt_max_blocks; i++)
-                       dev->checkpt_block_list[i] = -1;
        }
 
+       /* Set to a value that will kick off a read */
+       dev->checkpt_byte_offs = dev->data_bytes_per_chunk;
+       /* A checkpoint block list of 1 checkpoint block per 16 block is
+        * (hopefully) going to be way more than we need */
+       dev->blocks_in_checkpt = 0;
+       dev->checkpt_max_blocks =
+           (dev->internal_end_block - dev->internal_start_block) / 16 + 2;
+       dev->checkpt_block_list =
+           kmalloc(sizeof(int) * dev->checkpt_max_blocks, GFP_NOFS);
+
+       if (!dev->checkpt_block_list)
+               return 0;
+
+       for (i = 0; i < dev->checkpt_max_blocks; i++)
+               dev->checkpt_block_list[i] = -1;
+
        return 1;
 }
 
 int yaffs2_get_checkpt_sum(struct yaffs_dev *dev, u32 * sum)
 {
        u32 composite_sum;
-       composite_sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xFF);
+
+       composite_sum = (dev->checkpt_sum << 8) | (dev->checkpt_xor & 0xff);
        *sum = composite_sum;
        return 1;
 }
@@ -201,7 +203,6 @@ static int yaffs2_checkpt_flush_buffer(struct yaffs_dev *dev)
 {
        int chunk;
        int realigned_chunk;
-
        struct yaffs_ext_tags tags;
 
        if (dev->checkpt_cur_block < 0) {
@@ -257,7 +258,6 @@ int yaffs2_checkpt_wr(struct yaffs_dev *dev, const void *data, int n_bytes)
 {
        int i = 0;
        int ok = 1;
-
        u8 *data_bytes = (u8 *) data;
 
        if (!dev->checkpt_buffer)
@@ -289,10 +289,8 @@ int yaffs2_checkpt_rd(struct yaffs_dev *dev, void *data, int n_bytes)
        int i = 0;
        int ok = 1;
        struct yaffs_ext_tags tags;
-
        int chunk;
        int realigned_chunk;
-
        u8 *data_bytes = (u8 *) data;
 
        if (!dev->checkpt_buffer)
@@ -311,50 +309,47 @@ int yaffs2_checkpt_rd(struct yaffs_dev *dev, void *data, int n_bytes)
                                dev->checkpt_cur_chunk = 0;
                        }
 
-                       if (dev->checkpt_cur_block < 0)
+                       if (dev->checkpt_cur_block < 0) {
                                ok = 0;
-                       else {
-                               chunk = dev->checkpt_cur_block *
-                                   dev->param.chunks_per_block +
-                                   dev->checkpt_cur_chunk;
-
-                               realigned_chunk = chunk - dev->chunk_offset;
-
-                               dev->n_page_reads++;
-
-                               /* read in the next chunk */
-                               dev->param.read_chunk_tags_fn(dev,
-                                                             realigned_chunk,
-                                                             dev->
-                                                             checkpt_buffer,
-                                                             &tags);
-
-                               if (tags.chunk_id != (dev->checkpt_page_seq + 1)
-                                   || tags.ecc_result > YAFFS_ECC_RESULT_FIXED
-                                   || tags.seq_number !=
-                                   YAFFS_SEQUENCE_CHECKPOINT_DATA)
-                                       ok = 0;
-
-                               dev->checkpt_byte_offs = 0;
-                               dev->checkpt_page_seq++;
-                               dev->checkpt_cur_chunk++;
-
-                               if (dev->checkpt_cur_chunk >=
-                                   dev->param.chunks_per_block)
-                                       dev->checkpt_cur_block = -1;
+                               break;
                        }
-               }
 
-               if (ok) {
-                       *data_bytes =
-                           dev->checkpt_buffer[dev->checkpt_byte_offs];
-                       dev->checkpt_sum += *data_bytes;
-                       dev->checkpt_xor ^= *data_bytes;
-                       dev->checkpt_byte_offs++;
-                       i++;
-                       data_bytes++;
-                       dev->checkpt_byte_count++;
+                       chunk = dev->checkpt_cur_block *
+                           dev->param.chunks_per_block +
+                           dev->checkpt_cur_chunk;
+
+                       realigned_chunk = chunk - dev->chunk_offset;
+                       dev->n_page_reads++;
+
+                       /* read in the next chunk */
+                       dev->param.read_chunk_tags_fn(dev,
+                                               realigned_chunk,
+                                               dev->checkpt_buffer,
+                                               &tags);
+
+                       if (tags.chunk_id != (dev->checkpt_page_seq + 1) ||
+                           tags.ecc_result > YAFFS_ECC_RESULT_FIXED ||
+                           tags.seq_number != YAFFS_SEQUENCE_CHECKPOINT_DATA) {
+                               ok = 0;
+                               break;
+                       }
+
+                       dev->checkpt_byte_offs = 0;
+                       dev->checkpt_page_seq++;
+                       dev->checkpt_cur_chunk++;
+
+                       if (dev->checkpt_cur_chunk >=
+                                       dev->param.chunks_per_block)
+                               dev->checkpt_cur_block = -1;
                }
+
+               *data_bytes = dev->checkpt_buffer[dev->checkpt_byte_offs];
+               dev->checkpt_sum += *data_bytes;
+               dev->checkpt_xor ^= *data_bytes;
+               dev->checkpt_byte_offs++;
+               i++;
+               data_bytes++;
+               dev->checkpt_byte_count++;
        }
 
        return i;
@@ -362,35 +357,33 @@ int yaffs2_checkpt_rd(struct yaffs_dev *dev, void *data, int n_bytes)
 
 int yaffs_checkpt_close(struct yaffs_dev *dev)
 {
+       int i;
 
        if (dev->checkpt_open_write) {
                if (dev->checkpt_byte_offs != 0)
                        yaffs2_checkpt_flush_buffer(dev);
        } else if (dev->checkpt_block_list) {
-               int i;
                for (i = 0;
-                    i < dev->blocks_in_checkpt
-                    && dev->checkpt_block_list[i] >= 0; i++) {
+                    i < dev->blocks_in_checkpt &&
+                    dev->checkpt_block_list[i] >= 0; i++) {
                        int blk = dev->checkpt_block_list[i];
                        struct yaffs_block_info *bi = NULL;
-                       if (dev->internal_start_block <= blk
-                           && blk <= dev->internal_end_block)
+
+                       if (dev->internal_start_block <= blk &&
+                           blk <= dev->internal_end_block)
                                bi = yaffs_get_block_info(dev, blk);
                        if (bi && bi->block_state == YAFFS_BLOCK_STATE_EMPTY)
                                bi->block_state = YAFFS_BLOCK_STATE_CHECKPOINT;
-                       else {
-                               /* Todo this looks odd... */
-                       }
                }
                kfree(dev->checkpt_block_list);
                dev->checkpt_block_list = NULL;
        }
 
        dev->n_free_chunks -=
-           dev->blocks_in_checkpt * dev->param.chunks_per_block;
+               dev->blocks_in_checkpt * dev->param.chunks_per_block;
        dev->n_erased_blocks -= dev->blocks_in_checkpt;
 
-       yaffs_trace(YAFFS_TRACE_CHECKPOINT,"checkpoint byte count %d",
+       yaffs_trace(YAFFS_TRACE_CHECKPOINT, "checkpoint byte count %d",
                dev->checkpt_byte_count);
 
        if (dev->checkpt_buffer) {
@@ -400,7 +393,7 @@ int yaffs_checkpt_close(struct yaffs_dev *dev)
                return 1;
        } else {
                return 0;
-        }
+       }
 }
 
 int yaffs2_checkpt_invalidate_stream(struct yaffs_dev *dev)
index 361c6067717eebb504784b4ba6586cb5a23035f0..cdbaba7153ed5832a29c238ab338ef72534c0ef1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index e95a8069a8c5bc0c754b9f41ddbc9944e0b76f98..9294107c150d261bbb6c90c8c78b6590ba4b97a4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
  *
  * The ECC comprises 22 bits of parity information and is stuffed into 3 bytes.
  * The two unused bit are set to 1.
- * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC
- * blocks are used on a 512-byte NAND page.
+ * The ECC can correct single bit errors in a 256-byte page of data. Thus, two
+ * such ECC blocks are used on a 512-byte NAND page.
  *
  */
 
+#include "yportenv.h"
+
+#include "yaffs_ecc.h"
+
 /* Table generated by gen-ecc.c
  * Using a table means we do not have to calculate p1..p4 and p1'..p4'
  * for each byte of data. These are instead provided in a table in bits7..2.
- * Bit 0 of each entry indicates whether the entry has an odd or even parity, and therefore
- * this bytes influence on the line parity.
+ * Bit 0 of each entry indicates whether the entry has an odd or even parity,
+ * and therefore this bytes influence on the line parity.
  */
 
-#include "yportenv.h"
-
-#include "yaffs_ecc.h"
-
 static const unsigned char column_parity_table[] = {
        0x00, 0x55, 0x59, 0x0c, 0x65, 0x30, 0x3c, 0x69,
        0x69, 0x3c, 0x30, 0x65, 0x0c, 0x59, 0x55, 0x00,
@@ -69,10 +69,9 @@ static const unsigned char column_parity_table[] = {
 
 
 /* Calculate the ECC for a 256-byte block of data */
-void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc)
+void yaffs_ecc_calc(const unsigned char *data, unsigned char *ecc)
 {
        unsigned int i;
-
        unsigned char col_parity = 0;
        unsigned char line_parity = 0;
        unsigned char line_parity_prime = 0;
@@ -129,12 +128,6 @@ void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc)
                t |= 0x01;
        ecc[0] = ~t;
 
-#ifdef CONFIG_YAFFS_ECC_WRONG_ORDER
-       /* Swap the bytes into the wrong order */
-       t = ecc[0];
-       ecc[0] = ecc[1];
-       ecc[1] = t;
-#endif
 }
 
 /* Correct the ECC on a 256 byte block of data */
@@ -159,15 +152,6 @@ int yaffs_ecc_correct(unsigned char *data, unsigned char *read_ecc,
                unsigned byte;
                unsigned bit;
 
-#ifdef CONFIG_YAFFS_ECC_WRONG_ORDER
-               /* swap the bytes to correct for the wrong order */
-               unsigned char t;
-
-               t = d0;
-               d0 = d1;
-               d1 = t;
-#endif
-
                bit = byte = 0;
 
                if (d1 & 0x80)
@@ -222,7 +206,6 @@ void yaffs_ecc_calc_other(const unsigned char *data, unsigned n_bytes,
                          struct yaffs_ecc_other *ecc_other)
 {
        unsigned int i;
-
        unsigned char col_parity = 0;
        unsigned line_parity = 0;
        unsigned line_parity_prime = 0;
index b0c461d699e674159363119b4ef999c8c6fddadb..17d47bd80f3e3eddc254bacedfea65b312443e70 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -18,8 +18,8 @@
  *
  * The ECC comprises 22 bits of parity information and is stuffed into 3 bytes.
  * The two unused bit are set to 1.
- * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC
- * blocks are used on a 512-byte NAND page.
+ * The ECC can correct single bit errors in a 256-byte page of data.
+ * Thus, two such ECC blocks are used on a 512-byte NAND page.
  *
  */
 
@@ -32,7 +32,7 @@ struct yaffs_ecc_other {
        unsigned line_parity_prime;
 };
 
-void yaffs_ecc_cacl(const unsigned char *data, unsigned char *ecc);
+void yaffs_ecc_calc(const unsigned char *data, unsigned char *ecc);
 int yaffs_ecc_correct(unsigned char *data, unsigned char *read_ecc,
                      const unsigned char *test_ecc);
 
index d87acbde997cf741996eec715f4579bc4802294b..8fd0802bdddbfc4721eb1b29effd099c472710fb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -27,7 +27,7 @@ static inline struct yaffs_block_info *yaffs_get_block_info(struct yaffs_dev
                yaffs_trace(YAFFS_TRACE_ERROR,
                        "**>> yaffs: get_block_info block %d is not valid",
                        blk);
-               YBUG();
+               BUG();
        }
        return &dev->block_info[blk - dev->internal_start_block];
 }
index 486b7e05d0713fd2831a22b705f1df907883c42d..9ade09b54e51680c7c507b3bc21566108144bbc6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 #include "yaffs_trace.h"
 
 #include "yaffs_guts.h"
-#include "yaffs_tagsvalidity.h"
 #include "yaffs_getblockinfo.h"
-
 #include "yaffs_tagscompat.h"
-
 #include "yaffs_nand.h"
-
 #include "yaffs_yaffs1.h"
 #include "yaffs_yaffs2.h"
 #include "yaffs_bitmap.h"
 #include "yaffs_verify.h"
-
 #include "yaffs_nand.h"
 #include "yaffs_packedtags2.h"
-
 #include "yaffs_nameval.h"
 #include "yaffs_allocator.h"
-
 #include "yaffs_attribs.h"
+#include "yaffs_summary.h"
 
 /* Note YAFFS_GC_GOOD_ENOUGH must be <= YAFFS_GC_PASSIVE_THRESHOLD */
 #define YAFFS_GC_GOOD_ENOUGH 2
 /* Forward declarations */
 
 static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
-                            const u8 * buffer, int n_bytes, int use_reserve);
+                            const u8 *buffer, int n_bytes, int use_reserve);
 
 
 
 /* Function to calculate chunk and offset */
 
-static void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr,
-                               int *chunk_out, u32 * offset_out)
+static inline void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr,
+                                       int *chunk_out, u32 *offset_out)
 {
        int chunk;
        u32 offset;
@@ -82,7 +76,7 @@ static void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr,
  * be hellishly efficient.
  */
 
-static u32 calc_shifts_ceiling(u32 x)
+static inline u32 calc_shifts_ceiling(u32 x)
 {
        int extra_bits;
        int shifts;
@@ -105,7 +99,7 @@ static u32 calc_shifts_ceiling(u32 x)
 /* Function to return the number of shifts to get a 1 in bit 0
  */
 
-static u32 calc_shifts(u32 x)
+static inline u32 calc_shifts(u32 x)
 {
        u32 shifts;
 
@@ -134,42 +128,30 @@ static int yaffs_init_tmp_buffers(struct yaffs_dev *dev)
        memset(dev->temp_buffer, 0, sizeof(dev->temp_buffer));
 
        for (i = 0; buf && i < YAFFS_N_TEMP_BUFFERS; i++) {
-               dev->temp_buffer[i].line = 0;   /* not in use */
-               dev->temp_buffer[i].buffer = buf =
-                   kmalloc(dev->param.total_bytes_per_chunk, GFP_NOFS);
+               dev->temp_buffer[i].in_use = 0;
+               buf = kmalloc(dev->param.total_bytes_per_chunk, GFP_NOFS);
+               dev->temp_buffer[i].buffer = buf;
        }
 
        return buf ? YAFFS_OK : YAFFS_FAIL;
 }
 
-u8 *yaffs_get_temp_buffer(struct yaffs_dev * dev, int line_no)
+u8 *yaffs_get_temp_buffer(struct yaffs_dev * dev)
 {
-       int i, j;
+       int i;
 
        dev->temp_in_use++;
        if (dev->temp_in_use > dev->max_temp)
                dev->max_temp = dev->temp_in_use;
 
        for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) {
-               if (dev->temp_buffer[i].line == 0) {
-                       dev->temp_buffer[i].line = line_no;
-                       if ((i + 1) > dev->max_temp) {
-                               dev->max_temp = i + 1;
-                               for (j = 0; j <= i; j++)
-                                       dev->temp_buffer[j].max_line =
-                                           dev->temp_buffer[j].line;
-                       }
-
+               if (dev->temp_buffer[i].in_use == 0) {
+                       dev->temp_buffer[i].in_use = 1;
                        return dev->temp_buffer[i].buffer;
                }
        }
 
-       yaffs_trace(YAFFS_TRACE_BUFFERS,
-               "Out of temp buffers at line %d, other held by lines:",
-               line_no);
-       for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++)
-               yaffs_trace(YAFFS_TRACE_BUFFERS," %d", dev->temp_buffer[i].line);
-
+       yaffs_trace(YAFFS_TRACE_BUFFERS, "Out of temp buffers");
        /*
         * If we got here then we have to allocate an unmanaged one
         * This is not good.
@@ -180,7 +162,7 @@ u8 *yaffs_get_temp_buffer(struct yaffs_dev * dev, int line_no)
 
 }
 
-void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 * buffer, int line_no)
+void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 *buffer)
 {
        int i;
 
@@ -188,16 +170,14 @@ void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 * buffer, int line_no)
 
        for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) {
                if (dev->temp_buffer[i].buffer == buffer) {
-                       dev->temp_buffer[i].line = 0;
+                       dev->temp_buffer[i].in_use = 0;
                        return;
                }
        }
 
        if (buffer) {
                /* assume it is an unmanaged one. */
-               yaffs_trace(YAFFS_TRACE_BUFFERS,
-                 "Releasing unmanaged temp buffer in line %d",
-                  line_no);
+               yaffs_trace(YAFFS_TRACE_BUFFERS, "Releasing unmanaged temp buffer");
                kfree(buffer);
                dev->unmanaged_buffer_deallocs++;
        }
@@ -207,7 +187,7 @@ void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 * buffer, int line_no)
 /*
  * Determine if we have a managed buffer.
  */
-int yaffs_is_managed_tmp_buffer(struct yaffs_dev *dev, const u8 * buffer)
+int yaffs_is_managed_tmp_buffer(struct yaffs_dev *dev, const u8 *buffer)
 {
        int i;
 
@@ -235,7 +215,7 @@ int yaffs_is_managed_tmp_buffer(struct yaffs_dev *dev, const u8 * buffer)
  */
 
 static void yaffs_handle_chunk_wr_ok(struct yaffs_dev *dev, int nand_chunk,
-                                    const u8 * data,
+                                    const u8 *data,
                                     const struct yaffs_ext_tags *tags)
 {
        dev = dev;
@@ -261,8 +241,9 @@ void yaffs_handle_chunk_error(struct yaffs_dev *dev,
                bi->chunk_error_strikes++;
 
                if (bi->chunk_error_strikes > 3) {
-                       bi->needs_retiring = 1; /* Too many stikes, so retire this */
-                       yaffs_trace(YAFFS_TRACE_ALWAYS, "yaffs: Block struck out");
+                       bi->needs_retiring = 1; /* Too many stikes, so retire */
+                       yaffs_trace(YAFFS_TRACE_ALWAYS,
+                               "yaffs: Block struck out");
 
                }
        }
@@ -277,7 +258,8 @@ static void yaffs_handle_chunk_wr_error(struct yaffs_dev *dev, int nand_chunk,
        yaffs_handle_chunk_error(dev, bi);
 
        if (erased_ok) {
-               /* Was an actual write failure, so mark the block for retirement  */
+               /* Was an actual write failure,
+                * so mark the block for retirement.*/
                bi->needs_retiring = 1;
                yaffs_trace(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,
                  "**>> Block %d needs retiring", flash_block);
@@ -321,11 +303,11 @@ struct yaffs_obj *yaffs_lost_n_found(struct yaffs_dev *dev)
  *  Erased NAND checking functions
  */
 
-int yaffs_check_ff(u8 * buffer, int n_bytes)
+int yaffs_check_ff(u8 *buffer, int n_bytes)
 {
        /* Horrible, slow implementation */
        while (n_bytes--) {
-               if (*buffer != 0xFF)
+               if (*buffer != 0xff)
                        return 0;
                buffer++;
        }
@@ -335,7 +317,7 @@ int yaffs_check_ff(u8 * buffer, int n_bytes)
 static int yaffs_check_chunk_erased(struct yaffs_dev *dev, int nand_chunk)
 {
        int retval = YAFFS_OK;
-       u8 *data = yaffs_get_temp_buffer(dev, __LINE__);
+       u8 *data = yaffs_get_temp_buffer(dev);
        struct yaffs_ext_tags tags;
        int result;
 
@@ -346,11 +328,12 @@ static int yaffs_check_chunk_erased(struct yaffs_dev *dev, int nand_chunk)
 
        if (!yaffs_check_ff(data, dev->data_bytes_per_chunk) ||
                tags.chunk_used) {
-               yaffs_trace(YAFFS_TRACE_NANDACCESS, "Chunk %d not erased", nand_chunk);
+               yaffs_trace(YAFFS_TRACE_NANDACCESS,
+                       "Chunk %d not erased", nand_chunk);
                retval = YAFFS_FAIL;
        }
 
-       yaffs_release_temp_buffer(dev, data, __LINE__);
+       yaffs_release_temp_buffer(dev, data);
 
        return retval;
 
@@ -358,12 +341,12 @@ static int yaffs_check_chunk_erased(struct yaffs_dev *dev, int nand_chunk)
 
 static int yaffs_verify_chunk_written(struct yaffs_dev *dev,
                                      int nand_chunk,
-                                     const u8 * data,
+                                     const u8 *data,
                                      struct yaffs_ext_tags *tags)
 {
        int retval = YAFFS_OK;
        struct yaffs_ext_tags temp_tags;
-       u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+       u8 *buffer = yaffs_get_temp_buffer(dev);
        int result;
 
        result = yaffs_rd_chunk_tags_nand(dev, nand_chunk, buffer, &temp_tags);
@@ -373,7 +356,7 @@ static int yaffs_verify_chunk_written(struct yaffs_dev *dev,
            temp_tags.n_bytes != tags->n_bytes)
                retval = YAFFS_FAIL;
 
-       yaffs_release_temp_buffer(dev, buffer, __LINE__);
+       yaffs_release_temp_buffer(dev, buffer);
 
        return retval;
 }
@@ -388,7 +371,7 @@ int yaffs_check_alloc_available(struct yaffs_dev *dev, int n_chunks)
        checkpt_blocks = yaffs_calc_checkpt_blocks_required(dev);
 
        reserved_chunks =
-           ((reserved_blocks + checkpt_blocks) * dev->param.chunks_per_block);
+           (reserved_blocks + checkpt_blocks) * dev->param.chunks_per_block;
 
        return (dev->n_free_chunks > (reserved_chunks + n_chunks));
 }
@@ -396,7 +379,6 @@ int yaffs_check_alloc_available(struct yaffs_dev *dev, int n_chunks)
 static int yaffs_find_alloc_block(struct yaffs_dev *dev)
 {
        int i;
-
        struct yaffs_block_info *bi;
 
        if (dev->n_erased_blocks < 1) {
@@ -404,7 +386,7 @@ static int yaffs_find_alloc_block(struct yaffs_dev *dev)
                 * Can't get space to gc
                 */
                yaffs_trace(YAFFS_TRACE_ERROR,
-                 "yaffs tragedy: no more erased blocks" );
+                 "yaffs tragedy: no more erased blocks");
 
                return -1;
        }
@@ -453,7 +435,7 @@ static int yaffs_alloc_chunk(struct yaffs_dev *dev, int use_reserver,
        }
 
        if (!use_reserver && !yaffs_check_alloc_available(dev, 1)) {
-               /* Not enough space to allocate unless we're allowed to use the reserve. */
+               /* No space unless we're allowed to use the reserve. */
                return -1;
        }
 
@@ -486,7 +468,8 @@ static int yaffs_alloc_chunk(struct yaffs_dev *dev, int use_reserver,
                return ret_val;
        }
 
-       yaffs_trace(YAFFS_TRACE_ERROR, "!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!" );
+       yaffs_trace(YAFFS_TRACE_ERROR,
+               "!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!");
 
        return -1;
 }
@@ -510,9 +493,10 @@ static int yaffs_get_erased_chunks(struct yaffs_dev *dev)
  */
 void yaffs_skip_rest_of_block(struct yaffs_dev *dev)
 {
+       struct yaffs_block_info *bi;
+
        if (dev->alloc_block > 0) {
-               struct yaffs_block_info *bi =
-                   yaffs_get_block_info(dev, dev->alloc_block);
+               bi = yaffs_get_block_info(dev, dev->alloc_block);
                if (bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING) {
                        bi->block_state = YAFFS_BLOCK_STATE_FULL;
                        dev->alloc_block = -1;
@@ -521,7 +505,7 @@ void yaffs_skip_rest_of_block(struct yaffs_dev *dev)
 }
 
 static int yaffs_write_new_chunk(struct yaffs_dev *dev,
-                                const u8 * data,
+                                const u8 *data,
                                 struct yaffs_ext_tags *tags, int use_reserver)
 {
        int attempts = 0;
@@ -560,7 +544,7 @@ static int yaffs_write_new_chunk(struct yaffs_dev *dev,
                 * lot of checks that are most likely not needed.
                 *
                 * Mods to the above
-                * If an erase check fails or the write fails we skip the 
+                * If an erase check fails or the write fails we skip the
                 * rest of the block.
                 */
 
@@ -614,7 +598,7 @@ static int yaffs_write_new_chunk(struct yaffs_dev *dev,
                yaffs_trace(YAFFS_TRACE_ERROR,
                        "**>> yaffs write required %d attempts",
                        attempts);
-               dev->n_retired_writes += (attempts - 1);
+               dev->n_retried_writes += (attempts - 1);
        }
 
        return chunk;
@@ -642,10 +626,10 @@ static void yaffs_retire_block(struct yaffs_dev *dev, int flash_block)
                        int chunk_id =
                            flash_block * dev->param.chunks_per_block;
 
-                       u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+                       u8 *buffer = yaffs_get_temp_buffer(dev);
 
                        memset(buffer, 0xff, dev->data_bytes_per_chunk);
-                       yaffs_init_tags(&tags);
+                       memset(&tags, 0, sizeof(tags));
                        tags.seq_number = YAFFS_SEQUENCE_BAD_BLOCK;
                        if (dev->param.write_chunk_tags_fn(dev, chunk_id -
                                                           dev->chunk_offset,
@@ -655,7 +639,7 @@ static void yaffs_retire_block(struct yaffs_dev *dev, int flash_block)
                                        "yaffs: Failed to write bad block marker to block %d",
                                        flash_block);
 
-                       yaffs_release_temp_buffer(dev, buffer, __LINE__);
+                       yaffs_release_temp_buffer(dev, buffer);
                }
        }
 
@@ -668,35 +652,33 @@ static void yaffs_retire_block(struct yaffs_dev *dev, int flash_block)
 
 /*---------------- Name handling functions ------------*/
 
-static u16 yaffs_calc_name_sum(const YCHAR * name)
+static u16 yaffs_calc_name_sum(const YCHAR *name)
 {
        u16 sum = 0;
        u16 i = 1;
 
-       const YUCHAR *bname = (const YUCHAR *)name;
-       if (bname) {
-               while ((*bname) && (i < (YAFFS_MAX_NAME_LENGTH / 2))) {
+       if (!name)
+               return 0;
 
-                       /* 0x1f mask is case insensitive */
-                       sum += ((*bname) & 0x1f) * i;
-                       i++;
-                       bname++;
-               }
+       while ((*name) && i < (YAFFS_MAX_NAME_LENGTH / 2)) {
+
+               /* 0x1f mask is case insensitive */
+               sum += ((*name) & 0x1f) * i;
+               i++;
+               name++;
        }
        return sum;
 }
 
 void yaffs_set_obj_name(struct yaffs_obj *obj, const YCHAR * name)
 {
-#ifndef CONFIG_YAFFS_NO_SHORT_NAMES
        memset(obj->short_name, 0, sizeof(obj->short_name));
-       if (name && 
-               strnlen(name, YAFFS_SHORT_NAME_LENGTH + 1) <=
-           YAFFS_SHORT_NAME_LENGTH)
+       if (name &&
+               strnlen(name, YAFFS_SHORT_NAME_LENGTH + 1) <=
+               YAFFS_SHORT_NAME_LENGTH)
                strcpy(obj->short_name, name);
        else
                obj->short_name[0] = _Y('\0');
-#endif
        obj->sum = yaffs_calc_name_sum(name);
 }
 
@@ -724,6 +706,7 @@ void yaffs_set_obj_name_from_oh(struct yaffs_obj *obj,
 struct yaffs_tnode *yaffs_get_tnode(struct yaffs_dev *dev)
 {
        struct yaffs_tnode *tn = yaffs_alloc_raw_tnode(dev);
+
        if (tn) {
                memset(tn, 0, dev->tnode_size);
                dev->n_tnodes++;
@@ -772,9 +755,9 @@ void yaffs_load_tnode_0(struct yaffs_dev *dev, struct yaffs_tnode *tn,
 
        if (dev->tnode_width > (32 - bit_in_word)) {
                bit_in_word = (32 - bit_in_word);
-               word_in_map++;;
+               word_in_map++;
                mask =
-                   dev->tnode_mask >> ( /*dev->tnode_width - */ bit_in_word);
+                   dev->tnode_mask >> bit_in_word;
                map[word_in_map] &= ~mask;
                map[word_in_map] |= (mask & (val >> bit_in_word));
        }
@@ -799,7 +782,7 @@ u32 yaffs_get_group_base(struct yaffs_dev *dev, struct yaffs_tnode *tn,
 
        if (dev->tnode_width > (32 - bit_in_word)) {
                bit_in_word = (32 - bit_in_word);
-               word_in_map++;;
+               word_in_map++;
                val |= (map[word_in_map] << bit_in_word);
        }
 
@@ -860,15 +843,16 @@ struct yaffs_tnode *yaffs_find_tnode_0(struct yaffs_dev *dev,
        return tn;
 }
 
-/* AddOrFindLevel0Tnode finds the level 0 tnode if it exists, otherwise first expands the tree.
+/* add_find_tnode_0 finds the level 0 tnode if it exists,
+ * otherwise first expands the tree.
  * This happens in two steps:
  *  1. If the tree isn't tall enough, then make it taller.
  *  2. Scan down the tree towards the level 0 tnode adding tnodes if required.
  *
  * Used when modifying the tree.
  *
- *  If the tn argument is NULL, then a fresh tnode will be added otherwise the specified tn will
- *  be plugged into the ttree.
+ *  If the tn argument is NULL, then a fresh tnode will be added otherwise the
+ *  specified tn will be plugged into the ttree.
  */
 
 struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
@@ -880,12 +864,11 @@ struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
        int i;
        int l;
        struct yaffs_tnode *tn;
-
        u32 x;
 
        /* Check sane level and page Id */
-       if (file_struct->top_level < 0
-           || file_struct->top_level > YAFFS_TNODES_MAX_LEVEL)
+       if (file_struct->top_level < 0 ||
+           file_struct->top_level > YAFFS_TNODES_MAX_LEVEL)
                return NULL;
 
        if (chunk_id > YAFFS_MAX_CHUNK_ID)
@@ -911,7 +894,8 @@ struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
                                file_struct->top = tn;
                                file_struct->top_level++;
                        } else {
-                               yaffs_trace(YAFFS_TRACE_ERROR, "yaffs: no more tnodes");
+                               yaffs_trace(YAFFS_TRACE_ERROR,
+                                       "yaffs: no more tnodes");
                                return NULL;
                        }
                }
@@ -937,11 +921,10 @@ struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
                        } else if (l == 1) {
                                /* Looking from level 1 at level 0 */
                                if (passed_tn) {
-                                       /* If we already have one, then release it. */
+                                       /* If we already have one, release it */
                                        if (tn->internal[x])
                                                yaffs_free_tnode(dev,
-                                                                tn->
-                                                                internal[x]);
+                                                       tn->internal[x]);
                                        tn->internal[x] = passed_tn;
 
                                } else if (!tn->internal[x]) {
@@ -971,13 +954,14 @@ static int yaffs_tags_match(const struct yaffs_ext_tags *tags, int obj_id,
                            int chunk_obj)
 {
        return (tags->chunk_id == chunk_obj &&
-               tags->obj_id == obj_id && !tags->is_deleted) ? 1 : 0;
+               tags->obj_id == obj_id &&
+               !tags->is_deleted) ? 1 : 0;
 
 }
 
 static int yaffs_find_chunk_in_group(struct yaffs_dev *dev, int the_chunk,
-                                    struct yaffs_ext_tags *tags, int obj_id,
-                                    int inode_chunk)
+                                       struct yaffs_ext_tags *tags, int obj_id,
+                                       int inode_chunk)
 {
        int j;
 
@@ -991,7 +975,8 @@ static int yaffs_find_chunk_in_group(struct yaffs_dev *dev, int the_chunk,
                        else {
                                yaffs_rd_chunk_tags_nand(dev, the_chunk, NULL,
                                                         tags);
-                               if (yaffs_tags_match(tags, obj_id, inode_chunk)) {
+                               if (yaffs_tags_match(tags,
+                                                       obj_id, inode_chunk)) {
                                        /* found it; */
                                        return the_chunk;
                                }
@@ -1010,7 +995,6 @@ static int yaffs_find_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
        int the_chunk = -1;
        struct yaffs_ext_tags local_tags;
        int ret_val = -1;
-
        struct yaffs_dev *dev = in->my_dev;
 
        if (!tags) {
@@ -1020,13 +1004,13 @@ static int yaffs_find_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
 
        tn = yaffs_find_tnode_0(dev, &in->variant.file_variant, inode_chunk);
 
-       if (tn) {
-               the_chunk = yaffs_get_group_base(dev, tn, inode_chunk);
+       if (!tn)
+               return ret_val;
 
-               ret_val =
-                   yaffs_find_chunk_in_group(dev, the_chunk, tags, in->obj_id,
+       the_chunk = yaffs_get_group_base(dev, tn, inode_chunk);
+
+       ret_val = yaffs_find_chunk_in_group(dev, the_chunk, tags, in->obj_id,
                                              inode_chunk);
-       }
        return ret_val;
 }
 
@@ -1037,7 +1021,6 @@ static int yaffs_find_del_file_chunk(struct yaffs_obj *in, int inode_chunk,
        struct yaffs_tnode *tn;
        int the_chunk = -1;
        struct yaffs_ext_tags local_tags;
-
        struct yaffs_dev *dev = in->my_dev;
        int ret_val = -1;
 
@@ -1048,18 +1031,17 @@ static int yaffs_find_del_file_chunk(struct yaffs_obj *in, int inode_chunk,
 
        tn = yaffs_find_tnode_0(dev, &in->variant.file_variant, inode_chunk);
 
-       if (tn) {
+       if (!tn)
+               return ret_val;
 
-               the_chunk = yaffs_get_group_base(dev, tn, inode_chunk);
+       the_chunk = yaffs_get_group_base(dev, tn, inode_chunk);
 
-               ret_val =
-                   yaffs_find_chunk_in_group(dev, the_chunk, tags, in->obj_id,
+       ret_val = yaffs_find_chunk_in_group(dev, the_chunk, tags, in->obj_id,
                                              inode_chunk);
 
-               /* Delete the entry in the filestructure (if found) */
-               if (ret_val != -1)
-                       yaffs_load_tnode_0(dev, tn, inode_chunk, 0);
-       }
+       /* Delete the entry in the filestructure (if found) */
+       if (ret_val != -1)
+               yaffs_load_tnode_0(dev, tn, inode_chunk, 0);
 
        return ret_val;
 }
@@ -1082,14 +1064,15 @@ int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
        unsigned existing_serial, new_serial;
 
        if (in->variant_type != YAFFS_OBJECT_TYPE_FILE) {
-               /* Just ignore an attempt at putting a chunk into a non-file during scanning
+               /* Just ignore an attempt at putting a chunk into a non-file
+                * during scanning.
                 * If it is not during Scanning then something went wrong!
                 */
                if (!in_scan) {
                        yaffs_trace(YAFFS_TRACE_ERROR,
                                "yaffs tragedy:attempt to put data chunk into a non-file"
                                );
-                       YBUG();
+                       BUG();
                }
 
                yaffs_chunk_del(dev, nand_chunk, 1, __LINE__);
@@ -1110,23 +1093,29 @@ int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
 
        if (in_scan != 0) {
                /* If we're scanning then we need to test for duplicates
-                * NB This does not need to be efficient since it should only ever
+                * NB This does not need to be efficient since it should only
                 * happen when the power fails during a write, then only one
                 * chunk should ever be affected.
                 *
-                * Correction for YAFFS2: This could happen quite a lot and we need to think about efficiency! TODO
-                * Update: For backward scanning we don't need to re-read tags so this is quite cheap.
+                * Correction for YAFFS2: This could happen quite a lot and we
+                * need to think about efficiency! TODO
+                * Update: For backward scanning we don't need to re-read tags
+                * so this is quite cheap.
                 */
 
                if (existing_cunk > 0) {
-                       /* NB Right now existing chunk will not be real chunk_id if the chunk group size > 1
-                        *    thus we have to do a FindChunkInFile to get the real chunk id.
+                       /* NB Right now existing chunk will not be real
+                        * chunk_id if the chunk group size > 1
+                        * thus we have to do a FindChunkInFile to get the
+                        * real chunk id.
                         *
-                        * We have a duplicate now we need to decide which one to use:
+                        * We have a duplicate now we need to decide which
+                        * one to use:
                         *
-                        * Backwards scanning YAFFS2: The old one is what we use, dump the new one.
-                        * Forward scanning YAFFS2: The new one is what we use, dump the old one.
-                        * YAFFS1: Get both sets of tags and compare serial numbers.
+                        * Backwards scanning YAFFS2: The old one is what
+                        * we use, dump the new one.
+                        * YAFFS1: Get both sets of tags and compare serial
+                        * numbers.
                         */
 
                        if (in_scan > 0) {
@@ -1150,8 +1139,8 @@ int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
 
                        }
 
-                       /* NB The deleted flags should be false, otherwise the chunks will
-                        * not be loaded during a scan
+                       /* NB The deleted flags should be false, otherwise
+                        * the chunks will not be loaded during a scan
                         */
 
                        if (in_scan > 0) {
@@ -1164,14 +1153,16 @@ int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
                             ((existing_serial + 1) & 3) == new_serial)) {
                                /* Forward scanning.
                                 * Use new
-                                * Delete the old one and drop through to update the tnode
+                                * Delete the old one and drop through to
+                                * update the tnode
                                 */
                                yaffs_chunk_del(dev, existing_cunk, 1,
                                                __LINE__);
                        } else {
-                               /* Backward scanning or we want to use the existing one
-                                * Use existing.
-                                * Delete the new one and return early so that the tnode isn't changed
+                               /* Backward scanning or we want to use the
+                                * existing one
+                                * Delete the new one and return early so that
+                                * the tnode isn't changed
                                 */
                                yaffs_chunk_del(dev, nand_chunk, 1, __LINE__);
                                return YAFFS_OK;
@@ -1204,10 +1195,12 @@ static void yaffs_soft_del_chunk(struct yaffs_dev *dev, int chunk)
        }
 }
 
-/* SoftDeleteWorker scans backwards through the tnode tree and soft deletes all the chunks in the file.
- * All soft deleting does is increment the block's softdelete count and pulls the chunk out
- * of the tnode.
- * Thus, essentially this is the same as DeleteWorker except that the chunks are soft deleted.
+/* SoftDeleteWorker scans backwards through the tnode tree and soft deletes all
+ * the chunks in the file.
+ * All soft deleting does is increment the block's softdelete count and pulls
+ * the chunk out of the tnode.
+ * Thus, essentially this is the same as DeleteWorker except that the chunks
+ * are soft deleted.
  */
 
 static int yaffs_soft_del_worker(struct yaffs_obj *in, struct yaffs_tnode *tn,
@@ -1218,54 +1211,42 @@ static int yaffs_soft_del_worker(struct yaffs_obj *in, struct yaffs_tnode *tn,
        int all_done = 1;
        struct yaffs_dev *dev = in->my_dev;
 
-       if (tn) {
-               if (level > 0) {
-
-                       for (i = YAFFS_NTNODES_INTERNAL - 1; all_done && i >= 0;
-                            i--) {
-                               if (tn->internal[i]) {
-                                       all_done =
-                                           yaffs_soft_del_worker(in,
-                                                                 tn->internal
-                                                                 [i],
-                                                                 level - 1,
-                                                                 (chunk_offset
-                                                                  <<
-                                                                  YAFFS_TNODES_INTERNAL_BITS)
-                                                                 + i);
-                                       if (all_done) {
-                                               yaffs_free_tnode(dev,
-                                                                tn->internal
-                                                                [i]);
-                                               tn->internal[i] = NULL;
-                                       } else {
-                                               /* Hoosterman... how could this happen? */
-                                       }
-                               }
-                       }
-                       return (all_done) ? 1 : 0;
-               } else if (level == 0) {
-
-                       for (i = YAFFS_NTNODES_LEVEL0 - 1; i >= 0; i--) {
-                               the_chunk = yaffs_get_group_base(dev, tn, i);
-                               if (the_chunk) {
-                                       /* Note this does not find the real chunk, only the chunk group.
-                                        * We make an assumption that a chunk group is not larger than
-                                        * a block.
-                                        */
-                                       yaffs_soft_del_chunk(dev, the_chunk);
-                                       yaffs_load_tnode_0(dev, tn, i, 0);
-                               }
+       if (!tn)
+               return 1;
 
+       if (level > 0) {
+               for (i = YAFFS_NTNODES_INTERNAL - 1;
+                       all_done && i >= 0;
+                       i--) {
+                       if (tn->internal[i]) {
+                               all_done =
+                                   yaffs_soft_del_worker(in,
+                                       tn->internal[i],
+                                       level - 1,
+                                       (chunk_offset <<
+                                       YAFFS_TNODES_INTERNAL_BITS)
+                                       + i);
+                               if (all_done) {
+                                       yaffs_free_tnode(dev,
+                                               tn->internal[i]);
+                                       tn->internal[i] = NULL;
+                               } else {
+                                       /* Can this happen? */
+                               }
                        }
-                       return 1;
-
                }
-
+               return (all_done) ? 1 : 0;
        }
 
+       /* level 0 */
+        for (i = YAFFS_NTNODES_LEVEL0 - 1; i >= 0; i--) {
+               the_chunk = yaffs_get_group_base(dev, tn, i);
+               if (the_chunk) {
+                       yaffs_soft_del_chunk(dev, the_chunk);
+                       yaffs_load_tnode_0(dev, tn, i, 0);
+               }
+       }
        return 1;
-
 }
 
 static void yaffs_remove_obj_from_dir(struct yaffs_obj *obj)
@@ -1293,19 +1274,19 @@ void yaffs_add_obj_to_dir(struct yaffs_obj *directory, struct yaffs_obj *obj)
                yaffs_trace(YAFFS_TRACE_ALWAYS,
                        "tragedy: Trying to add an object to a null pointer directory"
                        );
-               YBUG();
+               BUG();
                return;
        }
        if (directory->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
                yaffs_trace(YAFFS_TRACE_ALWAYS,
                        "tragedy: Trying to add an object to a non-directory"
                        );
-               YBUG();
+               BUG();
        }
 
        if (obj->siblings.prev == NULL) {
                /* Not initialised */
-               YBUG();
+               BUG();
        }
 
        yaffs_verify_dir(directory);
@@ -1329,11 +1310,10 @@ void yaffs_add_obj_to_dir(struct yaffs_obj *directory, struct yaffs_obj *obj)
 
 static int yaffs_change_obj_name(struct yaffs_obj *obj,
                                 struct yaffs_obj *new_dir,
-                                const YCHAR * new_name, int force, int shadows)
+                                const YCHAR *new_name, int force, int shadows)
 {
        int unlink_op;
        int del_op;
-
        struct yaffs_obj *existing_target;
 
        if (new_dir == NULL)
@@ -1343,58 +1323,48 @@ static int yaffs_change_obj_name(struct yaffs_obj *obj,
                yaffs_trace(YAFFS_TRACE_ALWAYS,
                        "tragedy: yaffs_change_obj_name: new_dir is not a directory"
                        );
-               YBUG();
+               BUG();
        }
 
-       /* TODO: Do we need this different handling for YAFFS2 and YAFFS1?? */
-       if (obj->my_dev->param.is_yaffs2)
-               unlink_op = (new_dir == obj->my_dev->unlinked_dir);
-       else
-               unlink_op = (new_dir == obj->my_dev->unlinked_dir
-                            && obj->variant_type == YAFFS_OBJECT_TYPE_FILE);
-
+       unlink_op = (new_dir == obj->my_dev->unlinked_dir);
        del_op = (new_dir == obj->my_dev->del_dir);
 
        existing_target = yaffs_find_by_name(new_dir, new_name);
 
        /* If the object is a file going into the unlinked directory,
-        *   then it is OK to just stuff it in since duplicate names are allowed.
-        *   else only proceed if the new name does not exist and if we're putting
+        *   then it is OK to just stuff it in since duplicate names are OK.
+        *   else only proceed if the new name does not exist and we're putting
         *   it into a directory.
         */
-       if ((unlink_op ||
-            del_op ||
-            force ||
-            (shadows > 0) ||
-            !existing_target) &&
-           new_dir->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY) {
-               yaffs_set_obj_name(obj, new_name);
-               obj->dirty = 1;
+       if (!(unlink_op || del_op || force ||
+             shadows > 0 || !existing_target) ||
+             new_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
+               return YAFFS_FAIL;
 
-               yaffs_add_obj_to_dir(new_dir, obj);
+       yaffs_set_obj_name(obj, new_name);
+       obj->dirty = 1;
+       yaffs_add_obj_to_dir(new_dir, obj);
 
-               if (unlink_op)
-                       obj->unlinked = 1;
+       if (unlink_op)
+               obj->unlinked = 1;
 
-               /* If it is a deletion then we mark it as a shrink for gc purposes. */
-               if (yaffs_update_oh(obj, new_name, 0, del_op, shadows, NULL) >=
-                   0)
-                       return YAFFS_OK;
-       }
+       /* If it is a deletion then we mark it as a shrink for gc  */
+       if (yaffs_update_oh(obj, new_name, 0, del_op, shadows, NULL) >= 0)
+               return YAFFS_OK;
 
        return YAFFS_FAIL;
 }
 
-/*------------------------ Short Operations Cache ----------------------------------------
+/*------------------------ Short Operations Cache ------------------------------
  *   In many situations where there is no high level buffering  a lot of
  *   reads might be short sequential reads, and a lot of writes may be short
  *   sequential writes. eg. scanning/writing a jpeg file.
  *   In these cases, a short read/write cache can provide a huge perfomance
  *   benefit with dumb-as-a-rock code.
- *   In Linux, the page cache provides read buffering and the short op cache 
+ *   In Linux, the page cache provides read buffering and the short op cache
  *   provides write buffering.
  *
- *   There are a limited number (~10) of cache chunks per device so that we don't
+ *   There are a small number (~10) of cache chunks per device so that we don't
  *   need a very intelligent search.
  */
 
@@ -1423,44 +1393,39 @@ static void yaffs_flush_file_cache(struct yaffs_obj *obj)
        int chunk_written = 0;
        int n_caches = obj->my_dev->param.n_caches;
 
-       if (n_caches > 0) {
-               do {
-                       cache = NULL;
-
-                       /* Find the dirty cache for this object with the lowest chunk id. */
-                       for (i = 0; i < n_caches; i++) {
-                               if (dev->cache[i].object == obj &&
-                                   dev->cache[i].dirty) {
-                                       if (!cache
-                                           || dev->cache[i].chunk_id <
-                                           lowest) {
-                                               cache = &dev->cache[i];
-                                               lowest = cache->chunk_id;
-                                       }
-                               }
-                       }
-
-                       if (cache && !cache->locked) {
-                               /* Write it out and free it up */
+       if (n_caches < 1)
+               return;
+       do {
+               cache = NULL;
 
-                               chunk_written =
-                                   yaffs_wr_data_obj(cache->object,
-                                                     cache->chunk_id,
-                                                     cache->data,
-                                                     cache->n_bytes, 1);
-                               cache->dirty = 0;
-                               cache->object = NULL;
+               /* Find the lowest dirty chunk for this object */
+               for (i = 0; i < n_caches; i++) {
+                       if (dev->cache[i].object == obj &&
+                           dev->cache[i].dirty) {
+                               if (!cache ||
+                                   dev->cache[i].chunk_id < lowest) {
+                                       cache = &dev->cache[i];
+                                       lowest = cache->chunk_id;
+                               }
                        }
+               }
 
-               } while (cache && chunk_written > 0);
-
-               if (cache)
-                       /* Hoosterman, disk full while writing cache out. */
-                       yaffs_trace(YAFFS_TRACE_ERROR,
-                               "yaffs tragedy: no space during cache write");
-
-       }
+               if (cache && !cache->locked) {
+                       /* Write it out and free it up */
+                       chunk_written =
+                           yaffs_wr_data_obj(cache->object,
+                                             cache->chunk_id,
+                                             cache->data,
+                                             cache->n_bytes, 1);
+                       cache->dirty = 0;
+                       cache->object = NULL;
+               }
+       } while (cache && chunk_written > 0);
 
+       if (cache)
+               /* Hoosterman, disk full while writing cache out. */
+               yaffs_trace(YAFFS_TRACE_ERROR,
+                       "yaffs tragedy: no space during cache write");
 }
 
 /*yaffs_flush_whole_cache(dev)
@@ -1482,11 +1447,9 @@ void yaffs_flush_whole_cache(struct yaffs_dev *dev)
                for (i = 0; i < n_caches && !obj; i++) {
                        if (dev->cache[i].object && dev->cache[i].dirty)
                                obj = dev->cache[i].object;
-
                }
                if (obj)
                        yaffs_flush_file_cache(obj);
-
        } while (obj);
 
 }
@@ -1506,7 +1469,6 @@ static struct yaffs_cache *yaffs_grab_chunk_worker(struct yaffs_dev *dev)
                                return &dev->cache[i];
                }
        }
-
        return NULL;
 }
 
@@ -1518,48 +1480,46 @@ static struct yaffs_cache *yaffs_grab_chunk_cache(struct yaffs_dev *dev)
        int i;
        int pushout;
 
-       if (dev->param.n_caches > 0) {
-               /* Try find a non-dirty one... */
+       if (dev->param.n_caches < 1)
+               return NULL;
 
-               cache = yaffs_grab_chunk_worker(dev);
+       /* Try find a non-dirty one... */
 
-               if (!cache) {
-                       /* They were all dirty, find the last recently used object and flush
-                        * its cache, then  find again.
-                        * NB what's here is not very accurate, we actually flush the object
-                        * the last recently used page.
-                        */
+       cache = yaffs_grab_chunk_worker(dev);
 
-                       /* With locking we can't assume we can use entry zero */
+       if (!cache) {
+               /* They were all dirty, find the LRU object and flush
+                * its cache, then  find again.
+                * NB what's here is not very accurate,
+                * we actually flush the object with the LRU chunk.
+                */
 
-                       the_obj = dev->cache[0].object;
-                       usage = -1;
-                       cache = NULL;
-                       pushout = -1;
+               /* With locking we can't assume we can use entry zero,
+                * Set the_obj to a valid pointer for Coverity. */
+               the_obj = dev->cache[0].object;
+               usage = -1;
+               cache = NULL;
+               pushout = -1;
 
-                       for (i = 0; i < dev->param.n_caches; i++) {
-                               if (dev->cache[i].object &&
-                                   !dev->cache[i].locked &&
-                                   (dev->cache[i].last_use < usage
-                                    || !cache)) {
-                                       usage = dev->cache[i].last_use;
-                                       the_obj = dev->cache[i].object;
-                                       cache = &dev->cache[i];
-                                       pushout = i;
-                               }
-                       }
-
-                       if (!cache || cache->dirty) {
-                               /* Flush and try again */
-                               yaffs_flush_file_cache(the_obj);
-                               cache = yaffs_grab_chunk_worker(dev);
+               for (i = 0; i < dev->param.n_caches; i++) {
+                       if (dev->cache[i].object &&
+                           !dev->cache[i].locked &&
+                           (dev->cache[i].last_use < usage ||
+                           !cache)) {
+                               usage = dev->cache[i].last_use;
+                               the_obj = dev->cache[i].object;
+                               cache = &dev->cache[i];
+                               pushout = i;
                        }
+               }
 
+               if (!cache || cache->dirty) {
+                       /* Flush and try again */
+                       yaffs_flush_file_cache(the_obj);
+                       cache = yaffs_grab_chunk_worker(dev);
                }
-               return cache;
-       } else {
-               return NULL;
-        }
+       }
+       return cache;
 }
 
 /* Find a cached chunk */
@@ -1568,14 +1528,16 @@ static struct yaffs_cache *yaffs_find_chunk_cache(const struct yaffs_obj *obj,
 {
        struct yaffs_dev *dev = obj->my_dev;
        int i;
-       if (dev->param.n_caches > 0) {
-               for (i = 0; i < dev->param.n_caches; i++) {
-                       if (dev->cache[i].object == obj &&
-                           dev->cache[i].chunk_id == chunk_id) {
-                               dev->cache_hits++;
 
-                               return &dev->cache[i];
-                       }
+       if (dev->param.n_caches < 1)
+               return NULL;
+
+       for (i = 0; i < dev->param.n_caches; i++) {
+               if (dev->cache[i].object == obj &&
+                   dev->cache[i].chunk_id == chunk_id) {
+                       dev->cache_hits++;
+
+                       return &dev->cache[i];
                }
        }
        return NULL;
@@ -1585,24 +1547,24 @@ static struct yaffs_cache *yaffs_find_chunk_cache(const struct yaffs_obj *obj,
 static void yaffs_use_cache(struct yaffs_dev *dev, struct yaffs_cache *cache,
                            int is_write)
 {
+       int i;
 
-       if (dev->param.n_caches > 0) {
-               if (dev->cache_last_use < 0 || dev->cache_last_use > 100000000) {
-                       /* Reset the cache usages */
-                       int i;
-                       for (i = 1; i < dev->param.n_caches; i++)
-                               dev->cache[i].last_use = 0;
-
-                       dev->cache_last_use = 0;
-               }
-
-               dev->cache_last_use++;
+       if (dev->param.n_caches < 1)
+               return;
 
-               cache->last_use = dev->cache_last_use;
+       if (dev->cache_last_use < 0 ||
+               dev->cache_last_use > 100000000) {
+               /* Reset the cache usages */
+               for (i = 1; i < dev->param.n_caches; i++)
+                       dev->cache[i].last_use = 0;
 
-               if (is_write)
-                       cache->dirty = 1;
+               dev->cache_last_use = 0;
        }
+       dev->cache_last_use++;
+       cache->last_use = dev->cache_last_use;
+
+       if (is_write)
+               cache->dirty = 1;
 }
 
 /* Invalidate a single cache page.
@@ -1611,9 +1573,10 @@ static void yaffs_use_cache(struct yaffs_dev *dev, struct yaffs_cache *cache,
  */
 static void yaffs_invalidate_chunk_cache(struct yaffs_obj *object, int chunk_id)
 {
+       struct yaffs_cache *cache;
+
        if (object->my_dev->param.n_caches > 0) {
-               struct yaffs_cache *cache =
-                   yaffs_find_chunk_cache(object, chunk_id);
+               cache = yaffs_find_chunk_cache(object, chunk_id);
 
                if (cache)
                        cache->object = NULL;
@@ -1653,17 +1616,19 @@ static void yaffs_unhash_obj(struct yaffs_obj *obj)
 /*  FreeObject frees up a Object and puts it back on the free list */
 static void yaffs_free_obj(struct yaffs_obj *obj)
 {
-       struct yaffs_dev *dev = obj->my_dev;
+       struct yaffs_dev *dev;
 
+       if (!obj) {
+               BUG();
+               return;
+       }
+       dev = obj->my_dev;
        yaffs_trace(YAFFS_TRACE_OS, "FreeObject %p inode %p",
                obj, obj->my_inode);
-
-       if (!obj)
-               YBUG();
        if (obj->parent)
-               YBUG();
+               BUG();
        if (!list_empty(&obj->siblings))
-               YBUG();
+               BUG();
 
        if (obj->my_inode) {
                /* We're still hooked up to a cached inode.
@@ -1688,15 +1653,13 @@ void yaffs_handle_defered_free(struct yaffs_obj *obj)
 
 static int yaffs_generic_obj_del(struct yaffs_obj *in)
 {
-
-       /* First off, invalidate the file's data in the cache, without flushing. */
+       /* Iinvalidate the file's data in the cache, without flushing. */
        yaffs_invalidate_whole_cache(in);
 
-       if (in->my_dev->param.is_yaffs2 && (in->parent != in->my_dev->del_dir)) {
-               /* Move to the unlinked directory so we have a record that it was deleted. */
+       if (in->my_dev->param.is_yaffs2 && in->parent != in->my_dev->del_dir) {
+               /* Move to unlinked directory so we have a deletion record */
                yaffs_change_obj_name(in, in->my_dev->del_dir, _Y("deleted"), 0,
                                      0);
-
        }
 
        yaffs_remove_obj_from_dir(in);
@@ -1710,25 +1673,26 @@ static int yaffs_generic_obj_del(struct yaffs_obj *in)
 
 static void yaffs_soft_del_file(struct yaffs_obj *obj)
 {
-       if (obj->deleted &&
-           obj->variant_type == YAFFS_OBJECT_TYPE_FILE && !obj->soft_del) {
-               if (obj->n_data_chunks <= 0) {
-                       /* Empty file with no duplicate object headers,
-                        * just delete it immediately */
-                       yaffs_free_tnode(obj->my_dev,
-                                        obj->variant.file_variant.top);
-                       obj->variant.file_variant.top = NULL;
-                       yaffs_trace(YAFFS_TRACE_TRACING,
-                               "yaffs: Deleting empty file %d",
-                               obj->obj_id);
-                       yaffs_generic_obj_del(obj);
-               } else {
-                       yaffs_soft_del_worker(obj,
-                                             obj->variant.file_variant.top,
-                                             obj->variant.
-                                             file_variant.top_level, 0);
-                       obj->soft_del = 1;
-               }
+       if (!obj->deleted ||
+           obj->variant_type != YAFFS_OBJECT_TYPE_FILE ||
+           obj->soft_del)
+               return;
+
+       if (obj->n_data_chunks <= 0) {
+               /* Empty file with no duplicate object headers,
+                * just delete it immediately */
+               yaffs_free_tnode(obj->my_dev, obj->variant.file_variant.top);
+               obj->variant.file_variant.top = NULL;
+               yaffs_trace(YAFFS_TRACE_TRACING,
+                       "yaffs: Deleting empty file %d",
+                       obj->obj_id);
+               yaffs_generic_obj_del(obj);
+       } else {
+               yaffs_soft_del_worker(obj,
+                                     obj->variant.file_variant.top,
+                                     obj->variant.
+                                     file_variant.top_level, 0);
+               obj->soft_del = 1;
        }
 }
 
@@ -1754,44 +1718,40 @@ static struct yaffs_tnode *yaffs_prune_worker(struct yaffs_dev *dev,
        int i;
        int has_data;
 
-       if (tn) {
-               has_data = 0;
-
-               if (level > 0) {
-                       for (i = 0; i < YAFFS_NTNODES_INTERNAL; i++) {
-                               if (tn->internal[i]) {
-                                       tn->internal[i] =
-                                           yaffs_prune_worker(dev,
-                                                              tn->internal[i],
-                                                              level - 1,
-                                                              (i ==
-                                                               0) ? del0 : 1);
-                               }
-
-                               if (tn->internal[i])
-                                       has_data++;
+       if (!tn)
+               return tn;
+
+       has_data = 0;
+
+       if (level > 0) {
+               for (i = 0; i < YAFFS_NTNODES_INTERNAL; i++) {
+                       if (tn->internal[i]) {
+                               tn->internal[i] =
+                                   yaffs_prune_worker(dev,
+                                               tn->internal[i],
+                                               level - 1,
+                                               (i == 0) ? del0 : 1);
                        }
-               } else {
-                       int tnode_size_u32 = dev->tnode_size / sizeof(u32);
-                       u32 *map = (u32 *) tn;
 
-                       for (i = 0; !has_data && i < tnode_size_u32; i++) {
-                               if (map[i])
-                                       has_data++;
-                       }
+                       if (tn->internal[i])
+                               has_data++;
                }
+       } else {
+               int tnode_size_u32 = dev->tnode_size / sizeof(u32);
+               u32 *map = (u32 *) tn;
 
-               if (has_data == 0 && del0) {
-                       /* Free and return NULL */
-
-                       yaffs_free_tnode(dev, tn);
-                       tn = NULL;
+               for (i = 0; !has_data && i < tnode_size_u32; i++) {
+                       if (map[i])
+                               has_data++;
                }
-
        }
 
+       if (has_data == 0 && del0) {
+               /* Free and return NULL */
+               yaffs_free_tnode(dev, tn);
+               tn = NULL;
+       }
        return tn;
-
 }
 
 static int yaffs_prune_tree(struct yaffs_dev *dev,
@@ -1802,34 +1762,34 @@ static int yaffs_prune_tree(struct yaffs_dev *dev,
        int done = 0;
        struct yaffs_tnode *tn;
 
-       if (file_struct->top_level > 0) {
-               file_struct->top =
-                   yaffs_prune_worker(dev, file_struct->top,
-                                      file_struct->top_level, 0);
+       if (file_struct->top_level < 1)
+               return YAFFS_OK;
 
-               /* Now we have a tree with all the non-zero branches NULL but the height
-                * is the same as it was.
-                * Let's see if we can trim internal tnodes to shorten the tree.
-                * We can do this if only the 0th element in the tnode is in use
-                * (ie all the non-zero are NULL)
-                */
+       file_struct->top =
+          yaffs_prune_worker(dev, file_struct->top, file_struct->top_level, 0);
 
-               while (file_struct->top_level && !done) {
-                       tn = file_struct->top;
+       /* Now we have a tree with all the non-zero branches NULL but
+        * the height is the same as it was.
+        * Let's see if we can trim internal tnodes to shorten the tree.
+        * We can do this if only the 0th element in the tnode is in use
+        * (ie all the non-zero are NULL)
+        */
 
-                       has_data = 0;
-                       for (i = 1; i < YAFFS_NTNODES_INTERNAL; i++) {
-                               if (tn->internal[i])
-                                       has_data++;
-                       }
+       while (file_struct->top_level && !done) {
+               tn = file_struct->top;
 
-                       if (!has_data) {
-                               file_struct->top = tn->internal[0];
-                               file_struct->top_level--;
-                               yaffs_free_tnode(dev, tn);
-                       } else {
-                               done = 1;
-                       }
+               has_data = 0;
+               for (i = 1; i < YAFFS_NTNODES_INTERNAL; i++) {
+                       if (tn->internal[i])
+                               has_data++;
+               }
+
+               if (!has_data) {
+                       file_struct->top = tn->internal[0];
+                       file_struct->top_level--;
+                       yaffs_free_tnode(dev, tn);
+               } else {
+                       done = 1;
                }
        }
 
@@ -1838,43 +1798,44 @@ static int yaffs_prune_tree(struct yaffs_dev *dev,
 
 /*-------------------- End of File Structure functions.-------------------*/
 
-/* AllocateEmptyObject gets us a clean Object. Tries to make allocate more if we run out */
+/* alloc_empty_obj gets us a clean Object.*/
 static struct yaffs_obj *yaffs_alloc_empty_obj(struct yaffs_dev *dev)
 {
        struct yaffs_obj *obj = yaffs_alloc_raw_obj(dev);
 
-       if (obj) {
-               dev->n_obj++;
-
-               /* Now sweeten it up... */
+       if (!obj)
+               return obj;
 
-               memset(obj, 0, sizeof(struct yaffs_obj));
-               obj->being_created = 1;
+       dev->n_obj++;
 
-               obj->my_dev = dev;
-               obj->hdr_chunk = 0;
-               obj->variant_type = YAFFS_OBJECT_TYPE_UNKNOWN;
-               INIT_LIST_HEAD(&(obj->hard_links));
-               INIT_LIST_HEAD(&(obj->hash_link));
-               INIT_LIST_HEAD(&obj->siblings);
+       /* Now sweeten it up... */
 
-               /* Now make the directory sane */
-               if (dev->root_dir) {
-                       obj->parent = dev->root_dir;
-                       list_add(&(obj->siblings),
-                                &dev->root_dir->variant.dir_variant.children);
-               }
+       memset(obj, 0, sizeof(struct yaffs_obj));
+       obj->being_created = 1;
 
-               /* Add it to the lost and found directory.
-                * NB Can't put root or lost-n-found in lost-n-found so
-                * check if lost-n-found exists first
-                */
-               if (dev->lost_n_found)
-                       yaffs_add_obj_to_dir(dev->lost_n_found, obj);
+       obj->my_dev = dev;
+       obj->hdr_chunk = 0;
+       obj->variant_type = YAFFS_OBJECT_TYPE_UNKNOWN;
+       INIT_LIST_HEAD(&(obj->hard_links));
+       INIT_LIST_HEAD(&(obj->hash_link));
+       INIT_LIST_HEAD(&obj->siblings);
 
-               obj->being_created = 0;
+       /* Now make the directory sane */
+       if (dev->root_dir) {
+               obj->parent = dev->root_dir;
+               list_add(&(obj->siblings),
+                        &dev->root_dir->variant.dir_variant.children);
        }
 
+       /* Add it to the lost and found directory.
+        * NB Can't put root or lost-n-found in lost-n-found so
+        * check if lost-n-found exists first
+        */
+       if (dev->lost_n_found)
+               yaffs_add_obj_to_dir(dev->lost_n_found, obj);
+
+       obj->being_created = 0;
+
        dev->checkpoint_blocks_required = 0;    /* force recalculation */
 
        return obj;
@@ -1897,7 +1858,6 @@ static int yaffs_find_nice_bucket(struct yaffs_dev *dev)
                        lowest = dev->obj_bucket[dev->bucket_finder].count;
                        l = dev->bucket_finder;
                }
-
        }
 
        return l;
@@ -1906,17 +1866,13 @@ static int yaffs_find_nice_bucket(struct yaffs_dev *dev)
 static int yaffs_new_obj_id(struct yaffs_dev *dev)
 {
        int bucket = yaffs_find_nice_bucket(dev);
-
-       /* Now find an object value that has not already been taken
-        * by scanning the list.
-        */
-
        int found = 0;
        struct list_head *i;
-
        u32 n = (u32) bucket;
 
-       /* yaffs_check_obj_hash_sane();  */
+       /* Now find an object value that has not already been taken
+        * by scanning the list.
+        */
 
        while (!found) {
                found = 1;
@@ -1931,7 +1887,6 @@ static int yaffs_new_obj_id(struct yaffs_dev *dev)
                        }
                }
        }
-
        return n;
 }
 
@@ -1954,7 +1909,7 @@ struct yaffs_obj *yaffs_find_by_number(struct yaffs_dev *dev, u32 number)
                /* Look if it is in the list */
                in = list_entry(i, struct yaffs_obj, hash_link);
                if (in->obj_id == number) {
-                       /* Don't tell the VFS about this one if it is defered free */
+                       /* Don't show if it is defered free */
                        if (in->defered_free)
                                return NULL;
                        return in;
@@ -1986,38 +1941,35 @@ struct yaffs_obj *yaffs_new_obj(struct yaffs_dev *dev, int number,
                return NULL;
        }
 
-       if (the_obj) {
-               the_obj->fake = 0;
-               the_obj->rename_allowed = 1;
-               the_obj->unlink_allowed = 1;
-               the_obj->obj_id = number;
-               yaffs_hash_obj(the_obj);
-               the_obj->variant_type = type;
-               yaffs_load_current_time(the_obj, 1, 1);
+       the_obj->fake = 0;
+       the_obj->rename_allowed = 1;
+       the_obj->unlink_allowed = 1;
+       the_obj->obj_id = number;
+       yaffs_hash_obj(the_obj);
+       the_obj->variant_type = type;
+       yaffs_load_current_time(the_obj, 1, 1);
 
-               switch (type) {
-               case YAFFS_OBJECT_TYPE_FILE:
-                       the_obj->variant.file_variant.file_size = 0;
-                       the_obj->variant.file_variant.scanned_size = 0;
-                       the_obj->variant.file_variant.shrink_size = ~0; /* max */
-                       the_obj->variant.file_variant.top_level = 0;
-                       the_obj->variant.file_variant.top = tn;
-                       break;
-               case YAFFS_OBJECT_TYPE_DIRECTORY:
-                       INIT_LIST_HEAD(&the_obj->variant.dir_variant.children);
-                       INIT_LIST_HEAD(&the_obj->variant.dir_variant.dirty);
-                       break;
-               case YAFFS_OBJECT_TYPE_SYMLINK:
-               case YAFFS_OBJECT_TYPE_HARDLINK:
-               case YAFFS_OBJECT_TYPE_SPECIAL:
-                       /* No action required */
-                       break;
-               case YAFFS_OBJECT_TYPE_UNKNOWN:
-                       /* todo this should not happen */
-                       break;
-               }
+       switch (type) {
+       case YAFFS_OBJECT_TYPE_FILE:
+               the_obj->variant.file_variant.file_size = 0;
+               the_obj->variant.file_variant.scanned_size = 0;
+               the_obj->variant.file_variant.shrink_size = ~0; /* max */
+               the_obj->variant.file_variant.top_level = 0;
+               the_obj->variant.file_variant.top = tn;
+               break;
+       case YAFFS_OBJECT_TYPE_DIRECTORY:
+               INIT_LIST_HEAD(&the_obj->variant.dir_variant.children);
+               INIT_LIST_HEAD(&the_obj->variant.dir_variant.dirty);
+               break;
+       case YAFFS_OBJECT_TYPE_SYMLINK:
+       case YAFFS_OBJECT_TYPE_HARDLINK:
+       case YAFFS_OBJECT_TYPE_SPECIAL:
+               /* No action required */
+               break;
+       case YAFFS_OBJECT_TYPE_UNKNOWN:
+               /* todo this should not happen */
+               break;
        }
-
        return the_obj;
 }
 
@@ -2027,17 +1979,18 @@ static struct yaffs_obj *yaffs_create_fake_dir(struct yaffs_dev *dev,
 
        struct yaffs_obj *obj =
            yaffs_new_obj(dev, number, YAFFS_OBJECT_TYPE_DIRECTORY);
-       if (obj) {
-               obj->fake = 1;  /* it is fake so it might have no NAND presence... */
-               obj->rename_allowed = 0;        /* ... and we're not allowed to rename it... */
-               obj->unlink_allowed = 0;        /* ... or unlink it */
-               obj->deleted = 0;
-               obj->unlinked = 0;
-               obj->yst_mode = mode;
-               obj->my_dev = dev;
-               obj->hdr_chunk = 0;     /* Not a valid chunk. */
-       }
 
+       if (!obj)
+               return NULL;
+
+       obj->fake = 1;  /* it is fake so it might not use NAND */
+       obj->rename_allowed = 0;
+       obj->unlink_allowed = 0;
+       obj->deleted = 0;
+       obj->unlinked = 0;
+       obj->yst_mode = mode;
+       obj->my_dev = dev;
+       obj->hdr_chunk = 0;     /* Not a valid chunk. */
        return obj;
 
 }
@@ -2049,7 +2002,6 @@ static void yaffs_init_tnodes_and_objs(struct yaffs_dev *dev)
 
        dev->n_obj = 0;
        dev->n_tnodes = 0;
-
        yaffs_init_raw_tnodes_and_objs(dev);
 
        for (i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) {
@@ -2074,7 +2026,7 @@ struct yaffs_obj *yaffs_find_or_create_by_number(struct yaffs_dev *dev,
 
 }
 
-YCHAR *yaffs_clone_str(const YCHAR * str)
+YCHAR *yaffs_clone_str(const YCHAR *str)
 {
        YCHAR *new_str = NULL;
        int len;
@@ -2110,6 +2062,7 @@ YCHAR *yaffs_clone_str(const YCHAR * str)
 static void yaffs_update_parent(struct yaffs_obj *obj)
 {
        struct yaffs_dev *dev;
+
        if (!obj)
                return;
        dev = obj->my_dev;
@@ -2127,7 +2080,7 @@ static void yaffs_update_parent(struct yaffs_obj *obj)
 
        } else {
                yaffs_update_oh(obj, NULL, 0, 0, 0, NULL);
-        }
+       }
 }
 
 void yaffs_update_dirty_dirs(struct yaffs_dev *dev)
@@ -2164,19 +2117,19 @@ void yaffs_update_dirty_dirs(struct yaffs_dev *dev)
 
 static struct yaffs_obj *yaffs_create_obj(enum yaffs_obj_type type,
                                          struct yaffs_obj *parent,
-                                         const YCHAR * name,
+                                         const YCHAR *name,
                                          u32 mode,
                                          u32 uid,
                                          u32 gid,
                                          struct yaffs_obj *equiv_obj,
-                                         const YCHAR * alias_str, u32 rdev)
+                                         const YCHAR *alias_str, u32 rdev)
 {
        struct yaffs_obj *in;
        YCHAR *str = NULL;
-
        struct yaffs_dev *dev = parent->my_dev;
 
-       /* Check if the entry exists. If it does then fail the call since we don't want a dup. */
+       /* Check if the entry exists.
+        * If it does then fail the call since we don't want a dup. */
        if (yaffs_find_by_name(parent, name))
                return NULL;
 
@@ -2189,68 +2142,65 @@ static struct yaffs_obj *yaffs_create_obj(enum yaffs_obj_type type,
        in = yaffs_new_obj(dev, -1, type);
 
        if (!in) {
-               if (str)
-                       kfree(str);
+               kfree(str);
                return NULL;
        }
 
-       if (in) {
-               in->hdr_chunk = 0;
-               in->valid = 1;
-               in->variant_type = type;
+       in->hdr_chunk = 0;
+       in->valid = 1;
+       in->variant_type = type;
 
-               in->yst_mode = mode;
+       in->yst_mode = mode;
 
-               yaffs_attribs_init(in, gid, uid, rdev);
+       yaffs_attribs_init(in, gid, uid, rdev);
 
-               in->n_data_chunks = 0;
+       in->n_data_chunks = 0;
 
-               yaffs_set_obj_name(in, name);
-               in->dirty = 1;
+       yaffs_set_obj_name(in, name);
+       in->dirty = 1;
 
-               yaffs_add_obj_to_dir(parent, in);
+       yaffs_add_obj_to_dir(parent, in);
 
-               in->my_dev = parent->my_dev;
+       in->my_dev = parent->my_dev;
 
-               switch (type) {
-               case YAFFS_OBJECT_TYPE_SYMLINK:
-                       in->variant.symlink_variant.alias = str;
-                       break;
-               case YAFFS_OBJECT_TYPE_HARDLINK:
-                       in->variant.hardlink_variant.equiv_obj = equiv_obj;
-                       in->variant.hardlink_variant.equiv_id =
-                           equiv_obj->obj_id;
-                       list_add(&in->hard_links, &equiv_obj->hard_links);
-                       break;
-               case YAFFS_OBJECT_TYPE_FILE:
-               case YAFFS_OBJECT_TYPE_DIRECTORY:
-               case YAFFS_OBJECT_TYPE_SPECIAL:
-               case YAFFS_OBJECT_TYPE_UNKNOWN:
-                       /* do nothing */
-                       break;
-               }
+       switch (type) {
+       case YAFFS_OBJECT_TYPE_SYMLINK:
+               in->variant.symlink_variant.alias = str;
+               break;
+       case YAFFS_OBJECT_TYPE_HARDLINK:
+               in->variant.hardlink_variant.equiv_obj = equiv_obj;
+               in->variant.hardlink_variant.equiv_id = equiv_obj->obj_id;
+               list_add(&in->hard_links, &equiv_obj->hard_links);
+               break;
+       case YAFFS_OBJECT_TYPE_FILE:
+       case YAFFS_OBJECT_TYPE_DIRECTORY:
+       case YAFFS_OBJECT_TYPE_SPECIAL:
+       case YAFFS_OBJECT_TYPE_UNKNOWN:
+               /* do nothing */
+               break;
+       }
 
-               if (yaffs_update_oh(in, name, 0, 0, 0, NULL) < 0) {
-                       /* Could not create the object header, fail the creation */
-                       yaffs_del_obj(in);
-                       in = NULL;
-               }
+       if (yaffs_update_oh(in, name, 0, 0, 0, NULL) < 0) {
+               /* Could not create the object header, fail */
+               yaffs_del_obj(in);
+               in = NULL;
+       }
 
+       if (in)
                yaffs_update_parent(parent);
-       }
 
        return in;
 }
 
 struct yaffs_obj *yaffs_create_file(struct yaffs_obj *parent,
-                                   const YCHAR * name, u32 mode, u32 uid,
+                                   const YCHAR *name, u32 mode, u32 uid,
                                    u32 gid)
 {
        return yaffs_create_obj(YAFFS_OBJECT_TYPE_FILE, parent, name, mode,
                                uid, gid, NULL, NULL, 0);
 }
 
-struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR * name,
+struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR *name,
                                   u32 mode, u32 uid, u32 gid)
 {
        return yaffs_create_obj(YAFFS_OBJECT_TYPE_DIRECTORY, parent, name,
@@ -2258,7 +2208,7 @@ struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR * name,
 }
 
 struct yaffs_obj *yaffs_create_special(struct yaffs_obj *parent,
-                                      const YCHAR * name, u32 mode, u32 uid,
+                                      const YCHAR *name, u32 mode, u32 uid,
                                       u32 gid, u32 rdev)
 {
        return yaffs_create_obj(YAFFS_OBJECT_TYPE_SPECIAL, parent, name, mode,
@@ -2266,8 +2216,8 @@ struct yaffs_obj *yaffs_create_special(struct yaffs_obj *parent,
 }
 
 struct yaffs_obj *yaffs_create_symlink(struct yaffs_obj *parent,
-                                      const YCHAR * name, u32 mode, u32 uid,
-                                      u32 gid, const YCHAR * alias)
+                                      const YCHAR *name, u32 mode, u32 uid,
+                                      u32 gid, const YCHAR *alias)
 {
        return yaffs_create_obj(YAFFS_OBJECT_TYPE_SYMLINK, parent, name, mode,
                                uid, gid, NULL, alias, 0);
@@ -2277,22 +2227,40 @@ struct yaffs_obj *yaffs_create_symlink(struct yaffs_obj *parent,
 struct yaffs_obj *yaffs_link_obj(struct yaffs_obj *parent, const YCHAR * name,
                                 struct yaffs_obj *equiv_obj)
 {
-       /* Get the real object in case we were fed a hard link as an equivalent object */
+       /* Get the real object in case we were fed a hard link obj */
        equiv_obj = yaffs_get_equivalent_obj(equiv_obj);
 
-       if (yaffs_create_obj
-           (YAFFS_OBJECT_TYPE_HARDLINK, parent, name, 0, 0, 0,
-            equiv_obj, NULL, 0)) {
+       if (yaffs_create_obj(YAFFS_OBJECT_TYPE_HARDLINK,
+                       parent, name, 0, 0, 0,
+                       equiv_obj, NULL, 0))
                return equiv_obj;
-       } else {
-               return NULL;
-       }
+
+       return NULL;
 
 }
 
 
 
-/*------------------------- Block Management and Page Allocation ----------------*/
+/*---------------------- Block Management and Page Allocation -------------*/
+
+static void yaffs_deinit_blocks(struct yaffs_dev *dev)
+{
+       if (dev->block_info_alt && dev->block_info)
+               vfree(dev->block_info);
+       else
+               kfree(dev->block_info);
+
+       dev->block_info_alt = 0;
+
+       dev->block_info = NULL;
+
+       if (dev->chunk_bits_alt && dev->chunk_bits)
+               vfree(dev->chunk_bits);
+       else
+               kfree(dev->chunk_bits);
+       dev->chunk_bits_alt = 0;
+       dev->chunk_bits = NULL;
+}
 
 static int yaffs_init_blocks(struct yaffs_dev *dev)
 {
@@ -2300,7 +2268,6 @@ static int yaffs_init_blocks(struct yaffs_dev *dev)
 
        dev->block_info = NULL;
        dev->chunk_bits = NULL;
-
        dev->alloc_block = -1;  /* force it to get a new one */
 
        /* If the first allocation strategy fails, thry the alternate one */
@@ -2312,56 +2279,41 @@ static int yaffs_init_blocks(struct yaffs_dev *dev)
                dev->block_info_alt = 1;
        } else {
                dev->block_info_alt = 0;
-        }
+       }
+
+       if (!dev->block_info)
+               goto alloc_error;
 
-       if (dev->block_info) {
-               /* Set up dynamic blockinfo stuff. Round up bytes. */
-               dev->chunk_bit_stride = (dev->param.chunks_per_block + 7) / 8;
+       /* Set up dynamic blockinfo stuff. Round up bytes. */
+       dev->chunk_bit_stride = (dev->param.chunks_per_block + 7) / 8;
+       dev->chunk_bits =
+               kmalloc(dev->chunk_bit_stride * n_blocks, GFP_NOFS);
+       if (!dev->chunk_bits) {
                dev->chunk_bits =
-                       kmalloc(dev->chunk_bit_stride * n_blocks, GFP_NOFS);
-               if (!dev->chunk_bits) {
-                       dev->chunk_bits =
-                           vmalloc(dev->chunk_bit_stride * n_blocks);
-                       dev->chunk_bits_alt = 1;
-               } else {
-                       dev->chunk_bits_alt = 0;
-                }
+                   vmalloc(dev->chunk_bit_stride * n_blocks);
+               dev->chunk_bits_alt = 1;
+       } else {
+               dev->chunk_bits_alt = 0;
        }
+       if (!dev->chunk_bits)
+               goto alloc_error;
 
-       if (dev->block_info && dev->chunk_bits) {
-               memset(dev->block_info, 0,
-                      n_blocks * sizeof(struct yaffs_block_info));
-               memset(dev->chunk_bits, 0, dev->chunk_bit_stride * n_blocks);
-               return YAFFS_OK;
-       }
 
+       memset(dev->block_info, 0, n_blocks * sizeof(struct yaffs_block_info));
+       memset(dev->chunk_bits, 0, dev->chunk_bit_stride * n_blocks);
+       return YAFFS_OK;
+
+alloc_error:
+       yaffs_deinit_blocks(dev);
        return YAFFS_FAIL;
 }
 
-static void yaffs_deinit_blocks(struct yaffs_dev *dev)
-{
-       if (dev->block_info_alt && dev->block_info)
-               vfree(dev->block_info);
-       else if (dev->block_info)
-               kfree(dev->block_info);
-
-       dev->block_info_alt = 0;
-
-       dev->block_info = NULL;
-
-       if (dev->chunk_bits_alt && dev->chunk_bits)
-               vfree(dev->chunk_bits);
-       else if (dev->chunk_bits)
-               kfree(dev->chunk_bits);
-       dev->chunk_bits_alt = 0;
-       dev->chunk_bits = NULL;
-}
 
 void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no)
 {
        struct yaffs_block_info *bi = yaffs_get_block_info(dev, block_no);
-
        int erased_ok = 0;
+       int i;
 
        /* If the block is still healthy erase it and mark as clean.
         * If the block has had a data failure, then retire it.
@@ -2376,11 +2328,12 @@ void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no)
 
        bi->block_state = YAFFS_BLOCK_STATE_DIRTY;
 
-       /* If this is the block being garbage collected then stop gc'ing this block */
+       /* If this is the block being garbage collected then stop gc'ing */
        if (block_no == dev->gc_block)
                dev->gc_block = 0;
 
-       /* If this block is currently the best candidate for gc then drop as a candidate */
+       /* If this block is currently the best candidate for gc
+        * then drop as a candidate */
        if (block_no == dev->gc_dirtiest) {
                dev->gc_dirtiest = 0;
                dev->gc_pages_in_use = 0;
@@ -2396,65 +2349,199 @@ void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no)
                }
        }
 
+       /* Verify erasure if needed */
        if (erased_ok &&
-           ((yaffs_trace_mask & YAFFS_TRACE_ERASE)
-            || !yaffs_skip_verification(dev))) {
-               int i;
+           ((yaffs_trace_mask & YAFFS_TRACE_ERASE) ||
+            !yaffs_skip_verification(dev))) {
                for (i = 0; i < dev->param.chunks_per_block; i++) {
-                       if (!yaffs_check_chunk_erased
-                           (dev, block_no * dev->param.chunks_per_block + i)) {
+                       if (!yaffs_check_chunk_erased(dev,
+                               block_no * dev->param.chunks_per_block + i)) {
                                yaffs_trace(YAFFS_TRACE_ERROR,
                                        ">>Block %d erasure supposedly OK, but chunk %d not erased",
                                        block_no, i);
                        }
                }
        }
-
-       if (erased_ok) {
-               /* Clean it up... */
-               bi->block_state = YAFFS_BLOCK_STATE_EMPTY;
-               bi->seq_number = 0;
-               dev->n_erased_blocks++;
-               bi->pages_in_use = 0;
-               bi->soft_del_pages = 0;
-               bi->has_shrink_hdr = 0;
-               bi->skip_erased_check = 1;      /* Clean, so no need to check */
-               bi->gc_prioritise = 0;
-               yaffs_clear_chunk_bits(dev, block_no);
-
-               yaffs_trace(YAFFS_TRACE_ERASE,
-                       "Erased block %d", block_no);
-       } else {
-               /* We lost a block of free space */
-               dev->n_free_chunks -= dev->param.chunks_per_block;
-               yaffs_retire_block(dev, block_no);
-               yaffs_trace(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,
-                       "**>> Block %d retired", block_no);
-       }
+
+       if (!erased_ok) {
+               /* We lost a block of free space */
+               dev->n_free_chunks -= dev->param.chunks_per_block;
+               yaffs_retire_block(dev, block_no);
+               yaffs_trace(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,
+                       "**>> Block %d retired", block_no);
+               return;
+       }
+
+       /* Clean it up... */
+       bi->block_state = YAFFS_BLOCK_STATE_EMPTY;
+       bi->seq_number = 0;
+       dev->n_erased_blocks++;
+       bi->pages_in_use = 0;
+       bi->soft_del_pages = 0;
+       bi->has_shrink_hdr = 0;
+       bi->skip_erased_check = 1;      /* Clean, so no need to check */
+       bi->gc_prioritise = 0;
+       bi->has_summary=0;
+
+       yaffs_clear_chunk_bits(dev, block_no);
+
+       yaffs_trace(YAFFS_TRACE_ERASE, "Erased block %d", block_no);
+}
+
+static inline int yaffs_gc_process_chunk(struct yaffs_dev *dev,
+                                       struct yaffs_block_info *bi,
+                                       int old_chunk, u8 *buffer)
+{
+       int new_chunk;
+       int mark_flash = 1;
+       struct yaffs_ext_tags tags;
+       struct yaffs_obj *object;
+       int matching_chunk;
+       int ret_val = YAFFS_OK;
+
+       memset(&tags, 0, sizeof(tags));
+       yaffs_rd_chunk_tags_nand(dev, old_chunk,
+                                buffer, &tags);
+       object = yaffs_find_by_number(dev, tags.obj_id);
+
+       yaffs_trace(YAFFS_TRACE_GC_DETAIL,
+               "Collecting chunk in block %d, %d %d %d ",
+               dev->gc_chunk, tags.obj_id,
+               tags.chunk_id, tags.n_bytes);
+
+       if (object && !yaffs_skip_verification(dev)) {
+               if (tags.chunk_id == 0)
+                       matching_chunk =
+                           object->hdr_chunk;
+               else if (object->soft_del)
+                       /* Defeat the test */
+                       matching_chunk = old_chunk;
+               else
+                       matching_chunk =
+                           yaffs_find_chunk_in_file
+                           (object, tags.chunk_id,
+                            NULL);
+
+               if (old_chunk != matching_chunk)
+                       yaffs_trace(YAFFS_TRACE_ERROR,
+                               "gc: page in gc mismatch: %d %d %d %d",
+                               old_chunk,
+                               matching_chunk,
+                               tags.obj_id,
+                               tags.chunk_id);
+       }
+
+       if (!object) {
+               yaffs_trace(YAFFS_TRACE_ERROR,
+                       "page %d in gc has no object: %d %d %d ",
+                       old_chunk,
+                       tags.obj_id, tags.chunk_id,
+                       tags.n_bytes);
+       }
+
+       if (object &&
+           object->deleted &&
+           object->soft_del && tags.chunk_id != 0) {
+               /* Data chunk in a soft deleted file,
+                * throw it away.
+                * It's a soft deleted data chunk,
+                * No need to copy this, just forget
+                * about it and fix up the object.
+                */
+
+               /* Free chunks already includes
+                * softdeleted chunks, how ever this
+                * chunk is going to soon be really
+                * deleted which will increment free
+                * chunks. We have to decrement free
+                * chunks so this works out properly.
+                */
+               dev->n_free_chunks--;
+               bi->soft_del_pages--;
+
+               object->n_data_chunks--;
+               if (object->n_data_chunks <= 0) {
+                       /* remeber to clean up obj */
+                       dev->gc_cleanup_list[dev->n_clean_ups] = tags.obj_id;
+                       dev->n_clean_ups++;
+               }
+               mark_flash = 0;
+       } else if (object) {
+               /* It's either a data chunk in a live
+                * file or an ObjectHeader, so we're
+                * interested in it.
+                * NB Need to keep the ObjectHeaders of
+                * deleted files until the whole file
+                * has been deleted off
+                */
+               tags.serial_number++;
+               dev->n_gc_copies++;
+
+               if (tags.chunk_id == 0) {
+                       /* It is an object Id,
+                        * We need to nuke the
+                        * shrinkheader flags since its
+                        * work is done.
+                        * Also need to clean up
+                        * shadowing.
+                        */
+                       struct yaffs_obj_hdr *oh;
+                       oh = (struct yaffs_obj_hdr *) buffer;
+
+                       oh->is_shrink = 0;
+                       tags.extra_is_shrink = 0;
+                       oh->shadows_obj = 0;
+                       oh->inband_shadowed_obj_id = 0;
+                       tags.extra_shadows = 0;
+
+                       /* Update file size */
+                       if (object->variant_type == YAFFS_OBJECT_TYPE_FILE) {
+                               oh->file_size =
+                                   object->variant.file_variant.file_size;
+                               tags.extra_length = oh->file_size;
+                       }
+
+                       yaffs_verify_oh(object, oh, &tags, 1);
+                       new_chunk =
+                           yaffs_write_new_chunk(dev, (u8 *) oh, &tags, 1);
+               } else {
+                       new_chunk =
+                           yaffs_write_new_chunk(dev, buffer, &tags, 1);
+               }
+
+               if (new_chunk < 0) {
+                       ret_val = YAFFS_FAIL;
+               } else {
+
+                       /* Now fix up the Tnodes etc. */
+
+                       if (tags.chunk_id == 0) {
+                               /* It's a header */
+                               object->hdr_chunk = new_chunk;
+                               object->serial = tags.serial_number;
+                       } else {
+                               /* It's a data chunk */
+                               yaffs_put_chunk_in_file(object, tags.chunk_id,
+                                                       new_chunk, 0);
+                       }
+               }
+       }
+       if (ret_val == YAFFS_OK)
+               yaffs_chunk_del(dev, old_chunk, mark_flash, __LINE__);
+       return ret_val;
 }
 
-
-
 static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
 {
        int old_chunk;
-       int new_chunk;
-       int mark_flash;
        int ret_val = YAFFS_OK;
        int i;
        int is_checkpt_block;
-       int matching_chunk;
        int max_copies;
-
        int chunks_before = yaffs_get_erased_chunks(dev);
        int chunks_after;
-
-       struct yaffs_ext_tags tags;
-
        struct yaffs_block_info *bi = yaffs_get_block_info(dev, block);
 
-       struct yaffs_obj *object;
-
        is_checkpt_block = (bi->block_state == YAFFS_BLOCK_STATE_CHECKPOINT);
 
        yaffs_trace(YAFFS_TRACE_TRACING,
@@ -2471,200 +2558,36 @@ static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
 
        dev->gc_disable = 1;
 
+       yaffs_summary_gc(dev, block);
+
        if (is_checkpt_block || !yaffs_still_some_chunks(dev, block)) {
                yaffs_trace(YAFFS_TRACE_TRACING,
                        "Collecting block %d that has no chunks in use",
-                       block);
+                       block);
                yaffs_block_became_dirty(dev, block);
        } else {
 
-               u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+               u8 *buffer = yaffs_get_temp_buffer(dev);
 
                yaffs_verify_blk(dev, bi, block);
 
                max_copies = (whole_block) ? dev->param.chunks_per_block : 5;
                old_chunk = block * dev->param.chunks_per_block + dev->gc_chunk;
 
-               for ( /* init already done */ ;
+               for (/* init already done */ ;
                     ret_val == YAFFS_OK &&
                     dev->gc_chunk < dev->param.chunks_per_block &&
                     (bi->block_state == YAFFS_BLOCK_STATE_COLLECTING) &&
-                    max_copies > 0; dev->gc_chunk++, old_chunk++) {
+                    max_copies > 0;
+                    dev->gc_chunk++, old_chunk++) {
                        if (yaffs_check_chunk_bit(dev, block, dev->gc_chunk)) {
-
-                               /* This page is in use and might need to be copied off */
-
+                               /* Page is in use and might need to be copied */
                                max_copies--;
-
-                               mark_flash = 1;
-
-                               yaffs_init_tags(&tags);
-
-                               yaffs_rd_chunk_tags_nand(dev, old_chunk,
-                                                        buffer, &tags);
-
-                               object = yaffs_find_by_number(dev, tags.obj_id);
-
-                               yaffs_trace(YAFFS_TRACE_GC_DETAIL,
-                                       "Collecting chunk in block %d, %d %d %d ",
-                                       dev->gc_chunk, tags.obj_id,
-                                       tags.chunk_id, tags.n_bytes);
-
-                               if (object && !yaffs_skip_verification(dev)) {
-                                       if (tags.chunk_id == 0)
-                                               matching_chunk =
-                                                   object->hdr_chunk;
-                                       else if (object->soft_del)
-                                               matching_chunk = old_chunk;     /* Defeat the test */
-                                       else
-                                               matching_chunk =
-                                                   yaffs_find_chunk_in_file
-                                                   (object, tags.chunk_id,
-                                                    NULL);
-
-                                       if (old_chunk != matching_chunk)
-                                               yaffs_trace(YAFFS_TRACE_ERROR,
-                                                       "gc: page in gc mismatch: %d %d %d %d",
-                                                       old_chunk,
-                                                       matching_chunk,
-                                                       tags.obj_id,
-                                                       tags.chunk_id);
-
-                               }
-
-                               if (!object) {
-                                       yaffs_trace(YAFFS_TRACE_ERROR,
-                                               "page %d in gc has no object: %d %d %d ",
-                                               old_chunk,
-                                               tags.obj_id, tags.chunk_id,
-                                               tags.n_bytes);
-                               }
-
-                               if (object &&
-                                   object->deleted &&
-                                   object->soft_del && tags.chunk_id != 0) {
-                                       /* Data chunk in a soft deleted file, throw it away
-                                        * It's a soft deleted data chunk,
-                                        * No need to copy this, just forget about it and
-                                        * fix up the object.
-                                        */
-
-                                       /* Free chunks already includes softdeleted chunks.
-                                        * How ever this chunk is going to soon be really deleted
-                                        * which will increment free chunks.
-                                        * We have to decrement free chunks so this works out properly.
-                                        */
-                                       dev->n_free_chunks--;
-                                       bi->soft_del_pages--;
-
-                                       object->n_data_chunks--;
-
-                                       if (object->n_data_chunks <= 0) {
-                                               /* remeber to clean up the object */
-                                               dev->gc_cleanup_list[dev->
-                                                                    n_clean_ups]
-                                                   = tags.obj_id;
-                                               dev->n_clean_ups++;
-                                       }
-                                       mark_flash = 0;
-                               } else if (0) {
-                                       /* Todo object && object->deleted && object->n_data_chunks == 0 */
-                                       /* Deleted object header with no data chunks.
-                                        * Can be discarded and the file deleted.
-                                        */
-                                       object->hdr_chunk = 0;
-                                       yaffs_free_tnode(object->my_dev,
-                                                        object->
-                                                        variant.file_variant.
-                                                        top);
-                                       object->variant.file_variant.top = NULL;
-                                       yaffs_generic_obj_del(object);
-
-                               } else if (object) {
-                                       /* It's either a data chunk in a live file or
-                                        * an ObjectHeader, so we're interested in it.
-                                        * NB Need to keep the ObjectHeaders of deleted files
-                                        * until the whole file has been deleted off
-                                        */
-                                       tags.serial_number++;
-
-                                       dev->n_gc_copies++;
-
-                                       if (tags.chunk_id == 0) {
-                                               /* It is an object Id,
-                                                * We need to nuke the shrinkheader flags first
-                                                * Also need to clean up shadowing.
-                                                * We no longer want the shrink_header flag since its work is done
-                                                * and if it is left in place it will mess up scanning.
-                                                */
-
-                                               struct yaffs_obj_hdr *oh;
-                                               oh = (struct yaffs_obj_hdr *)
-                                                   buffer;
-
-                                               oh->is_shrink = 0;
-                                               tags.extra_is_shrink = 0;
-
-                                               oh->shadows_obj = 0;
-                                               oh->inband_shadowed_obj_id = 0;
-                                               tags.extra_shadows = 0;
-
-                                               /* Update file size */
-                                               if (object->variant_type ==
-                                                   YAFFS_OBJECT_TYPE_FILE) {
-                                                       oh->file_size =
-                                                           object->variant.
-                                                           file_variant.
-                                                           file_size;
-                                                       tags.extra_length =
-                                                           oh->file_size;
-                                               }
-
-                                               yaffs_verify_oh(object, oh,
-                                                               &tags, 1);
-                                               new_chunk =
-                                                   yaffs_write_new_chunk(dev,
-                                                                         (u8 *)
-                                                                         oh,
-                                                                         &tags,
-                                                                         1);
-                                       } else {
-                                               new_chunk =
-                                                   yaffs_write_new_chunk(dev,
-                                                                         buffer,
-                                                                         &tags,
-                                                                         1);
-                                        }
-
-                                       if (new_chunk < 0) {
-                                               ret_val = YAFFS_FAIL;
-                                       } else {
-
-                                               /* Ok, now fix up the Tnodes etc. */
-
-                                               if (tags.chunk_id == 0) {
-                                                       /* It's a header */
-                                                       object->hdr_chunk =
-                                                           new_chunk;
-                                                       object->serial =
-                                                           tags.serial_number;
-                                               } else {
-                                                       /* It's a data chunk */
-                                                       int ok;
-                                                       ok = yaffs_put_chunk_in_file(object, tags.chunk_id, new_chunk, 0);
-                                               }
-                                       }
-                               }
-
-                               if (ret_val == YAFFS_OK)
-                                       yaffs_chunk_del(dev, old_chunk,
-                                                       mark_flash, __LINE__);
-
+                               ret_val = yaffs_gc_process_chunk(dev, bi,
+                                                       old_chunk, buffer);
                        }
                }
-
-               yaffs_release_temp_buffer(dev, buffer, __LINE__);
-
+               yaffs_release_temp_buffer(dev, buffer);
        }
 
        yaffs_verify_collected_blk(dev, bi, block);
@@ -2680,12 +2603,11 @@ static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
                /* Do any required cleanups */
                for (i = 0; i < dev->n_clean_ups; i++) {
                        /* Time to delete the file too */
-                       object =
+                       struct yaffs_obj *object =
                            yaffs_find_by_number(dev, dev->gc_cleanup_list[i]);
                        if (object) {
                                yaffs_free_tnode(dev,
-                                                object->variant.
-                                                file_variant.top);
+                                         object->variant.file_variant.top);
                                object->variant.file_variant.top = NULL;
                                yaffs_trace(YAFFS_TRACE_GC,
                                        "yaffs: About to finally delete object %d",
@@ -2695,7 +2617,6 @@ static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
                        }
 
                }
-
                chunks_after = yaffs_get_erased_chunks(dev);
                if (chunks_before >= chunks_after)
                        yaffs_trace(YAFFS_TRACE_GC,
@@ -2712,7 +2633,7 @@ static int yaffs_gc_block(struct yaffs_dev *dev, int block, int whole_block)
 }
 
 /*
- * FindBlockForgarbageCollection is used to select the dirtiest block (or close enough)
+ * find_gc_block() selects the dirtiest block (or close enough)
  * for garbage collection.
  */
 
@@ -2747,8 +2668,8 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
 
                /*
                 * If there is a prioritised block and none was selected then
-                * this happened because there is at least one old dirty block gumming
-                * up the works. Let's gc the oldest dirty block.
+                * this happened because there is at least one old dirty block
+                * gumming up the works. Let's gc the oldest dirty block.
                 */
 
                if (prioritised_exist &&
@@ -2759,9 +2680,9 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
                        dev->has_pending_prioritised_gc = 0;
        }
 
-       /* If we're doing aggressive GC then we are happy to take a less-dirty block, and
-        * search harder.
-        * else (we're doing a leasurely gc), then we only bother to do this if the
+       /* If we're doing aggressive GC then we are happy to take a less-dirty
+        * block, and search harder.
+        * else (leasurely gc), then we only bother to do this if the
         * block has only a few pages in use.
         */
 
@@ -2797,7 +2718,8 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
                for (i = 0;
                     i < iterations &&
                     (dev->gc_dirtiest < 1 ||
-                     dev->gc_pages_in_use > YAFFS_GC_GOOD_ENOUGH); i++) {
+                     dev->gc_pages_in_use > YAFFS_GC_GOOD_ENOUGH);
+                    i++) {
                        dev->gc_block_finder++;
                        if (dev->gc_block_finder < dev->internal_start_block ||
                            dev->gc_block_finder > dev->internal_end_block)
@@ -2810,9 +2732,9 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
 
                        if (bi->block_state == YAFFS_BLOCK_STATE_FULL &&
                            pages_used < dev->param.chunks_per_block &&
-                           (dev->gc_dirtiest < 1
-                            || pages_used < dev->gc_pages_in_use)
-                           && yaffs_block_ok_for_gc(dev, bi)) {
+                           (dev->gc_dirtiest < 1 ||
+                            pages_used < dev->gc_pages_in_use) &&
+                           yaffs_block_ok_for_gc(dev, bi)) {
                                dev->gc_dirtiest = dev->gc_block_finder;
                                dev->gc_pages_in_use = pages_used;
                        }
@@ -2823,7 +2745,7 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
        }
 
        /*
-        * If nothing has been selected for a while, try selecting the oldest dirty
+        * If nothing has been selected for a while, try the oldest dirty
         * because that's gumming up the works.
         */
 
@@ -2839,7 +2761,7 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
                            bi->pages_in_use - bi->soft_del_pages;
                } else {
                        dev->gc_not_done = 0;
-                }
+               }
        }
 
        if (selected) {
@@ -2874,7 +2796,7 @@ static unsigned yaffs_find_gc_block(struct yaffs_dev *dev,
  * If we're very low on erased blocks then we do aggressive garbage collection
  * otherwise we do "leasurely" garbage collection.
  * Aggressive gc looks further (whole array) and will accept less dirty blocks.
- * Passive gc only inspects smaller areas and will only accept more dirty blocks.
+ * Passive gc only inspects smaller areas and only accepts more dirty blocks.
  *
  * The idea is to help clear out space in a more spread-out manner.
  * Dunno if it really does anything useful.
@@ -2891,13 +2813,12 @@ static int yaffs_check_gc(struct yaffs_dev *dev, int background)
        if (dev->param.gc_control && (dev->param.gc_control(dev) & 1) == 0)
                return YAFFS_OK;
 
-       if (dev->gc_disable) {
+       if (dev->gc_disable)
                /* Bail out so we don't get recursive gc */
                return YAFFS_OK;
-       }
 
        /* This loop should pass the first time.
-        * We'll only see looping here if the collection does not increase space.
+        * Only loops here if the collection does not increase space.
         */
 
        do {
@@ -2931,7 +2852,8 @@ static int yaffs_check_gc(struct yaffs_dev *dev, int background)
 
                dev->gc_skip = 5;
 
-               /* If we don't already have a block being gc'd then see if we should start another */
+               /* If we don't already have a block being gc'd then see if we
+                * should start another */
 
                if (dev->gc_block < 1 && !aggressive) {
                        dev->gc_block = yaffs2_find_refresh_block(dev);
@@ -2957,8 +2879,8 @@ static int yaffs_check_gc(struct yaffs_dev *dev, int background)
                        gc_ok = yaffs_gc_block(dev, dev->gc_block, aggressive);
                }
 
-               if (dev->n_erased_blocks < (dev->param.n_reserved_blocks)
-                   && dev->gc_block > 0) {
+               if (dev->n_erased_blocks < (dev->param.n_reserved_blocks) &&
+                   dev->gc_block > 0) {
                        yaffs_trace(YAFFS_TRACE_GC,
                                "yaffs: GC !!!no reclaim!!! n_erased_blocks %d after try %d block %d",
                                dev->n_erased_blocks, max_tries,
@@ -3035,10 +2957,8 @@ void yaffs_chunk_del(struct yaffs_dev *dev, int chunk_id, int mark_flash,
        if (!dev->param.is_yaffs2 && mark_flash &&
            bi->block_state != YAFFS_BLOCK_STATE_COLLECTING) {
 
-               yaffs_init_tags(&tags);
-
+               memset(&tags, 0, sizeof(tags));
                tags.is_deleted = 1;
-
                yaffs_wr_chunk_tags_nand(dev, chunk_id, NULL, &tags);
                yaffs_handle_chunk_update(dev, chunk_id, &tags);
        } else {
@@ -3050,27 +2970,23 @@ void yaffs_chunk_del(struct yaffs_dev *dev, int chunk_id, int mark_flash,
         */
        if (bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING ||
            bi->block_state == YAFFS_BLOCK_STATE_FULL ||
-           bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCANNING ||
+           bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN ||
            bi->block_state == YAFFS_BLOCK_STATE_COLLECTING) {
                dev->n_free_chunks++;
-
                yaffs_clear_chunk_bit(dev, block, page);
-
                bi->pages_in_use--;
 
                if (bi->pages_in_use == 0 &&
                    !bi->has_shrink_hdr &&
                    bi->block_state != YAFFS_BLOCK_STATE_ALLOCATING &&
-                   bi->block_state != YAFFS_BLOCK_STATE_NEEDS_SCANNING) {
+                   bi->block_state != YAFFS_BLOCK_STATE_NEEDS_SCAN) {
                        yaffs_block_became_dirty(dev, block);
                }
-
        }
-
 }
 
 static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
-                            const u8 * buffer, int n_bytes, int use_reserve)
+                            const u8 *buffer, int n_bytes, int use_reserve)
 {
        /* Find old chunk Need to do this to get serial number
         * Write new one and patch into tree.
@@ -3079,10 +2995,8 @@ static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
 
        int prev_chunk_id;
        struct yaffs_ext_tags prev_tags;
-
        int new_chunk_id;
        struct yaffs_ext_tags new_tags;
-
        struct yaffs_dev *dev = in->my_dev;
 
        yaffs_check_gc(dev, 0);
@@ -3097,7 +3011,7 @@ static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
                return 0;
 
        /* Set up new tags */
-       yaffs_init_tags(&new_tags);
+       memset(&new_tags, 0, sizeof(new_tags));
 
        new_tags.chunk_id = inode_chunk;
        new_tags.obj_id = in->obj_id;
@@ -3109,7 +3023,7 @@ static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
                yaffs_trace(YAFFS_TRACE_ERROR,
                  "Writing %d bytes to chunk!!!!!!!!!",
                   n_bytes);
-               YBUG();
+               BUG();
        }
 
        new_chunk_id =
@@ -3130,11 +3044,10 @@ static int yaffs_wr_data_obj(struct yaffs_obj *in, int inode_chunk,
 
 
 static int yaffs_do_xattrib_mod(struct yaffs_obj *obj, int set,
-                               const YCHAR * name, const void *value, int size,
+                               const YCHAR *name, const void *value, int size,
                                int flags)
 {
        struct yaffs_xattr_mod xmod;
-
        int result;
 
        xmod.set = set;
@@ -3159,7 +3072,6 @@ static int yaffs_apply_xattrib_mod(struct yaffs_obj *obj, char *buffer,
        int x_offs = sizeof(struct yaffs_obj_hdr);
        struct yaffs_dev *dev = obj->my_dev;
        int x_size = dev->data_bytes_per_chunk - sizeof(struct yaffs_obj_hdr);
-
        char *x_buffer = buffer + x_offs;
 
        if (xmod->set)
@@ -3171,13 +3083,12 @@ static int yaffs_apply_xattrib_mod(struct yaffs_obj *obj, char *buffer,
 
        obj->has_xattr = nval_hasvalues(x_buffer, x_size);
        obj->xattr_known = 1;
-
        xmod->result = retval;
 
        return retval;
 }
 
-static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR * name,
+static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR *name,
                                  void *value, int size)
 {
        char *buffer = NULL;
@@ -3186,9 +3097,7 @@ static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR * name,
        struct yaffs_dev *dev = obj->my_dev;
        int x_offs = sizeof(struct yaffs_obj_hdr);
        int x_size = dev->data_bytes_per_chunk - sizeof(struct yaffs_obj_hdr);
-
        char *x_buffer;
-
        int retval = 0;
 
        if (obj->hdr_chunk < 1)
@@ -3204,7 +3113,7 @@ static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR * name,
                        return 0;
        }
 
-       buffer = (char *)yaffs_get_temp_buffer(dev, __LINE__);
+       buffer = (char *)yaffs_get_temp_buffer(dev);
        if (!buffer)
                return -ENOMEM;
 
@@ -3226,7 +3135,7 @@ static int yaffs_do_xattrib_fetch(struct yaffs_obj *obj, const YCHAR * name,
                else
                        retval = nval_list(x_buffer, x_size, value, size);
        }
-       yaffs_release_temp_buffer(dev, (u8 *) buffer, __LINE__);
+       yaffs_release_temp_buffer(dev, (u8 *) buffer);
        return retval;
 }
 
@@ -3254,44 +3163,38 @@ int yaffs_list_xattrib(struct yaffs_obj *obj, char *buffer, int size)
 
 static void yaffs_check_obj_details_loaded(struct yaffs_obj *in)
 {
-       u8 *chunk_data;
+       u8 *buf;
        struct yaffs_obj_hdr *oh;
        struct yaffs_dev *dev;
        struct yaffs_ext_tags tags;
        int result;
        int alloc_failed = 0;
 
-       if (!in)
+       if (!in || !in->lazy_loaded || in->hdr_chunk < 1)
                return;
 
        dev = in->my_dev;
+       in->lazy_loaded = 0;
+       buf = yaffs_get_temp_buffer(dev);
 
-       if (in->lazy_loaded && in->hdr_chunk > 0) {
-               in->lazy_loaded = 0;
-               chunk_data = yaffs_get_temp_buffer(dev, __LINE__);
-
-               result =
-                   yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, chunk_data,
-                                            &tags);
-               oh = (struct yaffs_obj_hdr *)chunk_data;
+       result = yaffs_rd_chunk_tags_nand(dev, in->hdr_chunk, buf, &tags);
+       oh = (struct yaffs_obj_hdr *)buf;
 
-               in->yst_mode = oh->yst_mode;
-               yaffs_load_attribs(in, oh);
-               yaffs_set_obj_name_from_oh(in, oh);
-
-               if (in->variant_type == YAFFS_OBJECT_TYPE_SYMLINK) {
-                       in->variant.symlink_variant.alias =
-                           yaffs_clone_str(oh->alias);
-                       if (!in->variant.symlink_variant.alias)
-                               alloc_failed = 1;       /* Not returned to caller */
-               }
+       in->yst_mode = oh->yst_mode;
+       yaffs_load_attribs(in, oh);
+       yaffs_set_obj_name_from_oh(in, oh);
 
-               yaffs_release_temp_buffer(dev, chunk_data, __LINE__);
+       if (in->variant_type == YAFFS_OBJECT_TYPE_SYMLINK) {
+               in->variant.symlink_variant.alias =
+                   yaffs_clone_str(oh->alias);
+               if (!in->variant.symlink_variant.alias)
+                       alloc_failed = 1;       /* Not returned */
        }
+       yaffs_release_temp_buffer(dev, buf);
 }
 
-static void yaffs_load_name_from_oh(struct yaffs_dev *dev, YCHAR * name,
-                                   const YCHAR * oh_name, int buff_size)
+static void yaffs_load_name_from_oh(struct yaffs_dev *dev, YCHAR *name,
+                                   const YCHAR *oh_name, int buff_size)
 {
 #ifdef CONFIG_YAFFS_AUTO_UNICODE
        if (dev->param.auto_unicode) {
@@ -3308,17 +3211,17 @@ static void yaffs_load_name_from_oh(struct yaffs_dev *dev, YCHAR * name,
                        }
                } else {
                        strncpy(name, oh_name + 1, buff_size - 1);
-                }
+               }
        } else {
 #else
-        {
+       {
 #endif
                strncpy(name, oh_name, buff_size - 1);
-        }
+       }
 }
 
-static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR * oh_name,
-                                   const YCHAR * name)
+static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR *oh_name,
+                                   const YCHAR *name)
 {
 #ifdef CONFIG_YAFFS_AUTO_UNICODE
 
@@ -3338,7 +3241,7 @@ static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR * oh_name,
                }
 
                if (is_ascii) {
-                       /* It is an ASCII name, so do a unicode to ascii conversion */
+                       /* It is an ASCII name, so convert unicode to ascii */
                        char *ascii_oh_name = (char *)oh_name;
                        int n = YAFFS_MAX_NAME_LENGTH - 1;
                        while (n > 0 && *name) {
@@ -3348,180 +3251,163 @@ static void yaffs_load_oh_from_name(struct yaffs_dev *dev, YCHAR * oh_name,
                                n--;
                        }
                } else {
-                       /* It is a unicode name, so save starting at the second YCHAR */
+                       /* Unicode name, so save starting at the second YCHAR */
                        *oh_name = 0;
-                       strncpy(oh_name + 1, name,
-                                     YAFFS_MAX_NAME_LENGTH - 2);
+                       strncpy(oh_name + 1, name, YAFFS_MAX_NAME_LENGTH - 2);
                }
        } else {
 #else
-        {
+       {
 #endif
                strncpy(oh_name, name, YAFFS_MAX_NAME_LENGTH - 1);
-        }
-
+       }
 }
 
 /* UpdateObjectHeader updates the header on NAND for an object.
  * If name is not NULL, then that new name is used.
  */
-int yaffs_update_oh(struct yaffs_obj *in, const YCHAR * name, int force,
+int yaffs_update_oh(struct yaffs_obj *in, const YCHAR *name, int force,
                    int is_shrink, int shadows, struct yaffs_xattr_mod *xmod)
 {
 
        struct yaffs_block_info *bi;
-
        struct yaffs_dev *dev = in->my_dev;
-
        int prev_chunk_id;
        int ret_val = 0;
        int result = 0;
-
        int new_chunk_id;
        struct yaffs_ext_tags new_tags;
        struct yaffs_ext_tags old_tags;
        const YCHAR *alias = NULL;
-
        u8 *buffer = NULL;
        YCHAR old_name[YAFFS_MAX_NAME_LENGTH + 1];
-
        struct yaffs_obj_hdr *oh = NULL;
 
        strcpy(old_name, _Y("silly old name"));
 
-       if (!in->fake || in == dev->root_dir ||
-           force || xmod) {
-
-               yaffs_check_gc(dev, 0);
-               yaffs_check_obj_details_loaded(in);
-
-               buffer = yaffs_get_temp_buffer(in->my_dev, __LINE__);
-               oh = (struct yaffs_obj_hdr *)buffer;
-
-               prev_chunk_id = in->hdr_chunk;
-
-               if (prev_chunk_id > 0) {
-                       result = yaffs_rd_chunk_tags_nand(dev, prev_chunk_id,
-                                                         buffer, &old_tags);
-
-                       yaffs_verify_oh(in, oh, &old_tags, 0);
-
-                       memcpy(old_name, oh->name, sizeof(oh->name));
-                       memset(buffer, 0xFF, sizeof(struct yaffs_obj_hdr));
-               } else {
-                       memset(buffer, 0xFF, dev->data_bytes_per_chunk);
-                }
-
-               oh->type = in->variant_type;
-               oh->yst_mode = in->yst_mode;
-               oh->shadows_obj = oh->inband_shadowed_obj_id = shadows;
+       if (in->fake && in != dev->root_dir && !force && !xmod)
+               return ret_val;
 
-               yaffs_load_attribs_oh(oh, in);
+       yaffs_check_gc(dev, 0);
+       yaffs_check_obj_details_loaded(in);
 
-               if (in->parent)
-                       oh->parent_obj_id = in->parent->obj_id;
-               else
-                       oh->parent_obj_id = 0;
+       buffer = yaffs_get_temp_buffer(in->my_dev);
+       oh = (struct yaffs_obj_hdr *)buffer;
 
-               if (name && *name) {
-                       memset(oh->name, 0, sizeof(oh->name));
-                       yaffs_load_oh_from_name(dev, oh->name, name);
-               } else if (prev_chunk_id > 0) {
-                       memcpy(oh->name, old_name, sizeof(oh->name));
-               } else {
-                       memset(oh->name, 0, sizeof(oh->name));
-                }
+       prev_chunk_id = in->hdr_chunk;
 
-               oh->is_shrink = is_shrink;
+       if (prev_chunk_id > 0) {
+               result = yaffs_rd_chunk_tags_nand(dev, prev_chunk_id,
+                                                 buffer, &old_tags);
 
-               switch (in->variant_type) {
-               case YAFFS_OBJECT_TYPE_UNKNOWN:
-                       /* Should not happen */
-                       break;
-               case YAFFS_OBJECT_TYPE_FILE:
-                       oh->file_size =
-                           (oh->parent_obj_id == YAFFS_OBJECTID_DELETED
-                            || oh->parent_obj_id ==
-                            YAFFS_OBJECTID_UNLINKED) ? 0 : in->
-                           variant.file_variant.file_size;
-                       break;
-               case YAFFS_OBJECT_TYPE_HARDLINK:
-                       oh->equiv_id = in->variant.hardlink_variant.equiv_id;
-                       break;
-               case YAFFS_OBJECT_TYPE_SPECIAL:
-                       /* Do nothing */
-                       break;
-               case YAFFS_OBJECT_TYPE_DIRECTORY:
-                       /* Do nothing */
-                       break;
-               case YAFFS_OBJECT_TYPE_SYMLINK:
-                       alias = in->variant.symlink_variant.alias;
-                       if (!alias)
-                               alias = _Y("no alias");
-                       strncpy(oh->alias, alias, YAFFS_MAX_ALIAS_LENGTH);
-                       oh->alias[YAFFS_MAX_ALIAS_LENGTH] = 0;
-                       break;
-               }
+               yaffs_verify_oh(in, oh, &old_tags, 0);
+               memcpy(old_name, oh->name, sizeof(oh->name));
+               memset(buffer, 0xff, sizeof(struct yaffs_obj_hdr));
+       } else {
+               memset(buffer, 0xff, dev->data_bytes_per_chunk);
+       }
 
-               /* process any xattrib modifications */
-               if (xmod)
-                       yaffs_apply_xattrib_mod(in, (char *)buffer, xmod);
+       oh->type = in->variant_type;
+       oh->yst_mode = in->yst_mode;
+       oh->shadows_obj = oh->inband_shadowed_obj_id = shadows;
 
-               /* Tags */
-               yaffs_init_tags(&new_tags);
-               in->serial++;
-               new_tags.chunk_id = 0;
-               new_tags.obj_id = in->obj_id;
-               new_tags.serial_number = in->serial;
+       yaffs_load_attribs_oh(oh, in);
 
-               /* Add extra info for file header */
+       if (in->parent)
+               oh->parent_obj_id = in->parent->obj_id;
+       else
+               oh->parent_obj_id = 0;
 
-               new_tags.extra_available = 1;
-               new_tags.extra_parent_id = oh->parent_obj_id;
-               new_tags.extra_length = oh->file_size;
-               new_tags.extra_is_shrink = oh->is_shrink;
-               new_tags.extra_equiv_id = oh->equiv_id;
-               new_tags.extra_shadows = (oh->shadows_obj > 0) ? 1 : 0;
-               new_tags.extra_obj_type = in->variant_type;
+       if (name && *name) {
+               memset(oh->name, 0, sizeof(oh->name));
+               yaffs_load_oh_from_name(dev, oh->name, name);
+       } else if (prev_chunk_id > 0) {
+               memcpy(oh->name, old_name, sizeof(oh->name));
+       } else {
+               memset(oh->name, 0, sizeof(oh->name));
+       }
 
-               yaffs_verify_oh(in, oh, &new_tags, 1);
+       oh->is_shrink = is_shrink;
 
-               /* Create new chunk in NAND */
-               new_chunk_id =
-                   yaffs_write_new_chunk(dev, buffer, &new_tags,
-                                         (prev_chunk_id > 0) ? 1 : 0);
+       switch (in->variant_type) {
+       case YAFFS_OBJECT_TYPE_UNKNOWN:
+               /* Should not happen */
+               break;
+       case YAFFS_OBJECT_TYPE_FILE:
+               oh->file_size =
+                   (oh->parent_obj_id == YAFFS_OBJECTID_DELETED ||
+                    oh->parent_obj_id == YAFFS_OBJECTID_UNLINKED) ?
+                    0 : in->variant.file_variant.file_size;
+               break;
+       case YAFFS_OBJECT_TYPE_HARDLINK:
+               oh->equiv_id = in->variant.hardlink_variant.equiv_id;
+               break;
+       case YAFFS_OBJECT_TYPE_SPECIAL:
+               /* Do nothing */
+               break;
+       case YAFFS_OBJECT_TYPE_DIRECTORY:
+               /* Do nothing */
+               break;
+       case YAFFS_OBJECT_TYPE_SYMLINK:
+               alias = in->variant.symlink_variant.alias;
+               if (!alias)
+                       alias = _Y("no alias");
+               strncpy(oh->alias, alias, YAFFS_MAX_ALIAS_LENGTH);
+               oh->alias[YAFFS_MAX_ALIAS_LENGTH] = 0;
+               break;
+       }
 
-               if (new_chunk_id >= 0) {
+       /* process any xattrib modifications */
+       if (xmod)
+               yaffs_apply_xattrib_mod(in, (char *)buffer, xmod);
 
-                       in->hdr_chunk = new_chunk_id;
+       /* Tags */
+       memset(&new_tags, 0, sizeof(new_tags));
+       in->serial++;
+       new_tags.chunk_id = 0;
+       new_tags.obj_id = in->obj_id;
+       new_tags.serial_number = in->serial;
+
+       /* Add extra info for file header */
+       new_tags.extra_available = 1;
+       new_tags.extra_parent_id = oh->parent_obj_id;
+       new_tags.extra_length = oh->file_size;
+       new_tags.extra_is_shrink = oh->is_shrink;
+       new_tags.extra_equiv_id = oh->equiv_id;
+       new_tags.extra_shadows = (oh->shadows_obj > 0) ? 1 : 0;
+       new_tags.extra_obj_type = in->variant_type;
+       yaffs_verify_oh(in, oh, &new_tags, 1);
+
+       /* Create new chunk in NAND */
+       new_chunk_id =
+           yaffs_write_new_chunk(dev, buffer, &new_tags,
+                                 (prev_chunk_id > 0) ? 1 : 0);
 
-                       if (prev_chunk_id > 0) {
-                               yaffs_chunk_del(dev, prev_chunk_id, 1,
-                                               __LINE__);
-                       }
+       if (buffer)
+               yaffs_release_temp_buffer(dev, buffer);
 
-                       if (!yaffs_obj_cache_dirty(in))
-                               in->dirty = 0;
+       if (new_chunk_id < 0)
+               return new_chunk_id;
 
-                       /* If this was a shrink, then mark the block that the chunk lives on */
-                       if (is_shrink) {
-                               bi = yaffs_get_block_info(in->my_dev,
-                                                         new_chunk_id /
-                                                         in->my_dev->param.
-                                                         chunks_per_block);
-                               bi->has_shrink_hdr = 1;
-                       }
+       in->hdr_chunk = new_chunk_id;
 
-               }
+       if (prev_chunk_id > 0)
+               yaffs_chunk_del(dev, prev_chunk_id, 1, __LINE__);
 
-               ret_val = new_chunk_id;
+       if (!yaffs_obj_cache_dirty(in))
+               in->dirty = 0;
 
+       /* If this was a shrink, then mark the block
+        * that the chunk lives on */
+       if (is_shrink) {
+               bi = yaffs_get_block_info(in->my_dev,
+                                         new_chunk_id /
+                                         in->my_dev->param.chunks_per_block);
+               bi->has_shrink_hdr = 1;
        }
 
-       if (buffer)
-               yaffs_release_temp_buffer(dev, buffer, __LINE__);
 
-       return ret_val;
+       return new_chunk_id;
 }
 
 /*--------------------- File read/write ------------------------
@@ -3536,21 +3422,17 @@ int yaffs_update_oh(struct yaffs_obj *in, const YCHAR * name, int force,
 
 int yaffs_file_rd(struct yaffs_obj *in, u8 * buffer, loff_t offset, int n_bytes)
 {
-
        int chunk;
        u32 start;
        int n_copy;
        int n = n_bytes;
        int n_done = 0;
        struct yaffs_cache *cache;
-
        struct yaffs_dev *dev;
 
        dev = in->my_dev;
 
        while (n > 0) {
-               /* chunk = offset / dev->data_bytes_per_chunk + 1; */
-               /* start = offset % dev->data_bytes_per_chunk; */
                yaffs_addr_to_chunk(dev, offset, &chunk, &start);
                chunk++;
 
@@ -3564,15 +3446,16 @@ int yaffs_file_rd(struct yaffs_obj *in, u8 * buffer, loff_t offset, int n_bytes)
 
                cache = yaffs_find_chunk_cache(in, chunk);
 
-               /* If the chunk is already in the cache or it is less than a whole chunk
-                * or we're using inband tags then use the cache (if there is caching)
-                * else bypass the cache.
+               /* If the chunk is already in the cache or it is less than
+                * a whole chunk or we're using inband tags then use the cache
+                * (if there is caching) else bypass the cache.
                 */
-               if (cache || n_copy != dev->data_bytes_per_chunk
-                   || dev->param.inband_tags) {
+               if (cache || n_copy != dev->data_bytes_per_chunk ||
+                   dev->param.inband_tags) {
                        if (dev->param.n_caches > 0) {
 
-                               /* If we can't find the data in the cache, then load it up. */
+                               /* If we can't find the data in the cache,
+                                * then load it up. */
 
                                if (!cache) {
                                        cache =
@@ -3597,33 +3480,26 @@ int yaffs_file_rd(struct yaffs_obj *in, u8 * buffer, loff_t offset, int n_bytes)
                                /* Read into the local buffer then copy.. */
 
                                u8 *local_buffer =
-                                   yaffs_get_temp_buffer(dev, __LINE__);
+                                   yaffs_get_temp_buffer(dev);
                                yaffs_rd_data_obj(in, chunk, local_buffer);
 
                                memcpy(buffer, &local_buffer[start], n_copy);
 
-                               yaffs_release_temp_buffer(dev, local_buffer,
-                                                         __LINE__);
+                               yaffs_release_temp_buffer(dev, local_buffer);
                        }
-
                } else {
-
-                       /* A full chunk. Read directly into the supplied buffer. */
+                       /* A full chunk. Read directly into the buffer. */
                        yaffs_rd_data_obj(in, chunk, buffer);
-
                }
-
                n -= n_copy;
                offset += n_copy;
                buffer += n_copy;
                n_done += n_copy;
-
        }
-
        return n_done;
 }
 
-int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
+int yaffs_do_file_wr(struct yaffs_obj *in, const u8 *buffer, loff_t offset,
                     int n_bytes, int write_trhrough)
 {
 
@@ -3637,7 +3513,6 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
        int chunk_written = 0;
        u32 n_bytes_read;
        u32 chunk_start;
-
        struct yaffs_dev *dev;
 
        dev = in->my_dev;
@@ -3660,9 +3535,10 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
                if ((start + n) < dev->data_bytes_per_chunk) {
                        n_copy = n;
 
-                       /* Now folks, to calculate how many bytes to write back....
-                        * If we're overwriting and not writing to then end of file then
-                        * we need to write back as much as was there before.
+                       /* Now calculate how many bytes to write back....
+                        * If we're overwriting and not writing to then end of
+                        * file then we need to write back as much as was there
+                        * before.
                         */
 
                        chunk_start = ((chunk - 1) * dev->data_bytes_per_chunk);
@@ -3681,27 +3557,30 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
                            (n_bytes_read >
                             (start + n)) ? n_bytes_read : (start + n);
 
-                       if (n_writeback < 0
-                           || n_writeback > dev->data_bytes_per_chunk)
-                               YBUG();
+                       if (n_writeback < 0 ||
+                           n_writeback > dev->data_bytes_per_chunk)
+                               BUG();
 
                } else {
                        n_copy = dev->data_bytes_per_chunk - start;
                        n_writeback = dev->data_bytes_per_chunk;
                }
 
-               if (n_copy != dev->data_bytes_per_chunk
-                   || dev->param.inband_tags) {
-                       /* An incomplete start or end chunk (or maybe both start and end chunk),
-                        * or we're using inband tags, so we want to use the cache buffers.
+               if (n_copy != dev->data_bytes_per_chunk ||
+                   dev->param.inband_tags) {
+                       /* An incomplete start or end chunk (or maybe both
+                        * start and end chunk), or we're using inband tags,
+                        * so we want to use the cache buffers.
                         */
                        if (dev->param.n_caches > 0) {
                                struct yaffs_cache *cache;
-                               /* If we can't find the data in the cache, then load the cache */
+
+                               /* If we can't find the data in the cache, then
+                                * load the cache */
                                cache = yaffs_find_chunk_cache(in, chunk);
 
-                               if (!cache
-                                   && yaffs_check_alloc_available(dev, 1)) {
+                               if (!cache &&
+                                   yaffs_check_alloc_available(dev, 1)) {
                                        cache = yaffs_grab_chunk_cache(dev);
                                        cache->object = in;
                                        cache->chunk_id = chunk;
@@ -3713,8 +3592,9 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
                                           !cache->dirty &&
                                           !yaffs_check_alloc_available(dev,
                                                                        1)) {
-                                       /* Drop the cache if it was a read cache item and
-                                        * no space check has been made for it.
+                                       /* Drop the cache if it was a read cache
+                                        * item and no space check has been made
+                                        * for it.
                                         */
                                        cache = NULL;
                                }
@@ -3738,20 +3618,18 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
                                                     cache->n_bytes, 1);
                                                cache->dirty = 0;
                                        }
-
                                } else {
-                                       chunk_written = -1;     /* fail the write */
+                                       chunk_written = -1;     /* fail write */
                                }
                        } else {
-                               /* An incomplete start or end chunk (or maybe both start and end chunk)
-                                * Read into the local buffer then copy, then copy over and write back.
+                               /* An incomplete start or end chunk (or maybe
+                                * both start and end chunk). Read into the
+                                * local buffer then copy over and write back.
                                 */
 
-                               u8 *local_buffer =
-                                   yaffs_get_temp_buffer(dev, __LINE__);
+                               u8 *local_buffer = yaffs_get_temp_buffer(dev);
 
                                yaffs_rd_data_obj(in, chunk, local_buffer);
-
                                memcpy(&local_buffer[start], buffer, n_copy);
 
                                chunk_written =
@@ -3759,19 +3637,17 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
                                                      local_buffer,
                                                      n_writeback, 0);
 
-                               yaffs_release_temp_buffer(dev, local_buffer,
-                                                         __LINE__);
-
+                               yaffs_release_temp_buffer(dev, local_buffer);
                        }
-
                } else {
-                       /* A full chunk. Write directly from the supplied buffer. */
+                       /* A full chunk. Write directly from the buffer. */
 
                        chunk_written =
                            yaffs_wr_data_obj(in, chunk, buffer,
                                              dev->data_bytes_per_chunk, 0);
 
-                       /* Since we've overwritten the cached data, we better invalidate it. */
+                       /* Since we've overwritten the cached data,
+                        * we better invalidate it. */
                        yaffs_invalidate_chunk_cache(in, chunk);
                }
 
@@ -3781,7 +3657,6 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
                        buffer += n_copy;
                        n_done += n_copy;
                }
-
        }
 
        /* Update file object */
@@ -3790,11 +3665,10 @@ int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
                in->variant.file_variant.file_size = (start_write + n_done);
 
        in->dirty = 1;
-
        return n_done;
 }
 
-int yaffs_wr_file(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
+int yaffs_wr_file(struct yaffs_obj *in, const u8 *buffer, loff_t offset,
                  int n_bytes, int write_trhrough)
 {
        yaffs2_handle_hole(in, offset);
@@ -3808,13 +3682,12 @@ static void yaffs_prune_chunks(struct yaffs_obj *in, int new_size)
 
        struct yaffs_dev *dev = in->my_dev;
        int old_size = in->variant.file_variant.file_size;
-
+       int i;
+       int chunk_id;
        int last_del = 1 + (old_size - 1) / dev->data_bytes_per_chunk;
-
        int start_del = 1 + (new_size + dev->data_bytes_per_chunk - 1) /
            dev->data_bytes_per_chunk;
-       int i;
-       int chunk_id;
+
 
        /* Delete backwards so that we don't end up with holes if
         * power is lost part-way through the operation.
@@ -3826,23 +3699,23 @@ static void yaffs_prune_chunks(struct yaffs_obj *in, int new_size)
                 */
 
                chunk_id = yaffs_find_del_file_chunk(in, i, NULL);
-               if (chunk_id > 0) {
-                       if (chunk_id <
-                           (dev->internal_start_block *
-                            dev->param.chunks_per_block)
-                           || chunk_id >=
-                           ((dev->internal_end_block +
-                             1) * dev->param.chunks_per_block)) {
-                               yaffs_trace(YAFFS_TRACE_ALWAYS,
-                                       "Found daft chunk_id %d for %d",
-                                       chunk_id, i);
-                       } else {
-                               in->n_data_chunks--;
-                               yaffs_chunk_del(dev, chunk_id, 1, __LINE__);
-                       }
+
+               if (chunk_id < 1)
+                       continue;
+
+               if (chunk_id <
+                   (dev->internal_start_block * dev->param.chunks_per_block) ||
+                   chunk_id >=
+                   ((dev->internal_end_block + 1) *
+                     dev->param.chunks_per_block)) {
+                       yaffs_trace(YAFFS_TRACE_ALWAYS,
+                               "Found daft chunk_id %d for %d",
+                               chunk_id, i);
+               } else {
+                       in->n_data_chunks--;
+                       yaffs_chunk_del(dev, chunk_id, 1, __LINE__);
                }
        }
-
 }
 
 void yaffs_resize_file_down(struct yaffs_obj *obj, loff_t new_size)
@@ -3857,7 +3730,7 @@ void yaffs_resize_file_down(struct yaffs_obj *obj, loff_t new_size)
 
        if (new_partial != 0) {
                int last_chunk = 1 + new_full;
-               u8 *local_buffer = yaffs_get_temp_buffer(dev, __LINE__);
+               u8 *local_buffer = yaffs_get_temp_buffer(dev);
 
                /* Rewrite the last chunk with its new size and zero pad */
                yaffs_rd_data_obj(obj, last_chunk, local_buffer);
@@ -3867,7 +3740,7 @@ void yaffs_resize_file_down(struct yaffs_obj *obj, loff_t new_size)
                yaffs_wr_data_obj(obj, last_chunk, local_buffer,
                                  new_partial, 1);
 
-               yaffs_release_temp_buffer(dev, local_buffer, __LINE__);
+               yaffs_release_temp_buffer(dev, local_buffer);
        }
 
        obj->variant.file_variant.file_size = new_size;
@@ -3915,24 +3788,19 @@ int yaffs_resize_file(struct yaffs_obj *in, loff_t new_size)
 
 int yaffs_flush_file(struct yaffs_obj *in, int update_time, int data_sync)
 {
-       int ret_val;
-       if (in->dirty) {
-               yaffs_flush_file_cache(in);
-               if (data_sync)  /* Only sync data */
-                       ret_val = YAFFS_OK;
-               else {
-                       if (update_time)
-                               yaffs_load_current_time(in, 0, 0);
+       if (!in->dirty)
+               return YAFFS_OK;
 
-                       ret_val = (yaffs_update_oh(in, NULL, 0, 0, 0, NULL) >=
-                                  0) ? YAFFS_OK : YAFFS_FAIL;
-               }
-       } else {
-               ret_val = YAFFS_OK;
-       }
+       yaffs_flush_file_cache(in);
 
-       return ret_val;
+       if (data_sync)
+               return YAFFS_OK;
 
+       if (update_time)
+               yaffs_load_current_time(in, 0, 0);
+
+       return (yaffs_update_oh(in, NULL, 0, 0, 0, NULL) >= 0) ?
+                               YAFFS_OK : YAFFS_FAIL;
 }
 
 
@@ -3942,7 +3810,6 @@ int yaffs_flush_file(struct yaffs_obj *in, int update_time, int data_sync)
  */
 static int yaffs_unlink_file_if_needed(struct yaffs_obj *in)
 {
-
        int ret_val;
        int del_now = 0;
        struct yaffs_dev *dev = in->my_dev;
@@ -3967,14 +3834,13 @@ static int yaffs_unlink_file_if_needed(struct yaffs_obj *in)
                    yaffs_change_obj_name(in, in->my_dev->unlinked_dir,
                                          _Y("unlinked"), 0, 0);
        }
-
        return ret_val;
 }
 
 int yaffs_del_file(struct yaffs_obj *in)
 {
        int ret_val = YAFFS_OK;
-       int deleted;            /* Need to cache value on stack if in is freed */
+       int deleted;    /* Need to cache value on stack if in is freed */
        struct yaffs_dev *dev = in->my_dev;
 
        if (dev->param.disable_soft_del || dev->param.is_yaffs2)
@@ -4009,8 +3875,8 @@ int yaffs_del_file(struct yaffs_obj *in)
 int yaffs_is_non_empty_dir(struct yaffs_obj *obj)
 {
        return (obj &&
-               obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY) &&
-               !(list_empty(&obj->variant.dir_variant.children));
+               obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY) &&
+               !(list_empty(&obj->variant.dir_variant.children));
 }
 
 static int yaffs_del_dir(struct yaffs_obj *obj)
@@ -4024,8 +3890,7 @@ static int yaffs_del_dir(struct yaffs_obj *obj)
 
 static int yaffs_del_symlink(struct yaffs_obj *in)
 {
-       if (in->variant.symlink_variant.alias)
-               kfree(in->variant.symlink_variant.alias);
+       kfree(in->variant.symlink_variant.alias);
        in->variant.symlink_variant.alias = NULL;
 
        return yaffs_generic_obj_del(in);
@@ -4033,7 +3898,7 @@ static int yaffs_del_symlink(struct yaffs_obj *in)
 
 static int yaffs_del_link(struct yaffs_obj *in)
 {
-       /* remove this hardlink from the list assocaited with the equivalent
+       /* remove this hardlink from the list associated with the equivalent
         * object
         */
        list_del_init(&in->hard_links);
@@ -4043,6 +3908,7 @@ static int yaffs_del_link(struct yaffs_obj *in)
 int yaffs_del_obj(struct yaffs_obj *obj)
 {
        int ret_val = -1;
+
        switch (obj->variant_type) {
        case YAFFS_OBJECT_TYPE_FILE:
                ret_val = yaffs_del_file(obj);
@@ -4069,17 +3935,15 @@ int yaffs_del_obj(struct yaffs_obj *obj)
                ret_val = 0;
                break;          /* should not happen. */
        }
-
        return ret_val;
 }
 
 static int yaffs_unlink_worker(struct yaffs_obj *obj)
 {
-
        int del_now = 0;
 
-       if(!obj)
-               return YAFFS_FAIL;
+       if (!obj)
+               return YAFFS_FAIL;
 
        if (!obj->my_inode)
                del_now = 1;
@@ -4098,7 +3962,7 @@ static int yaffs_unlink_worker(struct yaffs_obj *obj)
                 * Instead, we do the following:
                 * - Select a hardlink.
                 * - Unhook it from the hard links
-                * - Move it from its parent directory (so that the rename can work)
+                * - Move it from its parent directory so that the rename works.
                 * - Rename the object to the hardlink's name.
                 * - Delete the hardlink
                 */
@@ -4149,21 +4013,19 @@ static int yaffs_unlink_worker(struct yaffs_obj *obj)
                return YAFFS_FAIL;
        } else {
                return yaffs_change_obj_name(obj, obj->my_dev->unlinked_dir,
-                                            _Y("unlinked"), 0, 0);
-        }
+                                               _Y("unlinked"), 0, 0);
+       }
 }
 
 static int yaffs_unlink_obj(struct yaffs_obj *obj)
 {
-
        if (obj && obj->unlink_allowed)
                return yaffs_unlink_worker(obj);
 
        return YAFFS_FAIL;
-
 }
 
-int yaffs_unlinker(struct yaffs_obj *dir, const YCHAR * name)
+int yaffs_unlinker(struct yaffs_obj *dir, const YCHAR *name)
 {
        struct yaffs_obj *obj;
 
@@ -4174,8 +4036,8 @@ int yaffs_unlinker(struct yaffs_obj *dir, const YCHAR * name)
 /* Note:
  * If old_name is NULL then we take old_dir as the object to be renamed.
  */
-int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR * old_name,
-                    struct yaffs_obj *new_dir, const YCHAR * new_name)
+int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR *old_name,
+                    struct yaffs_obj *new_dir, const YCHAR *new_name)
 {
        struct yaffs_obj *obj = NULL;
        struct yaffs_obj *existing_target = NULL;
@@ -4183,10 +4045,14 @@ int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR * old_name,
        int result;
        struct yaffs_dev *dev;
 
-       if (!old_dir || old_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
-               YBUG();
-       if (!new_dir || new_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
-               YBUG();
+       if (!old_dir || old_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
+               BUG();
+               return YAFFS_FAIL;
+       }
+       if (!new_dir || new_dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
+               BUG();
+               return YAFFS_FAIL;
+       }
 
        dev = old_dir->my_dev;
 
@@ -4195,8 +4061,8 @@ int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR * old_name,
         * While look-up is case insensitive, the name isn't.
         * Therefore we might want to change x.txt to X.txt
         */
-       if (old_dir == new_dir && 
-               old_name && new_name && 
+       if (old_dir == new_dir &&
+               old_name && new_name &&
                strcmp(old_name, new_name) == 0)
                force = 1;
 #endif
@@ -4206,26 +4072,24 @@ int yaffs_rename_obj(struct yaffs_obj *old_dir, const YCHAR * old_name,
                /* ENAMETOOLONG */
                return YAFFS_FAIL;
 
-       if(old_name)
+       if (old_name)
                obj = yaffs_find_by_name(old_dir, old_name);
        else{
                obj = old_dir;
                old_dir = obj->parent;
        }
 
-
        if (obj && obj->rename_allowed) {
-
-               /* Now do the handling for an existing target, if there is one */
-
+               /* Now handle an existing target, if there is one */
                existing_target = yaffs_find_by_name(new_dir, new_name);
-               if (yaffs_is_non_empty_dir(existing_target)){
+               if (yaffs_is_non_empty_dir(existing_target)) {
                        return YAFFS_FAIL;      /* ENOTEMPTY */
                } else if (existing_target && existing_target != obj) {
                        /* Nuke the target first, using shadowing,
                         * but only if it isn't the same object.
                         *
-                        * Note we must disable gc otherwise it can mess up the shadowing.
+                        * Note we must disable gc here otherwise it can mess
+                        * up the shadowing.
                         *
                         */
                        dev->gc_disable = 1;
@@ -4254,12 +4118,7 @@ void yaffs_handle_shadowed_obj(struct yaffs_dev *dev, int obj_id,
 {
        struct yaffs_obj *obj;
 
-       if (!backward_scanning) {
-               /* Handle YAFFS1 forward scanning case
-                * For YAFFS1 we always do the deletion
-                */
-
-       } else {
+       if (backward_scanning) {
                /* Handle YAFFS2 case (backward scanning)
                 * If the shadowed object exists then ignore.
                 */
@@ -4268,7 +4127,8 @@ void yaffs_handle_shadowed_obj(struct yaffs_dev *dev, int obj_id,
                        return;
        }
 
-       /* Let's create it (if it does not exist) assuming it is a file so that it can do shrinking etc.
+       /* Let's create it (if it does not exist) assuming it is a file so that
+        * it can do shrinking etc.
         * We put it in unlinked dir to be cleaned up after the scanning
         */
        obj =
@@ -4278,22 +4138,20 @@ void yaffs_handle_shadowed_obj(struct yaffs_dev *dev, int obj_id,
        obj->is_shadowed = 1;
        yaffs_add_obj_to_dir(dev->unlinked_dir, obj);
        obj->variant.file_variant.shrink_size = 0;
-       obj->valid = 1;         /* So that we don't read any other info for this file */
-
+       obj->valid = 1;         /* So that we don't read any other info. */
 }
 
-void yaffs_link_fixup(struct yaffs_dev *dev, struct yaffs_obj *hard_list)
+void yaffs_link_fixup(struct yaffs_dev *dev, struct list_head *hard_list)
 {
+       struct list_head *lh;
+       struct list_head *save;
        struct yaffs_obj *hl;
        struct yaffs_obj *in;
 
-       while (hard_list) {
-               hl = hard_list;
-               hard_list = (struct yaffs_obj *)(hard_list->hard_links.next);
-
+       list_for_each_safe(lh, save, hard_list) {
+               hl = list_entry(lh, struct yaffs_obj, hard_links);
                in = yaffs_find_by_number(dev,
-                                         hl->variant.
-                                         hardlink_variant.equiv_id);
+                                       hl->variant.hardlink_variant.equiv_id);
 
                if (in) {
                        /* Add the hardlink pointers */
@@ -4305,7 +4163,6 @@ void yaffs_link_fixup(struct yaffs_dev *dev, struct yaffs_obj *hard_list)
                         */
                        hl->variant.hardlink_variant.equiv_obj = NULL;
                        INIT_LIST_HEAD(&hl->hard_links);
-
                }
        }
 }
@@ -4325,19 +4182,14 @@ static void yaffs_strip_deleted_objs(struct yaffs_dev *dev)
        /* Soft delete all the unlinked files */
        list_for_each_safe(i, n,
                           &dev->unlinked_dir->variant.dir_variant.children) {
-               if (i) {
-                       l = list_entry(i, struct yaffs_obj, siblings);
-                       yaffs_del_obj(l);
-               }
+               l = list_entry(i, struct yaffs_obj, siblings);
+               yaffs_del_obj(l);
        }
 
        list_for_each_safe(i, n, &dev->del_dir->variant.dir_variant.children) {
-               if (i) {
-                       l = list_entry(i, struct yaffs_obj, siblings);
-                       yaffs_del_obj(l);
-               }
+               l = list_entry(i, struct yaffs_obj, siblings);
+               yaffs_del_obj(l);
        }
-
 }
 
 /*
@@ -4348,13 +4200,14 @@ static void yaffs_strip_deleted_objs(struct yaffs_dev *dev)
  * - Directly or indirectly under root.
  *
  * Note:
- *  This code assumes that we don't ever change the current relationships between
- *  directories:
+ *  This code assumes that we don't ever change the current relationships
+ *  between directories:
  *   root_dir->parent == unlinked_dir->parent == del_dir->parent == NULL
  *   lost-n-found->parent == root_dir
  *
- * This fixes the problem where directories might have inadvertently been deleted
- * leaving the object "hanging" without being rooted in the directory tree.
+ * This fixes the problem where directories might have inadvertently been
+ * deleted leaving the object "hanging" without being rooted in the
+ * directory tree.
  */
 
 static int yaffs_has_null_parent(struct yaffs_dev *dev, struct yaffs_obj *obj)
@@ -4383,45 +4236,42 @@ static void yaffs_fix_hanging_objs(struct yaffs_dev *dev)
 
        for (i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) {
                list_for_each_safe(lh, n, &dev->obj_bucket[i].list) {
-                       if (lh) {
-                               obj =
-                                   list_entry(lh, struct yaffs_obj, hash_link);
-                               parent = obj->parent;
-
-                               if (yaffs_has_null_parent(dev, obj)) {
-                                       /* These directories are not hanging */
-                                       hanging = 0;
-                               } else if (!parent
-                                          || parent->variant_type !=
-                                          YAFFS_OBJECT_TYPE_DIRECTORY) {
-                                       hanging = 1;
-                               } else if (yaffs_has_null_parent(dev, parent)) {
-                                       hanging = 0;
-                               } else {
-                                       /*
-                                        * Need to follow the parent chain to see if it is hanging.
-                                        */
-                                       hanging = 0;
-                                       depth_limit = 100;
-
-                                       while (parent != dev->root_dir &&
-                                              parent->parent &&
-                                              parent->parent->variant_type ==
-                                              YAFFS_OBJECT_TYPE_DIRECTORY
-                                              && depth_limit > 0) {
-                                               parent = parent->parent;
-                                               depth_limit--;
-                                       }
-                                       if (parent != dev->root_dir)
-                                               hanging = 1;
-                               }
-                               if (hanging) {
-                                       yaffs_trace(YAFFS_TRACE_SCAN,
-                                               "Hanging object %d moved to lost and found",
-                                               obj->obj_id);
-                                       yaffs_add_obj_to_dir(dev->lost_n_found,
-                                                            obj);
+                       obj = list_entry(lh, struct yaffs_obj, hash_link);
+                       parent = obj->parent;
+
+                       if (yaffs_has_null_parent(dev, obj)) {
+                               /* These directories are not hanging */
+                               hanging = 0;
+                       } else if (!parent ||
+                                  parent->variant_type !=
+                                  YAFFS_OBJECT_TYPE_DIRECTORY) {
+                               hanging = 1;
+                       } else if (yaffs_has_null_parent(dev, parent)) {
+                               hanging = 0;
+                       } else {
+                               /*
+                                * Need to follow the parent chain to
+                                * see if it is hanging.
+                                */
+                               hanging = 0;
+                               depth_limit = 100;
+
+                               while (parent != dev->root_dir &&
+                                      parent->parent &&
+                                      parent->parent->variant_type ==
+                                      YAFFS_OBJECT_TYPE_DIRECTORY &&
+                                      depth_limit > 0) {
+                                       parent = parent->parent;
+                                       depth_limit--;
                                }
+                               if (parent != dev->root_dir)
+                                       hanging = 1;
+                       }
+                       if (hanging) {
+                               yaffs_trace(YAFFS_TRACE_SCAN,
+                                       "Hanging object %d moved to lost and found",
+                                       obj->obj_id);
+                               yaffs_add_obj_to_dir(dev->lost_n_found, obj);
                        }
                }
        }
@@ -4437,25 +4287,17 @@ static void yaffs_del_dir_contents(struct yaffs_obj *dir)
        struct list_head *n;
 
        if (dir->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY)
-               YBUG();
+               BUG();
 
        list_for_each_safe(lh, n, &dir->variant.dir_variant.children) {
-               if (lh) {
-                       obj = list_entry(lh, struct yaffs_obj, siblings);
-                       if (obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY)
-                               yaffs_del_dir_contents(obj);
-
-                       yaffs_trace(YAFFS_TRACE_SCAN,
-                               "Deleting lost_found object %d",
-                               obj->obj_id);
-
-                       /* Need to use UnlinkObject since Delete would not handle
-                        * hardlinked objects correctly.
-                        */
-                       yaffs_unlink_obj(obj);
-               }
+               obj = list_entry(lh, struct yaffs_obj, siblings);
+               if (obj->variant_type == YAFFS_OBJECT_TYPE_DIRECTORY)
+                       yaffs_del_dir_contents(obj);
+               yaffs_trace(YAFFS_TRACE_SCAN,
+                       "Deleting lost_found object %d",
+                       obj->obj_id);
+               yaffs_unlink_obj(obj);
        }
-
 }
 
 static void yaffs_empty_l_n_f(struct yaffs_dev *dev)
@@ -4465,13 +4307,11 @@ static void yaffs_empty_l_n_f(struct yaffs_dev *dev)
 
 
 struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
-                                    const YCHAR * name)
+                                    const YCHAR *name)
 {
        int sum;
-
        struct list_head *i;
        YCHAR buffer[YAFFS_MAX_NAME_LENGTH + 1];
-
        struct yaffs_obj *l;
 
        if (!name)
@@ -4481,14 +4321,14 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
                yaffs_trace(YAFFS_TRACE_ALWAYS,
                        "tragedy: yaffs_find_by_name: null pointer directory"
                        );
-               YBUG();
+               BUG();
                return NULL;
        }
        if (directory->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
                yaffs_trace(YAFFS_TRACE_ALWAYS,
                        "tragedy: yaffs_find_by_name: non-directory"
                        );
-               YBUG();
+               BUG();
        }
 
        sum = yaffs_calc_name_sum(name);
@@ -4497,7 +4337,7 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
                l = list_entry(i, struct yaffs_obj, siblings);
 
                if (l->parent != directory)
-                       YBUG();
+                       BUG();
 
                yaffs_check_obj_details_loaded(l);
 
@@ -4505,8 +4345,7 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
                if (l->obj_id == YAFFS_OBJECTID_LOSTNFOUND) {
                        if (!strcmp(name, YAFFS_LOSTNFOUND_NAME))
                                return l;
-               } else if (l->sum == sum
-                          || l->hdr_chunk <= 0) {
+               } else if (l->sum == sum || l->hdr_chunk <= 0) {
                        /* LostnFound chunk called Objxxx
                         * Do a real check
                         */
@@ -4516,7 +4355,6 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
                                return l;
                }
        }
-
        return NULL;
 }
 
@@ -4527,7 +4365,6 @@ struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *directory,
 struct yaffs_obj *yaffs_get_equivalent_obj(struct yaffs_obj *obj)
 {
        if (obj && obj->variant_type == YAFFS_OBJECT_TYPE_HARDLINK) {
-               /* We want the object id of the equivalent object, not this one */
                obj = obj->variant.hardlink_variant.equiv_obj;
                yaffs_check_obj_details_loaded(obj);
        }
@@ -4547,13 +4384,13 @@ struct yaffs_obj *yaffs_get_equivalent_obj(struct yaffs_obj *obj)
  * system to share files.
  *
  * These automatic unicode are stored slightly differently...
- *  - If the name can fit in the ASCII character space then they are saved as 
+ *  - If the name can fit in the ASCII character space then they are saved as
  *    ascii names as per above.
  *  - If the name needs Unicode then the name is saved in Unicode
  *    starting at oh->name[1].
 
  */
-static void yaffs_fix_null_name(struct yaffs_obj *obj, YCHAR * name,
+static void yaffs_fix_null_name(struct yaffs_obj *obj, YCHAR *name,
                                int buffer_size)
 {
        /* Create an object name if we could not find one. */
@@ -4575,23 +4412,17 @@ static void yaffs_fix_null_name(struct yaffs_obj *obj, YCHAR * name,
        }
 }
 
-int yaffs_get_obj_name(struct yaffs_obj *obj, YCHAR * name, int buffer_size)
+int yaffs_get_obj_name(struct yaffs_obj *obj, YCHAR *name, int buffer_size)
 {
        memset(name, 0, buffer_size * sizeof(YCHAR));
-
        yaffs_check_obj_details_loaded(obj);
-
        if (obj->obj_id == YAFFS_OBJECTID_LOSTNFOUND) {
                strncpy(name, YAFFS_LOSTNFOUND_NAME, buffer_size - 1);
-       }
-#ifndef CONFIG_YAFFS_NO_SHORT_NAMES
-       else if (obj->short_name[0]) {
+       } else if (obj->short_name[0]) {
                strcpy(name, obj->short_name);
-       }
-#endif
-       else if (obj->hdr_chunk > 0) {
+       } else if (obj->hdr_chunk > 0) {
                int result;
-               u8 *buffer = yaffs_get_temp_buffer(obj->my_dev, __LINE__);
+               u8 *buffer = yaffs_get_temp_buffer(obj->my_dev);
 
                struct yaffs_obj_hdr *oh = (struct yaffs_obj_hdr *)buffer;
 
@@ -4605,7 +4436,7 @@ int yaffs_get_obj_name(struct yaffs_obj *obj, YCHAR * name, int buffer_size)
                yaffs_load_name_from_oh(obj->my_dev, name, oh->name,
                                        buffer_size);
 
-               yaffs_release_temp_buffer(obj->my_dev, buffer, __LINE__);
+               yaffs_release_temp_buffer(obj->my_dev, buffer);
        }
 
        yaffs_fix_null_name(obj, name, buffer_size);
@@ -4678,6 +4509,8 @@ unsigned yaffs_get_obj_type(struct yaffs_obj *obj)
                        return DT_BLK;
                if (S_ISSOCK(obj->yst_mode))
                        return DT_SOCK;
+               return DT_REG;
+               break;
        default:
                return DT_REG;
                break;
@@ -4697,13 +4530,10 @@ YCHAR *yaffs_get_symlink_alias(struct yaffs_obj *obj)
 
 static int yaffs_check_dev_fns(const struct yaffs_dev *dev)
 {
-
        /* Common functions, gotta have */
        if (!dev->param.erase_fn || !dev->param.initialise_flash_fn)
                return 0;
 
-#ifdef CONFIG_YAFFS_YAFFS2
-
        /* Can use the "with tags" style interface for yaffs1 or yaffs2 */
        if (dev->param.write_chunk_tags_fn &&
            dev->param.read_chunk_tags_fn &&
@@ -4711,7 +4541,6 @@ static int yaffs_check_dev_fns(const struct yaffs_dev *dev)
            !dev->param.read_chunk_fn &&
            dev->param.bad_block_fn && dev->param.query_block_fn)
                return 1;
-#endif
 
        /* Can use the "spare" style interface for yaffs1 */
        if (!dev->param.is_yaffs2 &&
@@ -4727,17 +4556,13 @@ static int yaffs_check_dev_fns(const struct yaffs_dev *dev)
 
 static int yaffs_create_initial_dir(struct yaffs_dev *dev)
 {
-       /* Initialise the unlinked, deleted, root and lost and found directories */
-
+       /* Initialise the unlinked, deleted, root and lost+found directories */
        dev->lost_n_found = dev->root_dir = NULL;
        dev->unlinked_dir = dev->del_dir = NULL;
-
        dev->unlinked_dir =
            yaffs_create_fake_dir(dev, YAFFS_OBJECTID_UNLINKED, S_IFDIR);
-
        dev->del_dir =
            yaffs_create_fake_dir(dev, YAFFS_OBJECTID_DELETED, S_IFDIR);
-
        dev->root_dir =
            yaffs_create_fake_dir(dev, YAFFS_OBJECTID_ROOT,
                                  YAFFS_ROOT_MODE | S_IFDIR);
@@ -4750,7 +4575,6 @@ static int yaffs_create_initial_dir(struct yaffs_dev *dev)
                yaffs_add_obj_to_dir(dev->root_dir, dev->lost_n_found);
                return YAFFS_OK;
        }
-
        return YAFFS_FAIL;
 }
 
@@ -4760,7 +4584,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
        unsigned x;
        int bits;
 
-       yaffs_trace(YAFFS_TRACE_TRACING, "yaffs: yaffs_guts_initialise()" );
+       yaffs_trace(YAFFS_TRACE_TRACING, "yaffs: yaffs_guts_initialise()");
 
        /* Check stuff that must be set */
 
@@ -4771,6 +4595,11 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
                return YAFFS_FAIL;
        }
 
+       if (dev->is_mounted) {
+               yaffs_trace(YAFFS_TRACE_ALWAYS, "device already mounted");
+               return YAFFS_FAIL;
+       }
+
        dev->internal_start_block = dev->param.start_block;
        dev->internal_end_block = dev->param.end_block;
        dev->block_offset = 0;
@@ -4795,9 +4624,9 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
                (dev->param.inband_tags && !dev->param.is_yaffs2) ||
                 dev->param.chunks_per_block < 2 ||
                 dev->param.n_reserved_blocks < 2 ||
-               dev->internal_start_block <= 0 || 
-               dev->internal_end_block <= 0 || 
-               dev->internal_end_block <= 
+               dev->internal_start_block <= 0 ||
+               dev->internal_end_block <= 0 ||
+               dev->internal_end_block <=
                (dev->internal_start_block + dev->param.n_reserved_blocks + 2)
                ) {
                /* otherwise it is too small */
@@ -4831,12 +4660,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
                return YAFFS_FAIL;
        }
 
-       if (dev->is_mounted) {
-               yaffs_trace(YAFFS_TRACE_ALWAYS, "device already mounted");
-               return YAFFS_FAIL;
-       }
-
-       /* Finished with most checks. One or two more checks happen later on too. */
+       /* Finished with most checks. Further checks happen later on too. */
 
        dev->is_mounted = 1;
 
@@ -4873,7 +4697,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
                        dev->tnode_width = bits;
        } else {
                dev->tnode_width = 16;
-        }
+       }
 
        dev->tnode_mask = (1 << dev->tnode_width) - 1;
 
@@ -4904,7 +4728,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
                return YAFFS_FAIL;
        }
 
-       /* OK, we've finished verifying the device, lets continue with initialisation */
+       /* Finished verifying the device, continue with initialisation */
 
        /* More device initialisation */
        dev->all_gcs = 0;
@@ -4924,7 +4748,8 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
        dev->n_erase_failures = 0;
        dev->n_erased_blocks = 0;
        dev->gc_disable = 0;
-       dev->has_pending_prioritised_gc = 1;    /* Assume the worst for now, will get fixed on first GC */
+       dev->has_pending_prioritised_gc = 1;
+               /* Assume the worst for now, will get fixed on first GC */
        INIT_LIST_HEAD(&dev->dirty_dirs);
        dev->oldest_dirty_seq = 0;
        dev->oldest_dirty_block = 0;
@@ -4986,18 +4811,24 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
        if (!init_failed && !yaffs_create_initial_dir(dev))
                init_failed = 1;
 
+       if(!init_failed && dev->param.is_yaffs2 &&
+               !dev->param.disable_summary &&
+               !yaffs_summary_init(dev))
+               init_failed = 1;
+
        if (!init_failed) {
                /* Now scan the flash. */
                if (dev->param.is_yaffs2) {
                        if (yaffs2_checkpt_restore(dev)) {
                                yaffs_check_obj_details_loaded(dev->root_dir);
-                               yaffs_trace(YAFFS_TRACE_CHECKPOINT | YAFFS_TRACE_MOUNT,
+                               yaffs_trace(YAFFS_TRACE_CHECKPOINT |
+                                       YAFFS_TRACE_MOUNT,
                                        "yaffs: restored from checkpoint"
                                        );
                        } else {
 
-                               /* Clean up the mess caused by an aborted checkpoint load
-                                * and scan backwards.
+                               /* Clean up the mess caused by an aborted
+                                * checkpoint load then scan backwards.
                                 */
                                yaffs_deinit_blocks(dev);
 
@@ -5025,7 +4856,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
                        }
                } else if (!yaffs1_scan(dev)) {
                        init_failed = 1;
-                }
+               }
 
                yaffs_strip_deleted_objs(dev);
                yaffs_fix_hanging_objs(dev);
@@ -5047,7 +4878,7 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
        dev->n_page_writes = 0;
        dev->n_erasures = 0;
        dev->n_gc_copies = 0;
-       dev->n_retired_writes = 0;
+       dev->n_retried_writes = 0;
 
        dev->n_retired_blocks = 0;
 
@@ -5061,7 +4892,6 @@ int yaffs_guts_initialise(struct yaffs_dev *dev)
        yaffs_trace(YAFFS_TRACE_TRACING,
          "yaffs: yaffs_guts_initialise() done.");
        return YAFFS_OK;
-
 }
 
 void yaffs_deinitialise(struct yaffs_dev *dev)
@@ -5071,11 +4901,12 @@ void yaffs_deinitialise(struct yaffs_dev *dev)
 
                yaffs_deinit_blocks(dev);
                yaffs_deinit_tnodes_and_objs(dev);
+               yaffs_summary_deinit(dev);
+
                if (dev->param.n_caches > 0 && dev->cache) {
 
                        for (i = 0; i < dev->param.n_caches; i++) {
-                               if (dev->cache[i].data)
-                                       kfree(dev->cache[i].data);
+                               kfree(dev->cache[i].data);
                                dev->cache[i].data = NULL;
                        }
 
@@ -5099,7 +4930,6 @@ int yaffs_count_free_chunks(struct yaffs_dev *dev)
 {
        int n_free = 0;
        int b;
-
        struct yaffs_block_info *blk;
 
        blk = dev->block_info;
@@ -5118,14 +4948,12 @@ int yaffs_count_free_chunks(struct yaffs_dev *dev)
                }
                blk++;
        }
-
        return n_free;
 }
 
 int yaffs_get_n_free_chunks(struct yaffs_dev *dev)
 {
        /* This is what we report to the outside world */
-
        int n_free;
        int n_dirty_caches;
        int blocks_for_checkpt;
@@ -5134,7 +4962,7 @@ int yaffs_get_n_free_chunks(struct yaffs_dev *dev)
        n_free = dev->n_free_chunks;
        n_free += dev->n_deleted_files;
 
-       /* Now count the number of dirty chunks in the cache and subtract those */
+       /* Now count and subtract the number of dirty chunks in the cache. */
 
        for (n_dirty_caches = 0, i = 0; i < dev->param.n_caches; i++) {
                if (dev->cache[i].dirty)
@@ -5146,7 +4974,7 @@ int yaffs_get_n_free_chunks(struct yaffs_dev *dev)
        n_free -=
            ((dev->param.n_reserved_blocks + 1) * dev->param.chunks_per_block);
 
-       /* Now we figure out how much to reserve for the checkpoint and report that... */
+       /* Now figure checkpoint space and report that... */
        blocks_for_checkpt = yaffs_calc_checkpt_blocks_required(dev);
 
        n_free -= (blocks_for_checkpt * dev->param.chunks_per_block);
@@ -5155,5 +4983,4 @@ int yaffs_get_n_free_chunks(struct yaffs_dev *dev)
                n_free = 0;
 
        return n_free;
-
 }
index 307eba28676f5c2360668c64c2477c8804624edc..490122aa16679ae8d46162f083a88661e50c1795 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 
 /* Give us a  Y=0x59,
  * Give us an A=0x41,
- * Give us an FF=0xFF
+ * Give us an FF=0xff
  * Give us an S=0x53
  * And what have we got...
  */
-#define YAFFS_MAGIC                    0x5941FF53
+#define YAFFS_MAGIC                    0x5941ff53
 
-#define YAFFS_NTNODES_LEVEL0           16
+#define YAFFS_NTNODES_LEVEL0           16
 #define YAFFS_TNODES_LEVEL0_BITS       4
 #define YAFFS_TNODES_LEVEL0_MASK       0xf
 
-#define YAFFS_NTNODES_INTERNAL                 (YAFFS_NTNODES_LEVEL0 / 2)
-#define YAFFS_TNODES_INTERNAL_BITS     (YAFFS_TNODES_LEVEL0_BITS - 1)
+#define YAFFS_NTNODES_INTERNAL         (YAFFS_NTNODES_LEVEL0 / 2)
+#define YAFFS_TNODES_INTERNAL_BITS     (YAFFS_TNODES_LEVEL0_BITS - 1)
 #define YAFFS_TNODES_INTERNAL_MASK     0x7
 #define YAFFS_TNODES_MAX_LEVEL         6
 
-#ifndef CONFIG_YAFFS_NO_YAFFS1
+
+/* Constants for YAFFS1 mode */
 #define YAFFS_BYTES_PER_SPARE          16
 #define YAFFS_BYTES_PER_CHUNK          512
 #define YAFFS_CHUNK_SIZE_SHIFT         9
 #define YAFFS_CHUNKS_PER_BLOCK         32
-#define YAFFS_BYTES_PER_BLOCK          (YAFFS_CHUNKS_PER_BLOCK*YAFFS_BYTES_PER_CHUNK)
-#endif
+#define YAFFS_BYTES_PER_BLOCK  (YAFFS_CHUNKS_PER_BLOCK*YAFFS_BYTES_PER_CHUNK)
 
-#define YAFFS_MIN_YAFFS2_CHUNK_SIZE    1024
+#define YAFFS_MIN_YAFFS2_CHUNK_SIZE    1024
 #define YAFFS_MIN_YAFFS2_SPARE_SIZE    32
 
-#define YAFFS_MAX_CHUNK_ID             0x000FFFFF
+#define YAFFS_MAX_CHUNK_ID             0x000fffff
 
 #define YAFFS_ALLOCATION_NOBJECTS      100
 #define YAFFS_ALLOCATION_NTNODES       100
@@ -58,9 +58,9 @@
 #define YAFFS_NOBJECT_BUCKETS          256
 
 #define YAFFS_OBJECT_SPACE             0x40000
-#define YAFFS_MAX_OBJECT_ID            (YAFFS_OBJECT_SPACE -1)
+#define YAFFS_MAX_OBJECT_ID            (YAFFS_OBJECT_SPACE - 1)
 
-#define YAFFS_CHECKPOINT_VERSION       4
+#define YAFFS_CHECKPOINT_VERSION       4
 
 #ifdef CONFIG_YAFFS_UNICODE
 #define YAFFS_MAX_NAME_LENGTH          127
 #define YAFFS_OBJECTID_UNLINKED                3
 #define YAFFS_OBJECTID_DELETED         4
 
+/* Fake object Id for summary data */
+#define YAFFS_OBJECTID_SUMMARY         0x10
+
 /* Pseudo object ids for checkpointing */
-#define YAFFS_OBJECTID_SB_HEADER       0x10
 #define YAFFS_OBJECTID_CHECKPOINT_DATA 0x20
-#define YAFFS_SEQUENCE_CHECKPOINT_DATA  0x21
+#define YAFFS_SEQUENCE_CHECKPOINT_DATA 0x21
 
 #define YAFFS_MAX_SHORT_OP_CACHES      20
 
  * The range is limited slightly to help distinguish bad numbers from good.
  * This also allows us to perhaps in the future use special numbers for
  * special purposes.
- * EFFFFF00 allows the allocation of 8 blocks per second (~1Mbytes) for 15 years,
+ * EFFFFF00 allows the allocation of 8 blocks/second (~1Mbytes) for 15 years,
  * and is a larger number than the lifetime of a 2GB device.
  */
 #define YAFFS_LOWEST_SEQUENCE_NUMBER   0x00001000
-#define YAFFS_HIGHEST_SEQUENCE_NUMBER  0xEFFFFF00
+#define YAFFS_HIGHEST_SEQUENCE_NUMBER  0xefffff00
 
 /* Special sequence number for bad block that failed to be marked bad */
-#define YAFFS_SEQUENCE_BAD_BLOCK       0xFFFF0000
+#define YAFFS_SEQUENCE_BAD_BLOCK       0xffff0000
 
 /* ChunkCache is used for short read/write operations.*/
 struct yaffs_cache {
@@ -117,12 +119,11 @@ struct yaffs_cache {
        u8 *data;
 };
 
-/* Tags structures in RAM
- * NB This uses bitfield. Bitfields should not straddle a u32 boundary otherwise
- * the structure size will get blown out.
+/* yaffs1 tags structures in RAM
+ * NB This uses bitfield. Bitfields should not straddle a u32 boundary
+ * otherwise the structure size will get blown out.
  */
 
-#ifndef CONFIG_YAFFS_NO_YAFFS1
 struct yaffs_tags {
        unsigned chunk_id:20;
        unsigned serial_number:2;
@@ -137,7 +138,6 @@ union yaffs_tags_union {
        u8 as_bytes[8];
 };
 
-#endif
 
 /* Stuff used for extended tags in YAFFS2 */
 
@@ -160,11 +160,9 @@ enum yaffs_obj_type {
 #define YAFFS_OBJECT_TYPE_MAX YAFFS_OBJECT_TYPE_SPECIAL
 
 struct yaffs_ext_tags {
-
-       unsigned validity0;
        unsigned chunk_used;    /*  Status of the chunk: used or unused */
-       unsigned obj_id;        /* If 0 then this is not part of an object (unused) */
-       unsigned chunk_id;      /* If 0 then this is a header, else a data chunk */
+       unsigned obj_id;        /* If 0 this is not used */
+       unsigned chunk_id;      /* If 0 this is a header, else a data chunk */
        unsigned n_bytes;       /* Only valid for data chunks */
 
        /* The following stuff only has meaning when we read */
@@ -180,7 +178,7 @@ struct yaffs_ext_tags {
 
        /* Extra info if this is an object header (YAFFS2 only) */
 
-       unsigned extra_available;       /* There is extra info available if this is not zero */
+       unsigned extra_available;       /* Extra info available if not zero */
        unsigned extra_parent_id;       /* The parent object */
        unsigned extra_is_shrink;       /* Is it a shrink header? */
        unsigned extra_shadows; /* Does this shadow another object? */
@@ -188,10 +186,7 @@ struct yaffs_ext_tags {
        enum yaffs_obj_type extra_obj_type;     /* What object type? */
 
        unsigned extra_length;  /* Length if it is a file */
-       unsigned extra_equiv_id;        /* Equivalent object Id if it is a hard link */
-
-       unsigned validity1;
-
+       unsigned extra_equiv_id;        /* Equivalent object for a hard link */
 };
 
 /* Spare structure for YAFFS1 */
@@ -225,12 +220,15 @@ enum yaffs_block_state {
        YAFFS_BLOCK_STATE_SCANNING,
        /* Being scanned */
 
-       YAFFS_BLOCK_STATE_NEEDS_SCANNING,
-       /* The block might have something on it (ie it is allocating or full, perhaps empty)
-        * but it needs to be scanned to determine its true state.
+       YAFFS_BLOCK_STATE_NEEDS_SCAN,
+       /* The block might have something on it (ie it is allocating or full,
+        * perhaps empty) but it needs to be scanned to determine its true
+        * state.
         * This state is only valid during scanning.
-        * NB We tolerate empty because the pre-scanner might be incapable of deciding
-        * However, if this state is returned on a YAFFS2 device, then we expect a sequence number
+        * NB We tolerate empty because the pre-scanner might be incapable of
+        * deciding
+        * However, if this state is returned on a YAFFS2 device,
+        * then we expect a sequence number
         */
 
        YAFFS_BLOCK_STATE_EMPTY,
@@ -241,7 +239,8 @@ enum yaffs_block_state {
         * At least one page holds valid data.
         * This is the one currently being used for page
         * allocation. Should never be more than one of these.
-        * If a block is only partially allocated at mount it is treated as full.
+        * If a block is only partially allocated at mount it is treated as
+        * full.
         */
 
        YAFFS_BLOCK_STATE_FULL,
@@ -271,18 +270,20 @@ struct yaffs_block_info {
 
        int soft_del_pages:10;  /* number of soft deleted pages */
        int pages_in_use:10;    /* number of pages in use */
-       unsigned block_state:4; /* One of the above block states. NB use unsigned because enum is sometimes an int */
-       u32 needs_retiring:1;   /* Data has failed on this block, need to get valid data off */
-       /* and retire the block. */
-       u32 skip_erased_check:1;        /* If this is set we can skip the erased check on this block */
-       u32 gc_prioritise:1;    /* An ECC check or blank check has failed on this block.
-                                  It should be prioritised for GC */
-       u32 chunk_error_strikes:3;      /* How many times we've had ecc etc failures on this block and tried to reuse it */
-
-#ifdef CONFIG_YAFFS_YAFFS2
-       u32 has_shrink_hdr:1;   /* This block has at least one shrink object header */
+       unsigned block_state:4; /* One of the above block states. */
+                               /* NB use unsigned because enum is sometimes
+                                * an int */
+       u32 needs_retiring:1;   /* Data has failed on this block, */
+                               /*need to get valid data off and retire*/
+       u32 skip_erased_check:1;/* Skip the erased check on this block */
+       u32 gc_prioritise:1;    /* An ECC check or blank check has failed.
+                                  Block should be prioritised for GC */
+       u32 chunk_error_strikes:3;      /* How many times we've had ecc etc
+                               failures on this block and tried to reuse it */
+       u32 has_summary:1;      /* The block has a summary */
+
+       u32 has_shrink_hdr:1;   /* This block has at least one shrink header */
        u32 seq_number;         /* block sequence number for yaffs2 */
-#endif
 
 };
 
@@ -297,7 +298,7 @@ struct yaffs_obj_hdr {
        u16 sum_no_longer_used; /* checksum of name. No longer used */
        YCHAR name[YAFFS_MAX_NAME_LENGTH + 1];
 
-       /* The following apply to directories, files, symlinks - not hard links */
+       /* The following apply to all object types except for hard links */
        u32 yst_mode;           /* protection */
 
        u32 yst_uid;
@@ -315,7 +316,7 @@ struct yaffs_obj_hdr {
        /* Alias is for symlinks only. */
        YCHAR alias[YAFFS_MAX_ALIAS_LENGTH + 1];
 
-       u32 yst_rdev;           /* device stuff for block and char devices (major/min) */
+       u32 yst_rdev;   /* stuff for block and char devices (major/min) */
 
        u32 win_ctime[2];
        u32 win_atime[2];
@@ -325,9 +326,10 @@ struct yaffs_obj_hdr {
        u32 inband_is_shrink;
 
        u32 reserved[2];
-       int shadows_obj;        /* This object header shadows the specified object if > 0 */
+       int shadows_obj;        /* This object header shadows the
+                               specified object if > 0 */
 
-       /* is_shrink applies to object headers written when we shrink the file (ie resize) */
+       /* is_shrink applies to object headers written when wemake a hole. */
        u32 is_shrink;
 
 };
@@ -378,35 +380,43 @@ union yaffs_obj_var {
 struct yaffs_obj {
        u8 deleted:1;           /* This should only apply to unlinked files. */
        u8 soft_del:1;          /* it has also been soft deleted */
-       u8 unlinked:1;          /* An unlinked file. The file should be in the unlinked directory. */
+       u8 unlinked:1;          /* An unlinked file.*/
        u8 fake:1;              /* A fake object has no presence on NAND. */
-       u8 rename_allowed:1;    /* Some objects are not allowed to be renamed. */
+       u8 rename_allowed:1;    /* Some objects cannot be renamed. */
        u8 unlink_allowed:1;
        u8 dirty:1;             /* the object needs to be written to flash */
        u8 valid:1;             /* When the file system is being loaded up, this
                                 * object might be created before the data
-                                * is available (ie. file data records appear before the header).
+                                * is available
+                                * ie. file data chunks encountered before
+                               * the header.
                                 */
-       u8 lazy_loaded:1;       /* This object has been lazy loaded and is missing some detail */
+       u8 lazy_loaded:1;       /* This object has been lazy loaded and
+                                * is missing some detail */
 
-       u8 defered_free:1;      /* For Linux kernel. Object is removed from NAND, but is
-                                * still in the inode cache. Free of object is defered.
+       u8 defered_free:1;      /* Object is removed from NAND, but is
+                                * still in the inode cache.
+                                * Free of object is defered.
                                 * until the inode is released.
                                 */
-       u8 being_created:1;     /* This object is still being created so skip some checks. */
-       u8 is_shadowed:1;       /* This object is shadowed on the way to being renamed. */
+       u8 being_created:1;     /* This object is still being created
+                                * so skip some verification checks. */
+       u8 is_shadowed:1;       /* This object is shadowed on the way
+                                * to being renamed. */
 
-       u8 xattr_known:1;       /* We know if this has object has xattribs or not. */
-       u8 has_xattr:1;         /* This object has xattribs. Valid if xattr_known. */
+       u8 xattr_known:1;       /* We know if this has object has xattribs
+                                * or not. */
+       u8 has_xattr:1;         /* This object has xattribs.
+                                * Only valid if xattr_known. */
 
-       u8 serial;              /* serial number of chunk in NAND. Cached here */
+       u8 serial;              /* serial number of chunk in NAND.*/
        u16 sum;                /* sum of the name to speed searching */
 
        struct yaffs_dev *my_dev;       /* The device I'm on */
 
-       struct list_head hash_link;     /* list of objects in this hash bucket */
+       struct list_head hash_link;     /* list of objects in hash bucket */
 
-       struct list_head hard_links;    /* all the equivalent hard linked objects */
+       struct list_head hard_links;    /* hard linked object chain*/
 
        /* directory structure stuff */
        /* also used for linking up the free list */
@@ -416,15 +426,13 @@ struct yaffs_obj {
        /* Where's my object header in NAND? */
        int hdr_chunk;
 
-       int n_data_chunks;      /* Number of data chunks attached to the file. */
+       int n_data_chunks;      /* Number of data chunks for this file. */
 
        u32 obj_id;             /* the object id value */
 
        u32 yst_mode;
 
-#ifndef CONFIG_YAFFS_NO_SHORT_NAMES
        YCHAR short_name[YAFFS_SHORT_NAME_LENGTH + 1];
-#endif
 
 #ifdef CONFIG_YAFFS_WINCE
        u32 win_ctime[2];
@@ -476,13 +484,12 @@ struct yaffs_checkpt_obj {
 
 /*--------------------- Temporary buffers ----------------
  *
- * These are chunk-sized working buffers. Each device has a few
+ * These are chunk-sized working buffers. Each device has a few.
  */
 
 struct yaffs_buffer {
        u8 *buffer;
-       int line;               /* track from whence this buffer was allocated */
-       int max_line;
+       int in_use;
 };
 
 /*----------------- Device ---------------------------------*/
@@ -497,26 +504,29 @@ struct yaffs_param {
         */
 
        int inband_tags;        /* Use unband tags */
-       u32 total_bytes_per_chunk;      /* Should be >= 512, does not need to be a power of 2 */
+       u32 total_bytes_per_chunk;      /* Should be >= 512, does not need to
+                                        be a power of 2 */
        int chunks_per_block;   /* does not need to be a power of 2 */
        int spare_bytes_per_chunk;      /* spare area size */
        int start_block;        /* Start block we're allowed to use */
        int end_block;          /* End block we're allowed to use */
-       int n_reserved_blocks;  /* We want this tuneable so that we can reduce */
-       /* reserved blocks on NOR and RAM. */
+       int n_reserved_blocks;  /* Tuneable so that we can reduce
+                                * reserved blocks on NOR and RAM. */
 
-       int n_caches;           /* If <= 0, then short op caching is disabled, else
-                                * the number of short op caches (don't use too many).
-                                * 10 to 20 is a good bet.
+       int n_caches;           /* If <= 0, then short op caching is disabled,
+                                * else the number of short op caches.
                                 */
-       int use_nand_ecc;       /* Flag to decide whether or not to use NANDECC on data (yaffs1) */
-       int no_tags_ecc;        /* Flag to decide whether or not to do ECC on packed tags (yaffs2) */
+       int use_nand_ecc;       /* Flag to decide whether or not to use
+                                * NAND driver ECC on data (yaffs1) */
+        int tags_9bytes;       /* Use 9 byte tags */
+       int no_tags_ecc;        /* Flag to decide whether or not to do ECC
+                                * on packed tags (yaffs2) */
 
        int is_yaffs2;          /* Use yaffs2 mode on this device */
 
        int empty_lost_n_found; /* Auto-empty lost+found directory on mount */
 
-       int refresh_period;     /* How often we should check to do a block refresh */
+       int refresh_period;     /* How often to check for a block refresh */
 
        /* Checkpoint control. Can be set before or after initialisation */
        u8 skip_checkpt_rd;
@@ -526,47 +536,48 @@ struct yaffs_param {
 
        /* NAND access functions (Must be set before calling YAFFS) */
 
-       int (*write_chunk_fn) (struct yaffs_dev * dev,
-                              int nand_chunk, const u8 * data,
-                              const struct yaffs_spare * spare);
-       int (*read_chunk_fn) (struct yaffs_dev * dev,
-                             int nand_chunk, u8 * data,
-                             struct yaffs_spare * spare);
-       int (*erase_fn) (struct yaffs_dev * dev, int flash_block);
-       int (*initialise_flash_fn) (struct yaffs_dev * dev);
-       int (*deinitialise_flash_fn) (struct yaffs_dev * dev);
-
-#ifdef CONFIG_YAFFS_YAFFS2
-       int (*write_chunk_tags_fn) (struct yaffs_dev * dev,
-                                   int nand_chunk, const u8 * data,
-                                   const struct yaffs_ext_tags * tags);
-       int (*read_chunk_tags_fn) (struct yaffs_dev * dev,
-                                  int nand_chunk, u8 * data,
-                                  struct yaffs_ext_tags * tags);
-       int (*bad_block_fn) (struct yaffs_dev * dev, int block_no);
-       int (*query_block_fn) (struct yaffs_dev * dev, int block_no,
-                              enum yaffs_block_state * state,
-                              u32 * seq_number);
-#endif
+       int (*write_chunk_fn) (struct yaffs_dev *dev,
+                              int nand_chunk, const u8 *data,
+                              const struct yaffs_spare *spare);
+       int (*read_chunk_fn) (struct yaffs_dev *dev,
+                             int nand_chunk, u8 *data,
+                             struct yaffs_spare *spare);
+       int (*erase_fn) (struct yaffs_dev *dev, int flash_block);
+       int (*initialise_flash_fn) (struct yaffs_dev *dev);
+       int (*deinitialise_flash_fn) (struct yaffs_dev *dev);
+
+       /* yaffs2 mode functions */
+       int (*write_chunk_tags_fn) (struct yaffs_dev *dev,
+                                   int nand_chunk, const u8 *data,
+                                   const struct yaffs_ext_tags *tags);
+       int (*read_chunk_tags_fn) (struct yaffs_dev *dev,
+                                  int nand_chunk, u8 *data,
+                                  struct yaffs_ext_tags *tags);
+       int (*bad_block_fn) (struct yaffs_dev *dev, int block_no);
+       int (*query_block_fn) (struct yaffs_dev *dev, int block_no,
+                              enum yaffs_block_state *state,
+                              u32 *seq_number);
 
        /* The remove_obj_fn function must be supplied by OS flavours that
         * need it.
         * yaffs direct uses it to implement the faster readdir.
         * Linux uses it to protect the directory during unlocking.
         */
-       void (*remove_obj_fn) (struct yaffs_obj * obj);
+       void (*remove_obj_fn) (struct yaffs_obj *obj);
 
        /* Callback to mark the superblock dirty */
-       void (*sb_dirty_fn) (struct yaffs_dev * dev);
+       void (*sb_dirty_fn) (struct yaffs_dev *dev);
 
        /*  Callback to control garbage collection. */
-       unsigned (*gc_control) (struct yaffs_dev * dev);
+       unsigned (*gc_control) (struct yaffs_dev *dev);
 
        /* Debug control flags. Don't use unless you know what you're doing */
-       int use_header_file_size;       /* Flag to determine if we should use file sizes from the header */
+       int use_header_file_size;       /* Flag to determine if we should use
+                                        * file sizes from the header */
        int disable_lazy_load;  /* Disable lazy loading on this device */
        int wide_tnodes_disabled;       /* Set to disable wide tnodes */
-       int disable_soft_del;   /* yaffs 1 only: Set to disable the use of softdeletion. */
+       int disable_soft_del;   /* yaffs 1 only: Set to disable the use of
+                                * softdeletion. */
 
        int defered_dir_update; /* Set to defer directory updates */
 
@@ -574,6 +585,8 @@ struct yaffs_param {
        int auto_unicode;
 #endif
        int always_check_erased;        /* Force chunk erased check always on */
+
+       int disable_summary;
 };
 
 struct yaffs_dev {
@@ -602,7 +615,7 @@ struct yaffs_dev {
 
        /* Stuff for figuring out file offset to chunk conversions */
        u32 chunk_shift;        /* Shift value */
-       u32 chunk_div;          /* Divisor after shifting: 1 for power-of-2 sizes */
+       u32 chunk_div;          /* Divisor after shifting: 1 for 2^n sizes */
        u32 chunk_mask;         /* Mask to use for power-of-2 case */
 
        int is_mounted;
@@ -616,7 +629,7 @@ struct yaffs_dev {
        int chunk_offset;
 
        /* Runtime checkpointing stuff */
-       int checkpt_page_seq;   /* running sequence number of checkpoint pages */
+       int checkpt_page_seq;   /* running sequence number of checkpt pages */
        int checkpt_byte_count;
        int checkpt_byte_offs;
        u8 *checkpt_buffer;
@@ -630,13 +643,14 @@ struct yaffs_dev {
        u32 checkpt_sum;
        u32 checkpt_xor;
 
-       int checkpoint_blocks_required; /* Number of blocks needed to store current checkpoint set */
+       int checkpoint_blocks_required; /* Number of blocks needed to store
+                                        * current checkpoint set */
 
        /* Block Info */
        struct yaffs_block_info *block_info;
        u8 *chunk_bits;         /* bitmap of chunks in use */
-       unsigned block_info_alt:1;      /* was allocated using alternative strategy */
-       unsigned chunk_bits_alt:1;      /* was allocated using alternative strategy */
+       unsigned block_info_alt:1;      /* allocated using alternative alloc */
+       unsigned chunk_bits_alt:1;      /* allocated using alternative alloc */
        int chunk_bit_stride;   /* Number of bytes of chunk_bits per block.
                                 * Must be consistent with chunks_per_block.
                                 */
@@ -662,7 +676,8 @@ struct yaffs_dev {
        u32 *gc_cleanup_list;   /* objects to delete at the end of a GC. */
        u32 n_clean_ups;
 
-       unsigned has_pending_prioritised_gc;    /* We think this device might have pending prioritised gcs */
+       unsigned has_pending_prioritised_gc;    /* We think this device might
+                                               have pending prioritised gcs */
        unsigned gc_disable;
        unsigned gc_block_finder;
        unsigned gc_dirtiest;
@@ -671,16 +686,12 @@ struct yaffs_dev {
        unsigned gc_block;
        unsigned gc_chunk;
        unsigned gc_skip;
+       struct yaffs_summary_tags *gc_sum_tags;
 
        /* Special directories */
        struct yaffs_obj *root_dir;
        struct yaffs_obj *lost_n_found;
 
-       /* Buffer areas for storing data to recover from write failures TODO
-        *      u8            buffered_data[YAFFS_CHUNKS_PER_BLOCK][YAFFS_BYTES_PER_CHUNK];
-        *      struct yaffs_spare buffered_spare[YAFFS_CHUNKS_PER_BLOCK];
-        */
-
        int buffered_block;     /* Which block is buffered here? */
        int doing_buffered_block_rewrite;
 
@@ -688,9 +699,12 @@ struct yaffs_dev {
        int cache_last_use;
 
        /* Stuff for background deletion and unlinked files. */
-       struct yaffs_obj *unlinked_dir; /* Directory where unlinked and deleted files live. */
-       struct yaffs_obj *del_dir;      /* Directory where deleted objects are sent to disappear. */
-       struct yaffs_obj *unlinked_deletion;    /* Current file being background deleted. */
+       struct yaffs_obj *unlinked_dir; /* Directory where unlinked and deleted
+                                        files live. */
+       struct yaffs_obj *del_dir;      /* Directory where deleted objects are
+                                       sent to disappear. */
+       struct yaffs_obj *unlinked_deletion;    /* Current file being
+                                                       background deleted. */
        int n_deleted_files;    /* Count of files awaiting deletion; */
        int n_unlinked_files;   /* Count of unlinked files. */
        int n_bg_deletions;     /* Count of background deletions. */
@@ -703,17 +717,23 @@ struct yaffs_dev {
        int unmanaged_buffer_deallocs;
 
        /* yaffs2 runtime stuff */
-       unsigned seq_number;    /* Sequence number of currently allocating block */
+       unsigned seq_number;    /* Sequence number of currently
+                                       allocating block */
        unsigned oldest_dirty_seq;
        unsigned oldest_dirty_block;
 
        /* Block refreshing */
-       int refresh_skip;       /* A skip down counter. Refresh happens when this gets to zero. */
+       int refresh_skip;       /* A skip down counter.
+                                * Refresh happens when this gets to zero. */
 
        /* Dirty directory handling */
        struct list_head dirty_dirs;    /* List of dirty directories */
 
-       /* Statistcs */
+       /* Summary */
+       int chunks_per_summary;
+       struct yaffs_summary_tags *sum_tags;
+
+       /* Statistics */
        u32 n_page_writes;
        u32 n_page_reads;
        u32 n_erasures;
@@ -724,7 +744,7 @@ struct yaffs_dev {
        u32 oldest_dirty_gc_count;
        u32 n_gc_blocks;
        u32 bg_gcs;
-       u32 n_retired_writes;
+       u32 n_retried_writes;
        u32 n_retired_blocks;
        u32 n_ecc_fixed;
        u32 n_ecc_unfixed;
@@ -734,11 +754,13 @@ struct yaffs_dev {
        u32 n_unmarked_deletions;
        u32 refresh_count;
        u32 cache_hits;
+       u32 tags_used;
+       u32 summary_used;
 
 };
 
-/* The CheckpointDevice structure holds the device information that changes at runtime and
- * must be preserved over unmount/mount cycles.
+/* The CheckpointDevice structure holds the device information that changes
+ *at runtime and must be preserved over unmount/mount cycles.
  */
 struct yaffs_checkpt_dev {
        int struct_type;
@@ -752,7 +774,8 @@ struct yaffs_checkpt_dev {
        int n_bg_deletions;     /* Count of background deletions. */
 
        /* yaffs2 runtime stuff */
-       unsigned seq_number;    /* Sequence number of currently allocating block */
+       unsigned seq_number;    /* Sequence number of currently
+                                * allocating block */
 
 };
 
@@ -806,7 +829,7 @@ int yaffs_wr_file(struct yaffs_obj *obj, const u8 * buffer, loff_t offset,
 int yaffs_resize_file(struct yaffs_obj *obj, loff_t new_size);
 
 struct yaffs_obj *yaffs_create_file(struct yaffs_obj *parent,
-                                   const YCHAR * name, u32 mode, u32 uid,
+                                   const YCHAR *name, u32 mode, u32 uid,
                                    u32 gid);
 
 int yaffs_flush_file(struct yaffs_obj *obj, int update_time, int data_sync);
@@ -818,35 +841,35 @@ int yaffs_checkpoint_save(struct yaffs_dev *dev);
 int yaffs_checkpoint_restore(struct yaffs_dev *dev);
 
 /* Directory operations */
-struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR * name,
+struct yaffs_obj *yaffs_create_dir(struct yaffs_obj *parent, const YCHAR *name,
                                   u32 mode, u32 uid, u32 gid);
 struct yaffs_obj *yaffs_find_by_name(struct yaffs_obj *the_dir,
-                                    const YCHAR * name);
+                                    const YCHAR *name);
 struct yaffs_obj *yaffs_find_by_number(struct yaffs_dev *dev, u32 number);
 
 /* Link operations */
-struct yaffs_obj *yaffs_link_obj(struct yaffs_obj *parent, const YCHAR * name,
+struct yaffs_obj *yaffs_link_obj(struct yaffs_obj *parent, const YCHAR *name,
                                 struct yaffs_obj *equiv_obj);
 
 struct yaffs_obj *yaffs_get_equivalent_obj(struct yaffs_obj *obj);
 
 /* Symlink operations */
 struct yaffs_obj *yaffs_create_symlink(struct yaffs_obj *parent,
-                                      const YCHAR * name, u32 mode, u32 uid,
-                                      u32 gid, const YCHAR * alias);
+                                      const YCHAR *name, u32 mode, u32 uid,
+                                      u32 gid, const YCHAR *alias);
 YCHAR *yaffs_get_symlink_alias(struct yaffs_obj *obj);
 
 /* Special inodes (fifos, sockets and devices) */
 struct yaffs_obj *yaffs_create_special(struct yaffs_obj *parent,
-                                      const YCHAR * name, u32 mode, u32 uid,
+                                      const YCHAR *name, u32 mode, u32 uid,
                                       u32 gid, u32 rdev);
 
-int yaffs_set_xattrib(struct yaffs_obj *obj, const YCHAR * name,
+int yaffs_set_xattrib(struct yaffs_obj *obj, const YCHAR *name,
                      const void *value, int size, int flags);
-int yaffs_get_xattrib(struct yaffs_obj *obj, const YCHAR * name, void *value,
+int yaffs_get_xattrib(struct yaffs_obj *obj, const YCHAR *name, void *value,
                      int size);
 int yaffs_list_xattrib(struct yaffs_obj *obj, char *buffer, int size);
-int yaffs_remove_xattrib(struct yaffs_obj *obj, const YCHAR * name);
+int yaffs_remove_xattrib(struct yaffs_obj *obj, const YCHAR *name);
 
 /* Special directories */
 struct yaffs_obj *yaffs_root(struct yaffs_dev *dev);
@@ -866,26 +889,26 @@ void yaffs_guts_test(struct yaffs_dev *dev);
 /* A few useful functions to be used within the core files*/
 void yaffs_chunk_del(struct yaffs_dev *dev, int chunk_id, int mark_flash,
                     int lyn);
-int yaffs_check_ff(u8 * buffer, int n_bytes);
+int yaffs_check_ff(u8 *buffer, int n_bytes);
 void yaffs_handle_chunk_error(struct yaffs_dev *dev,
                              struct yaffs_block_info *bi);
 
-u8 *yaffs_get_temp_buffer(struct yaffs_dev *dev, int line_no);
-void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 * buffer, int line_no);
+u8 *yaffs_get_temp_buffer(struct yaffs_dev *dev);
+void yaffs_release_temp_buffer(struct yaffs_dev *dev, u8 *buffer);
 
 struct yaffs_obj *yaffs_find_or_create_by_number(struct yaffs_dev *dev,
                                                 int number,
                                                 enum yaffs_obj_type type);
 int yaffs_put_chunk_in_file(struct yaffs_obj *in, int inode_chunk,
                            int nand_chunk, int in_scan);
-void yaffs_set_obj_name(struct yaffs_obj *obj, const YCHAR * name);
+void yaffs_set_obj_name(struct yaffs_obj *obj, const YCHAR *name);
 void yaffs_set_obj_name_from_oh(struct yaffs_obj *obj,
                                const struct yaffs_obj_hdr *oh);
 void yaffs_add_obj_to_dir(struct yaffs_obj *directory, struct yaffs_obj *obj);
-YCHAR *yaffs_clone_str(const YCHAR * str);
-void yaffs_link_fixup(struct yaffs_dev *dev, struct yaffs_obj *hard_list);
+YCHAR *yaffs_clone_str(const YCHAR *str);
+void yaffs_link_fixup(struct yaffs_dev *dev, struct list_head *hard_list);
 void yaffs_block_became_dirty(struct yaffs_dev *dev, int block_no);
-int yaffs_update_oh(struct yaffs_obj *in, const YCHAR * name,
+int yaffs_update_oh(struct yaffs_obj *in, const YCHAR *name,
                    int force, int is_shrink, int shadows,
                    struct yaffs_xattr_mod *xop);
 void yaffs_handle_shadowed_obj(struct yaffs_dev *dev, int obj_id,
@@ -897,7 +920,7 @@ struct yaffs_tnode *yaffs_add_find_tnode_0(struct yaffs_dev *dev,
                                           u32 chunk_id,
                                           struct yaffs_tnode *passed_tn);
 
-int yaffs_do_file_wr(struct yaffs_obj *in, const u8 * buffer, loff_t offset,
+int yaffs_do_file_wr(struct yaffs_obj *in, const u8 *buffer, loff_t offset,
                     int n_bytes, int write_trhrough);
 void yaffs_resize_file_down(struct yaffs_obj *obj, loff_t new_size);
 void yaffs_skip_rest_of_block(struct yaffs_dev *dev);
index 3b508cbc4e8a87133928fa82d2e0e15e75a534e8..8c522c84852a391e281df3b2815792de933f8721 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -25,11 +25,11 @@ struct yaffs_linux_context {
        struct task_struct *bg_thread;  /* Background thread for this device */
        int bg_running;
        struct mutex gross_lock;        /* Gross locking mutex*/
-       u8 *spare_buffer;       /* For mtdif2 use. Don't know the size of the buffer
+       u8 *spare_buffer;       /* For mtdif2 use. Don't know the buffer size
                                 * at compile time so we have to allocate it.
                                 */
        struct list_head search_contexts;
-       void (*put_super_fn) (struct super_block * sb);
+       void (*put_super_fn) (struct super_block *sb);
 
        struct task_struct *readdir_process;
        unsigned mount_id;
index 7cf53b3d91be5057a0ff9d2dfb6d3994d48b12ac..edc152575302e72a2339e58a730e57e40e028bcc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -26,10 +26,9 @@ int nandmtd_erase_block(struct yaffs_dev *dev, int block_no)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        u32 addr =
-           ((loff_t) block_no) * dev->param.total_bytes_per_chunk
-           dev->param.chunks_per_block;
+           ((loff_t) block_no) * dev->param.total_bytes_per_chunk *
+           dev->param.chunks_per_block;
        struct erase_info ei;
-
        int retval = 0;
 
        ei.mtd = mtd;
@@ -44,8 +43,8 @@ int nandmtd_erase_block(struct yaffs_dev *dev, int block_no)
 
        if (retval == 0)
                return YAFFS_OK;
-       else
-               return YAFFS_FAIL;
+
+       return YAFFS_FAIL;
 }
 
 int nandmtd_initialise(struct yaffs_dev *dev)
index 666507417fece16e07ea37c33ec29a488848487b..3ef5581fdbcfabd2f4fd41b9d521870527152285 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 07ce4524f0f6a38d8dc2df95c830fd4dec9d2d46..6a5df504744ce793c3f1bbbd7bd3a5a0e6bfeb7d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * This program is free software; you can redistribute it and/or modify
 #define __YAFFS_MTDIF1_H__
 
 int nandmtd1_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
-                             const u8 * data,
+                             const u8 *data,
                              const struct yaffs_ext_tags *tags);
 
 int nandmtd1_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
-                            u8 * data, struct yaffs_ext_tags *tags);
+                            u8 *data, struct yaffs_ext_tags *tags);
 
 int nandmtd1_mark_block_bad(struct yaffs_dev *dev, int block_no);
 
 int nandmtd1_query_block(struct yaffs_dev *dev, int block_no,
-                        enum yaffs_block_state *state, u32 * seq_number);
+                        enum yaffs_block_state *state, u32 *seq_number);
 
 #endif
index cf9c54cce23a98aa92a3b130edd21e9b9a6451a1..3673891c3b4450f1f5dc5d9d37deafddcf579203 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 /* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
 #if (MTD_VERSION_CODE > MTD_VERSION(2, 6, 17))
 
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
-# define YTAG1_SIZE 8
-#else
-# define YTAG1_SIZE 9
-#endif
 
 #if 0
 /* Use the following nand_ecclayout with MTD when using
- * CONFIG_YAFFS_9BYTE_TAGS and the older on-NAND tags layout.
+ * 9 byte tags and the older on-NAND tags layout.
  * If you have existing Yaffs images and the byte order differs from this,
  * adjust 'oobfree' to match your existing Yaffs data.
  *
@@ -64,7 +59,7 @@ static struct nand_ecclayout nand_oob_16 = {
        .eccbytes = 6,
        .eccpos = {8, 9, 10, 13, 14, 15},
        .oobavail = 9,
-       .oobfree = {{0, 4}, {6, 2}, {11, 2}, {4, 1}}
+       .oobfree = {{0, 4}, {6, 2}, {11, 2}, {4, 1} }
 };
 #endif
 
@@ -90,7 +85,7 @@ static struct nand_ecclayout nand_oob_16 = {
  * Returns YAFFS_OK or YAFFS_FAIL.
  */
 int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
-                             int nand_chunk, const u8 * data,
+                             int nand_chunk, const u8 *data,
                              const struct yaffs_ext_tags *etags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -113,27 +108,27 @@ int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
         * that only zeroed-bits stick and set tag bytes to all-ones and
         * zero just the (not) deleted bit.
         */
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
-       if (etags->is_deleted) {
-               memset(&pt1, 0xff, 8);
-               /* clear delete status bit to indicate deleted */
-               pt1.deleted = 0;
-       }
-#else
-       ((u8 *) & pt1)[8] = 0xff;
-       if (etags->is_deleted) {
-               memset(&pt1, 0xff, 8);
-               /* zero page_status byte to indicate deleted */
-               ((u8 *) & pt1)[8] = 0;
+       if(dev->param.tags_9bytes) {
+               ((u8 *) &pt1)[8] = 0xff;
+               if (etags->is_deleted) {
+                       memset(&pt1, 0xff, 8);
+                       /* zero page_status byte to indicate deleted */
+                       ((u8 *) &pt1)[8] = 0;
+                }
+        } else {
+               if (etags->is_deleted) {
+                       memset(&pt1, 0xff, 8);
+                       /* clear delete status bit to indicate deleted */
+                       pt1.deleted = 0;
+                }
        }
-#endif
 
        memset(&ops, 0, sizeof(ops));
        ops.mode = MTD_OOB_AUTO;
        ops.len = (data) ? chunk_bytes : 0;
-       ops.ooblen = YTAG1_SIZE;
+       ops.ooblen = dev->param.tags_9bytes ? 9 : 8;
        ops.datbuf = (u8 *) data;
-       ops.oobbuf = (u8 *) & pt1;
+       ops.oobbuf = (u8 *) &pt1;
 
        retval = mtd->write_oob(mtd, addr, &ops);
        if (retval) {
@@ -169,7 +164,7 @@ static int rettags(struct yaffs_ext_tags *etags, int ecc_result, int retval)
  * Returns YAFFS_OK or YAFFS_FAIL.
  */
 int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
-                            int nand_chunk, u8 * data,
+                            int nand_chunk, u8 *data,
                             struct yaffs_ext_tags *etags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -184,9 +179,9 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
        memset(&ops, 0, sizeof(ops));
        ops.mode = MTD_OOB_AUTO;
        ops.len = (data) ? chunk_bytes : 0;
-       ops.ooblen = YTAG1_SIZE;
+       ops.ooblen = dev->param.tags_9bytes ? 9 : 8;
        ops.datbuf = data;
-       ops.oobbuf = (u8 *) & pt1;
+       ops.oobbuf = (u8 *) &pt1;
 
 #if (MTD_VERSION_CODE < MTD_VERSION(2, 6, 20))
        /* In MTD 2.6.18 to 2.6.19 nand_base.c:nand_do_read_oob() has a bug;
@@ -226,20 +221,21 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
 
        /* Check for a blank/erased chunk.
         */
-       if (yaffs_check_ff((u8 *) & pt1, 8)) {
+       if (yaffs_check_ff((u8 *) &pt1, 8)) {
                /* when blank, upper layers want ecc_result to be <= NO_ERROR */
                return rettags(etags, YAFFS_ECC_RESULT_NO_ERROR, YAFFS_OK);
        }
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
-       /* Read deleted status (bit) then return it to it's non-deleted
-        * state before performing tags mini-ECC check. pt1.deleted is
-        * inverted.
-        */
-       deleted = !pt1.deleted;
-       pt1.deleted = 1;
-#else
-       deleted = (hweight8(((u8 *) & pt1)[8]) < 7);
-#endif
+
+       if(dev->param.tags_9bytes) {
+               deleted = (hweight8(((u8 *) &pt1)[8]) < 7);
+        } else {
+               /* Read deleted status (bit) then return it to it's non-deleted
+                * state before performing tags mini-ECC check. pt1.deleted is
+                * inverted.
+                */
+               deleted = !pt1.deleted;
+               pt1.deleted = 1;
+        }
 
        /* Check the packed tags mini-ECC and correct if necessary/possible.
         */
@@ -263,7 +259,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
        /* Unpack the tags to extended form and set ECC result.
         * [set should_be_ff just to keep yaffs_unpack_tags1 happy]
         */
-       pt1.should_be_ff = 0xFFFFFFFF;
+       pt1.should_be_ff = 0xffffffff;
        yaffs_unpack_tags1(etags, &pt1);
        etags->ecc_result = eccres;
 
@@ -295,16 +291,16 @@ int nandmtd1_mark_block_bad(struct yaffs_dev *dev, int block_no)
  *
  * Returns YAFFS_OK or YAFFS_FAIL.
  */
-static int nandmtd1_test_prerequists(struct mtd_info *mtd)
+static int nandmtd1_test_prerequists(struct yaffs_dev *dev, struct mtd_info *mtd)
 {
        /* 2.6.18 has mtd->ecclayout->oobavail */
        /* 2.6.21 has mtd->ecclayout->oobavail and mtd->oobavail */
        int oobavail = mtd->ecclayout->oobavail;
 
-       if (oobavail < YTAG1_SIZE) {
+       if (oobavail < (dev->param.tags_9bytes ? 9 : 8)) {
                yaffs_trace(YAFFS_TRACE_ERROR,
                        "mtd device has only %d bytes for tags, need %d",
-                       oobavail, YTAG1_SIZE);
+                       oobavail, dev->param.tags_9bytes ? 9 : 8);
                return YAFFS_FAIL;
        }
        return YAFFS_OK;
@@ -314,7 +310,7 @@ static int nandmtd1_test_prerequists(struct mtd_info *mtd)
  *
  * Examine the tags of the first chunk of the block and return the state:
  *  - YAFFS_BLOCK_STATE_DEAD, the block is marked bad
- *  - YAFFS_BLOCK_STATE_NEEDS_SCANNING, the block is in use
+ *  - YAFFS_BLOCK_STATE_NEEDS_SCAN, the block is in use
  *  - YAFFS_BLOCK_STATE_EMPTY, the block is clean
  *
  * Always returns YAFFS_OK.
@@ -333,7 +329,7 @@ int nandmtd1_query_block(struct yaffs_dev *dev, int block_no,
        /* We don't yet have a good place to test for MTD config prerequists.
         * Do it here as we are called during the initial scan.
         */
-       if (nandmtd1_test_prerequists(mtd) != YAFFS_OK)
+       if (nandmtd1_test_prerequists(dev, mtd) != YAFFS_OK)
                return YAFFS_FAIL;
 
        retval = nandmtd1_read_chunk_tags(dev, chunk_num, NULL, &etags);
@@ -345,9 +341,9 @@ int nandmtd1_query_block(struct yaffs_dev *dev, int block_no,
                state = YAFFS_BLOCK_STATE_DEAD;
        } else if (etags.ecc_result != YAFFS_ECC_RESULT_NO_ERROR) {
                /* bad tags, need to look more closely */
-               state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+               state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
        } else if (etags.chunk_used) {
-               state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+               state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
                seqnum = etags.seq_number;
        } else {
                state = YAFFS_BLOCK_STATE_EMPTY;
index 740f7f64d4d0f039337f4df7025cc6081d206d5c..467a0319f74ff4d8fda305d159539e86d589ba14 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 #include "yaffs_packedtags1.h"
 #include "yaffs_tagscompat.h"  /* for yaffs_calc_tags_ecc */
 #include "yaffs_linux.h"
-
 #include "linux/kernel.h"
 #include "linux/version.h"
 #include "linux/types.h"
 #include "linux/mtd/mtd.h"
 
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
-# define YTAG1_SIZE 8
-#else
-# define YTAG1_SIZE 9
-#endif
-
 /* Write a chunk (page) of data to NAND.
  *
  * Caller always provides ExtendedTags data which are converted to a more
@@ -64,7 +57,7 @@
  * Returns YAFFS_OK or YAFFS_FAIL.
  */
 int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
-                             int nand_chunk, const u8 * data,
+                             int nand_chunk, const u8 *data,
                              const struct yaffs_ext_tags *etags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -87,27 +80,28 @@ int nandmtd1_write_chunk_tags(struct yaffs_dev *dev,
         * that only zeroed-bits stick and set tag bytes to all-ones and
         * zero just the (not) deleted bit.
         */
-#ifndef CONFIG_YAFFS_9BYTE_TAGS
-       if (etags->is_deleted) {
-               memset(&pt1, 0xff, 8);
-               /* clear delete status bit to indicate deleted */
-               pt1.deleted = 0;
-       }
-#else
-       ((u8 *) & pt1)[8] = 0xff;
-       if (etags->is_deleted) {
-               memset(&pt1, 0xff, 8);
-               /* zero page_status byte to indicate deleted */
-               ((u8 *) & pt1)[8] = 0;
-       }
-#endif
+        
+       if(dev->param.tags_9bytes) {
+               ((u8 *) &pt1)[8] = 0xff;
+               if (etags->is_deleted) {
+                       memset(&pt1, 0xff, 8);
+                       /* zero page_status byte to indicate deleted */
+                       ((u8 *) &pt1)[8] = 0;
+                }
+        } else {
+               if (etags->is_deleted) {
+                       memset(&pt1, 0xff, 8);
+                       /* clear delete status bit to indicate deleted */
+                       pt1.deleted = 0;
+                }
+        }
 
        memset(&ops, 0, sizeof(ops));
        ops.mode = MTD_OOB_AUTO;
        ops.len = (data) ? chunk_bytes : 0;
-       ops.ooblen = YTAG1_SIZE;
+       ops.ooblen = dev->param.tags_9bytes ? 9 : 8;
        ops.datbuf = (u8 *) data;
-       ops.oobbuf = (u8 *) & pt1;
+       ops.oobbuf = (u8 *) &pt1;
 
        retval = mtd->write_oob(mtd, addr, &ops);
        if (retval) {
@@ -143,7 +137,7 @@ static int rettags(struct yaffs_ext_tags *etags, int ecc_result, int retval)
  * Returns YAFFS_OK or YAFFS_FAIL.
  */
 int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
-                            int nand_chunk, u8 * data,
+                            int nand_chunk, u8 *data,
                             struct yaffs_ext_tags *etags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -158,9 +152,9 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
        memset(&ops, 0, sizeof(ops));
        ops.mode = MTD_OOB_AUTO;
        ops.len = (data) ? chunk_bytes : 0;
-       ops.ooblen = YTAG1_SIZE;
+       ops.ooblen =  dev->param.tags_9bytes ? 9 : 8;
        ops.datbuf = data;
-       ops.oobbuf = (u8 *) & pt1;
+       ops.oobbuf = (u8 *) &pt1;
 
        /* Read page and oob using MTD.
         * Check status and determine ECC result.
@@ -195,7 +189,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
 
        /* Check for a blank/erased chunk.
         */
-       if (yaffs_check_ff((u8 *) & pt1, 8)) {
+       if (yaffs_check_ff((u8 *) &pt1, 8)) {
                /* when blank, upper layers want ecc_result to be <= NO_ERROR */
                return rettags(etags, YAFFS_ECC_RESULT_NO_ERROR, YAFFS_OK);
        }
@@ -207,7 +201,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
        deleted = !pt1.deleted;
        pt1.deleted = 1;
 #else
-       deleted = (hweight8(((u8 *) & pt1)[8]) < 7);
+       deleted = (hweight8(((u8 *) &pt1)[8]) < 7);
 #endif
 
        /* Check the packed tags mini-ECC and correct if necessary/possible.
@@ -232,7 +226,7 @@ int nandmtd1_read_chunk_tags(struct yaffs_dev *dev,
        /* Unpack the tags to extended form and set ECC result.
         * [set should_be_ff just to keep yaffs_unpack_tags1 happy]
         */
-       pt1.should_be_ff = 0xFFFFFFFF;
+       pt1.should_be_ff = 0xffffffff;
        yaffs_unpack_tags1(etags, &pt1);
        etags->ecc_result = eccres;
 
@@ -271,10 +265,10 @@ static int nandmtd1_test_prerequists(struct mtd_info *mtd)
        /* 2.6.21 has mtd->ecclayout->oobavail and mtd->oobavail */
        int oobavail = mtd->ecclayout->oobavail;
 
-       if (oobavail < YTAG1_SIZE) {
+       if (oobavail < (dev->param.tags_9bytes ? 9 : 8)) {
                yaffs_trace(YAFFS_TRACE_ERROR,
                        "mtd device has only %d bytes for tags, need %d",
-                       oobavail, YTAG1_SIZE);
+                       oobavail, (dev->param.tags_9bytes ? 9 : 8);
                return YAFFS_FAIL;
        }
        return YAFFS_OK;
@@ -284,7 +278,7 @@ static int nandmtd1_test_prerequists(struct mtd_info *mtd)
  *
  * Examine the tags of the first chunk of the block and return the state:
  *  - YAFFS_BLOCK_STATE_DEAD, the block is marked bad
- *  - YAFFS_BLOCK_STATE_NEEDS_SCANNING, the block is in use
+ *  - YAFFS_BLOCK_STATE_NEEDS_SCAN, the block is in use
  *  - YAFFS_BLOCK_STATE_EMPTY, the block is clean
  *
  * Always returns YAFFS_OK.
@@ -314,9 +308,9 @@ int nandmtd1_query_block(struct yaffs_dev *dev, int block_no,
                state = YAFFS_BLOCK_STATE_DEAD;
        } else if (etags.ecc_result != YAFFS_ECC_RESULT_NO_ERROR) {
                /* bad tags, need to look more closely */
-               state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+               state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
        } else if (etags.chunk_used) {
-               state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+               state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
                seqnum = etags.seq_number;
        } else {
                state = YAFFS_BLOCK_STATE_EMPTY;
index d82112610d04306b1e6e4b84f6064cbe841db027..d4d18585b2cfa4fc737040938c6d9ae8a8bb701c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 
 #include "yaffs_guts.h"
 int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
-                             const u8 * data,
+                             const u8 *data,
                              const struct yaffs_ext_tags *tags);
 int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
-                            u8 * data, struct yaffs_ext_tags *tags);
+                            u8 *data, struct yaffs_ext_tags *tags);
 int nandmtd2_mark_block_bad(struct yaffs_dev *dev, int block_no);
 int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
-                        enum yaffs_block_state *state, u32 * seq_number);
+                        enum yaffs_block_state *state, u32 *seq_number);
 
 #endif
index 9dcccb86162b34d7f271af376d663418a19582c2..684ed2a956dac805ccce39e69d8af7102522a972 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 #include "yaffs_linux.h"
 
 /* NB For use with inband tags....
- * We assume that the data buffer is of size total_bytes_per_chunk so that we can also
- * use it to load the tags.
+ * We assume that the data buffer is of size total_bytes_per_chunk so
+ * that we can also use it to load the tags.
  */
 int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
-                             const u8 * data,
+                             const u8 *data,
                              const struct yaffs_ext_tags *tags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
@@ -67,12 +67,12 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
                struct yaffs_packed_tags2_tags_only *pt2tp;
                pt2tp =
                    (struct yaffs_packed_tags2_tags_only *)(data +
-                                                           dev->
-                                                           data_bytes_per_chunk);
+                                                       dev->
+                                                       data_bytes_per_chunk);
                yaffs_pack_tags2_tags_only(pt2tp, tags);
        } else {
                yaffs_pack_tags2(&pt, tags, !dev->param.no_tags_ecc);
-        }
+       }
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
        ops.mode = MTD_OOB_AUTO;
@@ -102,7 +102,7 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
 }
 
 int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
-                            u8 * data, struct yaffs_ext_tags *tags)
+                            u8 *data, struct yaffs_ext_tags *tags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
 #if (MTD_VERSION_CODE > MTD_VERSION(2, 6, 17))
@@ -129,7 +129,7 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
 
                if (!data) {
                        local_data = 1;
-                       data = yaffs_get_temp_buffer(dev, __LINE__);
+                       data = yaffs_get_temp_buffer(dev);
                }
 
        }
@@ -182,7 +182,7 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
        }
 
        if (local_data)
-               yaffs_release_temp_buffer(dev, data, __LINE__);
+               yaffs_release_temp_buffer(dev, data);
 
        if (tags && retval == -EBADMSG
            && tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
@@ -221,7 +221,7 @@ int nandmtd2_mark_block_bad(struct yaffs_dev *dev, int block_no)
 }
 
 int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
-                        enum yaffs_block_state *state, u32 * seq_number)
+                        enum yaffs_block_state *state, u32 *seq_number)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        int retval;
@@ -244,7 +244,7 @@ int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
 
                if (t.chunk_used) {
                        *seq_number = t.seq_number;
-                       *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+                       *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
                } else {
                        *seq_number = 0;
                        *state = YAFFS_BLOCK_STATE_EMPTY;
index d1643df2c381b89e92b403a09e12732b39a91aac..c013232f7f27654cc278b4e634ec35f39fc00c29 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 
 #include "yportenv.h"
 #include "yaffs_trace.h"
-
 #include "yaffs_mtdif2.h"
-
+#include "yaffs_packedtags2.h"
+#include "yaffs_linux.h"
 #include "linux/mtd/mtd.h"
 #include "linux/types.h"
 #include "linux/time.h"
 
-#include "yaffs_packedtags2.h"
-
-#include "yaffs_linux.h"
 
 /* NB For use with inband tags....
- * We assume that the data buffer is of size total_bytes_per_chunk so that we can also
- * use it to load the tags.
+ * We assume that the data buffer is of size total_bytes_per_chunk so that
+ * we can also use it to load the tags.
  */
 int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
-                             const u8 * data,
+                             const u8 *data,
                              const struct yaffs_ext_tags *tags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        struct mtd_oob_ops ops;
        int retval = 0;
-
        loff_t addr;
-
        struct yaffs_packed_tags2 pt;
-
        int packed_tags_size =
            dev->param.no_tags_ecc ? sizeof(pt.t) : sizeof(pt);
        void *packed_tags_ptr =
@@ -61,14 +55,14 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
                BUG();
        else if (dev->param.inband_tags) {
                struct yaffs_packed_tags2_tags_only *pt2tp;
+
                pt2tp =
-                   (struct yaffs_packed_tags2_tags_only *)(data +
-                                                           dev->
-                                                           data_bytes_per_chunk);
+                   (struct yaffs_packed_tags2_tags_only *)
+                       (data + dev->data_bytes_per_chunk);
                yaffs_pack_tags2_tags_only(pt2tp, tags);
        } else {
                yaffs_pack_tags2(&pt, tags, !dev->param.no_tags_ecc);
-        }
+       }
 
        ops.mode = MTD_OOB_AUTO;
        ops.ooblen = (dev->param.inband_tags) ? 0 : packed_tags_size;
@@ -80,24 +74,20 @@ int nandmtd2_write_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
 
        if (retval == 0)
                return YAFFS_OK;
-       else
-               return YAFFS_FAIL;
+
+       return YAFFS_FAIL;
 }
 
 int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
-                            u8 * data, struct yaffs_ext_tags *tags)
+                            u8 *data, struct yaffs_ext_tags *tags)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        struct mtd_oob_ops ops;
-
        size_t dummy;
        int retval = 0;
        int local_data = 0;
-
        loff_t addr = ((loff_t) nand_chunk) * dev->param.total_bytes_per_chunk;
-
        struct yaffs_packed_tags2 pt;
-
        int packed_tags_size =
            dev->param.no_tags_ecc ? sizeof(pt.t) : sizeof(pt);
        void *packed_tags_ptr =
@@ -107,19 +97,15 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
                "nandmtd2_read_chunk_tags chunk %d data %p tags %p",
                nand_chunk, data, tags);
 
-       if (dev->param.inband_tags) {
-
-               if (!data) {
-                       local_data = 1;
-                       data = yaffs_get_temp_buffer(dev, __LINE__);
-               }
-
+       if (dev->param.inband_tags && !data) {
+               local_data = 1;
+               data = yaffs_get_temp_buffer(dev);
        }
 
-       if (dev->param.inband_tags || (data && !tags))
+       if (dev->param.inband_tags || (data && !tags)) {
                retval = mtd->read(mtd, addr, dev->param.total_bytes_per_chunk,
                                   &dummy, data);
-       else if (tags) {
+       else if (tags) {
                ops.mode = MTD_OOB_AUTO;
                ops.ooblen = packed_tags_size;
                ops.len = data ? dev->data_bytes_per_chunk : packed_tags_size;
@@ -129,46 +115,45 @@ int nandmtd2_read_chunk_tags(struct yaffs_dev *dev, int nand_chunk,
                retval = mtd->read_oob(mtd, addr, &ops);
        }
 
-       if (dev->param.inband_tags) {
-               if (tags) {
-                       struct yaffs_packed_tags2_tags_only *pt2tp;
-                       pt2tp =
-                           (struct yaffs_packed_tags2_tags_only *)&data[dev->
-                                                                        data_bytes_per_chunk];
-                       yaffs_unpack_tags2_tags_only(tags, pt2tp);
-               }
-       } else {
-               if (tags) {
-                       memcpy(packed_tags_ptr,
-                              yaffs_dev_to_lc(dev)->spare_buffer,
-                              packed_tags_size);
-                       yaffs_unpack_tags2(tags, &pt, !dev->param.no_tags_ecc);
-               }
+       if (dev->param.inband_tags && tags) {
+               struct yaffs_packed_tags2_tags_only *pt2tp;
+
+               pt2tp =
+                       (struct yaffs_packed_tags2_tags_only *)
+                               &data[dev->data_bytes_per_chunk];
+               yaffs_unpack_tags2_tags_only(tags, pt2tp);
+       } else if (tags) {
+               memcpy(packed_tags_ptr,
+                      yaffs_dev_to_lc(dev)->spare_buffer,
+                      packed_tags_size);
+               yaffs_unpack_tags2(tags, &pt, !dev->param.no_tags_ecc);
        }
 
        if (local_data)
-               yaffs_release_temp_buffer(dev, data, __LINE__);
+               yaffs_release_temp_buffer(dev, data);
 
-       if (tags && retval == -EBADMSG
-           && tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
+       if (tags && retval == -EBADMSG &&
+           tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
                tags->ecc_result = YAFFS_ECC_RESULT_UNFIXED;
                dev->n_ecc_unfixed++;
        }
-       if (tags && retval == -EUCLEAN
-           && tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
+       if (tags && retval == -EUCLEAN &&
+           tags->ecc_result == YAFFS_ECC_RESULT_NO_ERROR) {
                tags->ecc_result = YAFFS_ECC_RESULT_FIXED;
                dev->n_ecc_fixed++;
        }
+
        if (retval == 0)
                return YAFFS_OK;
-       else
-               return YAFFS_FAIL;
+
+       return YAFFS_FAIL;
 }
 
 int nandmtd2_mark_block_bad(struct yaffs_dev *dev, int block_no)
 {
        struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
        int retval;
+
        yaffs_trace(YAFFS_TRACE_MTD,
                "nandmtd2_mark_block_bad %d", block_no);
 
@@ -179,9 +164,8 @@ int nandmtd2_mark_block_bad(struct yaffs_dev *dev, int block_no)
 
        if (retval == 0)
                return YAFFS_OK;
-       else
-               return YAFFS_FAIL;
 
+       return YAFFS_FAIL;
 }
 
 int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
@@ -203,12 +187,13 @@ int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
                *seq_number = 0;
        } else {
                struct yaffs_ext_tags t;
+
                nandmtd2_read_chunk_tags(dev, block_no *
                                         dev->param.chunks_per_block, NULL, &t);
 
                if (t.chunk_used) {
                        *seq_number = t.seq_number;
-                       *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+                       *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
                } else {
                        *seq_number = 0;
                        *state = YAFFS_BLOCK_STATE_EMPTY;
@@ -219,7 +204,6 @@ int nandmtd2_query_block(struct yaffs_dev *dev, int block_no,
 
        if (retval == 0)
                return YAFFS_OK;
-       else
-               return YAFFS_FAIL;
-}
 
+       return YAFFS_FAIL;
+}
index daa36f989d318bf6dd5684973576a875144d455f..487b03e19fd9a6f0fb06800f7dde867602ccdc16 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
  */
 
 /*
- * This simple implementation of a name-value store assumes a small number of values and fits
- * into a small finite buffer.
+ * This simple implementation of a name-value store assumes a small number of
+* values and fits into a small finite buffer.
  *
  * Each attribute is stored as a record:
  *  sizeof(int) bytes   record size.
  *  strnlen+1 bytes name null terminated.
  *  nbytes    value.
  *  ----------
- *  total size  stored in record size 
+ *  total size  stored in record size
  *
  * This code has not been tested with unicode yet.
  */
@@ -29,7 +29,7 @@
 
 #include "yportenv.h"
 
-static int nval_find(const char *xb, int xb_size, const YCHAR * name,
+static int nval_find(const char *xb, int xb_size, const YCHAR *name,
                     int *exist_size)
 {
        int pos = 0;
@@ -37,8 +37,7 @@ static int nval_find(const char *xb, int xb_size, const YCHAR * name,
 
        memcpy(&size, xb, sizeof(int));
        while (size > 0 && (size < xb_size) && (pos + size < xb_size)) {
-               if (strncmp
-                   ((YCHAR *) (xb + pos + sizeof(int)), name, size) == 0) {
+               if (!strncmp((YCHAR *) (xb + pos + sizeof(int)), name, size)) {
                        if (exist_size)
                                *exist_size = size;
                        return pos;
@@ -51,7 +50,7 @@ static int nval_find(const char *xb, int xb_size, const YCHAR * name,
        }
        if (exist_size)
                *exist_size = 0;
-       return -1;
+       return -ENODATA;
 }
 
 static int nval_used(const char *xb, int xb_size)
@@ -70,24 +69,24 @@ static int nval_used(const char *xb, int xb_size)
        return pos;
 }
 
-int nval_del(char *xb, int xb_size, const YCHAR * name)
+int nval_del(char *xb, int xb_size, const YCHAR *name)
 {
        int pos = nval_find(xb, xb_size, name, NULL);
        int size;
 
-       if (pos >= 0 && pos < xb_size) {
-               /* Find size, shift rest over this record, then zero out the rest of buffer */
-               memcpy(&size, xb + pos, sizeof(int));
-               memcpy(xb + pos, xb + pos + size, xb_size - (pos + size));
-               memset(xb + (xb_size - size), 0, size);
-               return 0;
-       } else {
+       if (pos < 0 || pos >= xb_size)
                return -ENODATA;
-        }
+
+       /* Find size, shift rest over this record,
+        * then zero out the rest of buffer */
+       memcpy(&size, xb + pos, sizeof(int));
+       memcpy(xb + pos, xb + pos + size, xb_size - (pos + size));
+       memset(xb + (xb_size - size), 0, size);
+       return 0;
 }
 
-int nval_set(char *xb, int xb_size, const YCHAR * name, const char *buf,
-            int bsize, int flags)
+int nval_set(char *xb, int xb_size, const YCHAR *name, const char *buf,
+               int bsize, int flags)
 {
        int pos;
        int namelen = strnlen(name, xb_size);
@@ -147,16 +146,21 @@ int nval_get(const char *xb, int xb_size, const YCHAR * name, char *buf,
                pos++;
                size--;
 
+               /* If bsize is zero then this is a size query.
+                * Return the size, but don't copy.
+                */
+               if (!bsize)
+                       return size;
+
                if (size <= bsize) {
                        memcpy(buf, xb + pos, size);
                        return size;
                }
-
        }
        if (pos >= 0)
                return -ERANGE;
-       else
-               return -ENODATA;
+
+       return -ENODATA;
 }
 
 int nval_list(const char *xb, int xb_size, char *buf, int bsize)
@@ -168,8 +172,10 @@ int nval_list(const char *xb, int xb_size, char *buf, int bsize)
        int filled = 0;
 
        memcpy(&size, xb + pos, sizeof(int));
-       while (size > sizeof(int) && size <= xb_size && (pos + size) < xb_size
-              && !filled) {
+       while (size > sizeof(int) &&
+               size <= xb_size &&
+               (pos + size) < xb_size &&
+               !filled) {
                pos += sizeof(int);
                size -= sizeof(int);
                name_len = strnlen((YCHAR *) (xb + pos), size);
@@ -185,7 +191,7 @@ int nval_list(const char *xb, int xb_size, char *buf, int bsize)
                        ncopied += (name_len + 1);
                } else {
                        filled = 1;
-                }
+               }
                pos += size;
                if (pos < xb_size - sizeof(int))
                        memcpy(&size, xb + pos, sizeof(int));
index 2bb02b62762835cd14355316d1b515f48e3fc447..951e64f872b644595a119112a1073af8d4c72cc7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 25b5213a436e75e06b8bf6ee77a4061b3e333a17..165d01004d6efde447d4b88a42f38c74dafa5fed 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 
 #include "yaffs_nand.h"
 #include "yaffs_tagscompat.h"
-#include "yaffs_tagsvalidity.h"
 
 #include "yaffs_getblockinfo.h"
+#include "yaffs_summary.h"
 
 int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk,
-                            u8 * buffer, struct yaffs_ext_tags *tags)
+                            u8 *buffer, struct yaffs_ext_tags *tags)
 {
        int result;
        struct yaffs_ext_tags local_tags;
-
-       int realigned_chunk = nand_chunk - dev->chunk_offset;
+       int flash_chunk = nand_chunk - dev->chunk_offset;
 
        dev->n_page_reads++;
 
-       /* If there are no tags provided, use local tags to get prioritised gc working */
+       /* If there are no tags provided use local tags. */
        if (!tags)
                tags = &local_tags;
 
        if (dev->param.read_chunk_tags_fn)
                result =
-                   dev->param.read_chunk_tags_fn(dev, realigned_chunk, buffer,
+                   dev->param.read_chunk_tags_fn(dev, flash_chunk, buffer,
                                                  tags);
        else
                result = yaffs_tags_compat_rd(dev,
-                                             realigned_chunk, buffer, tags);
+                                             flash_chunk, buffer, tags);
        if (tags && tags->ecc_result > YAFFS_ECC_RESULT_NO_ERROR) {
 
                struct yaffs_block_info *bi;
@@ -46,65 +45,61 @@ int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk,
                                          dev->param.chunks_per_block);
                yaffs_handle_chunk_error(dev, bi);
        }
-
        return result;
 }
 
 int yaffs_wr_chunk_tags_nand(struct yaffs_dev *dev,
-                            int nand_chunk,
-                            const u8 * buffer, struct yaffs_ext_tags *tags)
+                               int nand_chunk,
+                               const u8 *buffer, struct yaffs_ext_tags *tags)
 {
+       int result;
+       int flash_chunk = nand_chunk - dev->chunk_offset;
 
        dev->n_page_writes++;
 
-       nand_chunk -= dev->chunk_offset;
-
        if (tags) {
                tags->seq_number = dev->seq_number;
                tags->chunk_used = 1;
-               if (!yaffs_validate_tags(tags)) {
-                       yaffs_trace(YAFFS_TRACE_ERROR, "Writing uninitialised tags");
-                       YBUG();
-               }
                yaffs_trace(YAFFS_TRACE_WRITE,
                        "Writing chunk %d tags %d %d",
                        nand_chunk, tags->obj_id, tags->chunk_id);
        } else {
                yaffs_trace(YAFFS_TRACE_ERROR, "Writing with no tags");
-               YBUG();
+               BUG();
                return YAFFS_FAIL;
        }
 
        if (dev->param.write_chunk_tags_fn)
-               return dev->param.write_chunk_tags_fn(dev, nand_chunk, buffer,
-                                                     tags);
+               result = dev->param.write_chunk_tags_fn(dev, flash_chunk,
+                                                       buffer, tags);
        else
-               return yaffs_tags_compat_wr(dev, nand_chunk, buffer, tags);
+               result = yaffs_tags_compat_wr(dev, flash_chunk, buffer, tags);
+
+       yaffs_summary_add(dev, tags, nand_chunk);
+
+       return result;
 }
 
 int yaffs_mark_bad(struct yaffs_dev *dev, int block_no)
 {
        block_no -= dev->block_offset;
-
        if (dev->param.bad_block_fn)
                return dev->param.bad_block_fn(dev, block_no);
-       else
-               return yaffs_tags_compat_mark_bad(dev, block_no);
+
+       return yaffs_tags_compat_mark_bad(dev, block_no);
 }
 
 int yaffs_query_init_block_state(struct yaffs_dev *dev,
                                 int block_no,
                                 enum yaffs_block_state *state,
-                                u32 * seq_number)
+                                u32 *seq_number)
 {
        block_no -= dev->block_offset;
-
        if (dev->param.query_block_fn)
                return dev->param.query_block_fn(dev, block_no, state,
                                                 seq_number);
-       else
-               return yaffs_tags_compat_query_block(dev, block_no,
-                                                    state, seq_number);
+
+       return yaffs_tags_compat_query_block(dev, block_no, state, seq_number);
 }
 
 int yaffs_erase_block(struct yaffs_dev *dev, int flash_block)
@@ -112,11 +107,8 @@ int yaffs_erase_block(struct yaffs_dev *dev, int flash_block)
        int result;
 
        flash_block -= dev->block_offset;
-
        dev->n_erasures++;
-
        result = dev->param.erase_fn(dev, flash_block);
-
        return result;
 }
 
index 543f1987124e6a9d9ea0682a4d51278f92191286..71346627fc0b7db66a90b833231ce4d186f5b4d6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 #include "yaffs_guts.h"
 
 int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk,
-                            u8 * buffer, struct yaffs_ext_tags *tags);
+                            u8 *buffer, struct yaffs_ext_tags *tags);
 
 int yaffs_wr_chunk_tags_nand(struct yaffs_dev *dev,
                             int nand_chunk,
-                            const u8 * buffer, struct yaffs_ext_tags *tags);
+                            const u8 *buffer, struct yaffs_ext_tags *tags);
 
 int yaffs_mark_bad(struct yaffs_dev *dev, int block_no);
 
index a77f0954fc135a3440c70918a616925551c098a5..dd9a331d8fc41e3dad052e75541f17bfc786b312 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 #include "yaffs_packedtags1.h"
 #include "yportenv.h"
 
+static const u8 all_ff[20] = {
+       0xff, 0xff, 0xff, 0xff,
+       0xff, 0xff, 0xff, 0xff,
+       0xff, 0xff, 0xff, 0xff,
+       0xff, 0xff, 0xff, 0xff,
+       0xff, 0xff, 0xff, 0xff
+};
+
 void yaffs_pack_tags1(struct yaffs_packed_tags1 *pt,
                      const struct yaffs_ext_tags *t)
 {
@@ -24,21 +32,16 @@ void yaffs_pack_tags1(struct yaffs_packed_tags1 *pt,
        pt->ecc = 0;
        pt->deleted = (t->is_deleted) ? 0 : 1;
        pt->unused_stuff = 0;
-       pt->should_be_ff = 0xFFFFFFFF;
-
+       pt->should_be_ff = 0xffffffff;
 }
 
 void yaffs_unpack_tags1(struct yaffs_ext_tags *t,
                        const struct yaffs_packed_tags1 *pt)
 {
-       static const u8 all_ff[] =
-           { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
-               0xff
-       };
 
        if (memcmp(all_ff, pt, sizeof(struct yaffs_packed_tags1))) {
                t->block_bad = 0;
-               if (pt->should_be_ff != 0xFFFFFFFF)
+               if (pt->should_be_ff != 0xffffffff)
                        t->block_bad = 1;
                t->chunk_used = 1;
                t->obj_id = pt->obj_id;
index d6861ff505e45701e7edce4a354d66b25220b6a3..b80f0a5b15740f0e38deabd18400aef65667d470 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 8e7fea3d286037ffc08b6745012873afce4ed046..820bc41023c2e70725699e7e24602f20f62797d8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -14,7 +14,6 @@
 #include "yaffs_packedtags2.h"
 #include "yportenv.h"
 #include "yaffs_trace.h"
-#include "yaffs_tagsvalidity.h"
 
 /* This code packs a set of extended tags into a binary structure for
  * NAND storage
 #define EXTRA_SHADOWS_FLAG     0x20000000
 #define EXTRA_SPARE_FLAGS      0x10000000
 
-#define ALL_EXTRA_FLAGS                0xF0000000
+#define ALL_EXTRA_FLAGS                0xf0000000
 
 /* Also, the top 4 bits of the object Id are set to the object type. */
 #define EXTRA_OBJECT_TYPE_SHIFT (28)
-#define EXTRA_OBJECT_TYPE_MASK  ((0x0F) << EXTRA_OBJECT_TYPE_SHIFT)
+#define EXTRA_OBJECT_TYPE_MASK  ((0x0f) << EXTRA_OBJECT_TYPE_SHIFT)
 
-static void yaffs_dump_packed_tags2_tags_only(const struct
-                                             yaffs_packed_tags2_tags_only *ptt)
+static void yaffs_dump_packed_tags2_tags_only(
+                               const struct yaffs_packed_tags2_tags_only *ptt)
 {
        yaffs_trace(YAFFS_TRACE_MTD,
                "packed tags obj %d chunk %d byte %d seq %d",
@@ -100,78 +99,65 @@ void yaffs_pack_tags2(struct yaffs_packed_tags2 *pt,
 
        if (tags_ecc)
                yaffs_ecc_calc_other((unsigned char *)&pt->t,
-                                    sizeof(struct
-                                           yaffs_packed_tags2_tags_only),
-                                    &pt->ecc);
+                                   sizeof(struct yaffs_packed_tags2_tags_only),
+                                   &pt->ecc);
 }
 
 void yaffs_unpack_tags2_tags_only(struct yaffs_ext_tags *t,
                                  struct yaffs_packed_tags2_tags_only *ptt)
 {
-
        memset(t, 0, sizeof(struct yaffs_ext_tags));
 
-       yaffs_init_tags(t);
-
-       if (ptt->seq_number != 0xFFFFFFFF) {
-               t->block_bad = 0;
-               t->chunk_used = 1;
-               t->obj_id = ptt->obj_id;
-               t->chunk_id = ptt->chunk_id;
-               t->n_bytes = ptt->n_bytes;
-               t->is_deleted = 0;
-               t->serial_number = 0;
-               t->seq_number = ptt->seq_number;
-
-               /* Do extra header info stuff */
-
-               if (ptt->chunk_id & EXTRA_HEADER_INFO_FLAG) {
-                       t->chunk_id = 0;
-                       t->n_bytes = 0;
-
-                       t->extra_available = 1;
-                       t->extra_parent_id =
-                           ptt->chunk_id & (~(ALL_EXTRA_FLAGS));
-                       t->extra_is_shrink =
-                           (ptt->chunk_id & EXTRA_SHRINK_FLAG) ? 1 : 0;
-                       t->extra_shadows =
-                           (ptt->chunk_id & EXTRA_SHADOWS_FLAG) ? 1 : 0;
-                       t->extra_obj_type =
-                           ptt->obj_id >> EXTRA_OBJECT_TYPE_SHIFT;
-                       t->obj_id &= ~EXTRA_OBJECT_TYPE_MASK;
-
-                       if (t->extra_obj_type == YAFFS_OBJECT_TYPE_HARDLINK)
-                               t->extra_equiv_id = ptt->n_bytes;
-                       else
-                               t->extra_length = ptt->n_bytes;
-               }
-       }
+       if (ptt->seq_number == 0xffffffff)
+               return;
+
+       t->block_bad = 0;
+       t->chunk_used = 1;
+       t->obj_id = ptt->obj_id;
+       t->chunk_id = ptt->chunk_id;
+       t->n_bytes = ptt->n_bytes;
+       t->is_deleted = 0;
+       t->serial_number = 0;
+       t->seq_number = ptt->seq_number;
+
+       /* Do extra header info stuff */
+       if (ptt->chunk_id & EXTRA_HEADER_INFO_FLAG) {
+               t->chunk_id = 0;
+               t->n_bytes = 0;
+
+               t->extra_available = 1;
+               t->extra_parent_id = ptt->chunk_id & (~(ALL_EXTRA_FLAGS));
+               t->extra_is_shrink = ptt->chunk_id & EXTRA_SHRINK_FLAG ? 1 : 0;
+               t->extra_shadows = ptt->chunk_id & EXTRA_SHADOWS_FLAG ? 1 : 0;
+               t->extra_obj_type = ptt->obj_id >> EXTRA_OBJECT_TYPE_SHIFT;
+               t->obj_id &= ~EXTRA_OBJECT_TYPE_MASK;
 
+               if (t->extra_obj_type == YAFFS_OBJECT_TYPE_HARDLINK)
+                       t->extra_equiv_id = ptt->n_bytes;
+               else
+                       t->extra_length = ptt->n_bytes;
+       }
        yaffs_dump_packed_tags2_tags_only(ptt);
        yaffs_dump_tags2(t);
-
 }
 
 void yaffs_unpack_tags2(struct yaffs_ext_tags *t, struct yaffs_packed_tags2 *pt,
                        int tags_ecc)
 {
-
        enum yaffs_ecc_result ecc_result = YAFFS_ECC_RESULT_NO_ERROR;
 
-       if (pt->t.seq_number != 0xFFFFFFFF && tags_ecc) {
+       if (pt->t.seq_number != 0xffffffff && tags_ecc) {
                /* Chunk is in use and we need to do ECC */
 
                struct yaffs_ecc_other ecc;
                int result;
                yaffs_ecc_calc_other((unsigned char *)&pt->t,
-                                    sizeof(struct
-                                           yaffs_packed_tags2_tags_only),
-                                    &ecc);
+                               sizeof(struct yaffs_packed_tags2_tags_only),
+                               &ecc);
                result =
                    yaffs_ecc_correct_other((unsigned char *)&pt->t,
-                                           sizeof(struct
-                                                  yaffs_packed_tags2_tags_only),
-                                           &pt->ecc, &ecc);
+                               sizeof(struct yaffs_packed_tags2_tags_only),
+                               &pt->ecc, &ecc);
                switch (result) {
                case 0:
                        ecc_result = YAFFS_ECC_RESULT_NO_ERROR;
@@ -186,7 +172,6 @@ void yaffs_unpack_tags2(struct yaffs_ext_tags *t, struct yaffs_packed_tags2 *pt,
                        ecc_result = YAFFS_ECC_RESULT_UNKNOWN;
                }
        }
-
        yaffs_unpack_tags2_tags_only(t, &pt->t);
 
        t->ecc_result = ecc_result;
index f3296697bc0c51712f2e6f0ee19474a2282ede15..675e719460a839042be3fac805f826a58f979d06 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
diff --git a/yaffs_summary.c b/yaffs_summary.c
new file mode 100644 (file)
index 0000000..4cf1711
--- /dev/null
@@ -0,0 +1,252 @@
+/*
+ * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2011 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <charles@aleph1.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/* Summaries write the useful part of the tags for the chunks in a block into an
+ * an array which is written to the last n chunks of the block.
+ * Reading the summaries gives all the tags for the block in one read. Much
+ * faster.
+ *
+ * Chunks holding summaries are marked with tags making it look like
+ * they are part of a fake file.
+ *
+ * The summary could also be used during gc.
+ *
+ */
+
+#include "yaffs_summary.h"
+#include "yaffs_packedtags2.h"
+#include "yaffs_nand.h"
+#include "yaffs_getblockinfo.h"
+#include "yaffs_bitmap.h"
+
+/* Summary tags don't need the sequence number because that is redundant. */
+struct yaffs_summary_tags {
+       unsigned obj_id;
+       unsigned chunk_id;
+       unsigned n_bytes;
+};
+
+static void yaffs_summary_clear(struct yaffs_dev *dev)
+{
+       if(!dev->sum_tags)
+               return;
+       memset(dev->sum_tags, 0, dev->chunks_per_summary *
+               sizeof(struct yaffs_summary_tags));
+}
+
+int yaffs_summary_init(struct yaffs_dev *dev)
+{
+       int sum_bytes;
+       int chunks_used; /* Number of chunks used by summary */
+
+       sum_bytes = dev->param.chunks_per_block *
+                       sizeof(struct yaffs_summary_tags);
+
+       chunks_used = (sum_bytes + dev->data_bytes_per_chunk - 1)/
+                       dev->data_bytes_per_chunk;
+       dev->chunks_per_summary = dev->param.chunks_per_block - chunks_used;
+       dev->sum_tags = kmalloc(sizeof(struct yaffs_summary_tags) *
+                               dev->chunks_per_summary, GFP_NOFS);
+       dev->gc_sum_tags = kmalloc(sizeof(struct yaffs_summary_tags) *
+                               dev->chunks_per_summary, GFP_NOFS);
+       if(!dev->sum_tags || !dev->gc_sum_tags) {
+               kfree(dev->sum_tags);
+               kfree(dev->gc_sum_tags);
+               return YAFFS_FAIL;
+       }
+
+       yaffs_summary_clear(dev);
+
+       return YAFFS_OK;
+}
+
+void yaffs_summary_deinit(struct yaffs_dev *dev)
+{
+       kfree(dev->sum_tags);
+       dev->sum_tags = NULL;
+       kfree(dev->gc_sum_tags);
+       dev->gc_sum_tags = NULL;
+       dev->chunks_per_summary = 0;
+}
+
+static int yaffs_summary_write(struct yaffs_dev *dev, int blk)
+{
+       struct yaffs_ext_tags tags;
+       u8 *buffer;
+       u8 *sum_buffer = (u8 *)dev->sum_tags;
+       int n_bytes;
+       int chunk_in_nand;
+       int chunk_in_block;
+       int result;
+       int this_tx;
+       struct yaffs_block_info *bi = yaffs_get_block_info(dev, blk);
+
+       buffer = yaffs_get_temp_buffer(dev);
+       n_bytes = sizeof(struct yaffs_summary_tags) * dev->chunks_per_summary;
+       memset(&tags, 0, sizeof(struct yaffs_ext_tags));
+       tags.obj_id = YAFFS_OBJECTID_SUMMARY;
+       tags.chunk_id = 1;
+       chunk_in_block = dev->chunks_per_summary;
+       chunk_in_nand = dev->alloc_block * dev->param.chunks_per_block +
+                                               dev-> chunks_per_summary;
+       do {
+               this_tx = n_bytes;
+               if (this_tx > dev->data_bytes_per_chunk)
+                       this_tx = dev->data_bytes_per_chunk;
+               memcpy(buffer, sum_buffer, this_tx);
+               tags.n_bytes = this_tx;
+               result = yaffs_wr_chunk_tags_nand(dev, chunk_in_nand,
+                                               buffer, &tags);
+
+               if (result != YAFFS_OK)
+                       break;
+               yaffs_set_chunk_bit(dev, blk, chunk_in_block);
+               bi->pages_in_use++;
+               dev->n_free_chunks--;
+
+               n_bytes -= this_tx;
+               sum_buffer += this_tx;
+               chunk_in_nand++;
+               chunk_in_block++;
+               tags.chunk_id++;
+       } while (result == YAFFS_OK && n_bytes > 0);
+       yaffs_release_temp_buffer(dev, buffer);
+
+
+       if (result == YAFFS_OK)
+               bi->has_summary = 1;
+
+
+       return result;
+}
+
+int yaffs_summary_read(struct yaffs_dev *dev,
+                       struct yaffs_summary_tags *st,
+                       int blk)
+{
+       struct yaffs_ext_tags tags;
+       u8 *buffer;
+       u8 *sum_buffer = (u8 *)st;
+       int n_bytes;
+       int chunk_id;
+       int chunk_in_nand;
+       int chunk_in_block;
+       int result;
+       int this_tx;
+       struct yaffs_block_info *bi = yaffs_get_block_info(dev, blk);
+
+       buffer = yaffs_get_temp_buffer(dev);
+       n_bytes = sizeof(struct yaffs_summary_tags) * dev->chunks_per_summary;
+       chunk_in_block = dev->chunks_per_summary;
+       chunk_in_nand = blk * dev->param.chunks_per_block +
+                                                       dev->chunks_per_summary;
+       chunk_id = 1;
+       do {
+               this_tx = n_bytes;
+               if(this_tx > dev->data_bytes_per_chunk)
+                       this_tx = dev->data_bytes_per_chunk;
+               result = yaffs_rd_chunk_tags_nand(dev, chunk_in_nand,
+                                               buffer, &tags);
+
+               if (tags.chunk_id != chunk_id ||
+                       tags.obj_id != YAFFS_OBJECTID_SUMMARY ||
+                       tags.chunk_used == 0 ||
+                       tags.ecc_result > YAFFS_ECC_RESULT_FIXED ||
+                       this_tx != tags.n_bytes)
+                               result = YAFFS_FAIL;
+               if (result != YAFFS_OK)
+                       break;
+
+               if (st == dev->sum_tags) {
+                       /* If we're scanning then update the block info */
+                       yaffs_set_chunk_bit(dev, blk, chunk_in_block);
+                       bi->pages_in_use++;
+               }
+
+               memcpy(sum_buffer, buffer, this_tx);
+               n_bytes -= this_tx;
+               sum_buffer += this_tx;
+               chunk_in_nand++;
+               chunk_in_block++;
+               chunk_id++;
+       } while (result == YAFFS_OK && n_bytes > 0);
+       yaffs_release_temp_buffer(dev, buffer);
+
+       if (st == dev->sum_tags && result == YAFFS_OK)
+               bi->has_summary = 1;
+
+       return result;
+}
+int yaffs_summary_add(struct yaffs_dev *dev,
+                       struct yaffs_ext_tags *tags,
+                       int chunk_in_nand)
+{
+       struct yaffs_packed_tags2_tags_only tags_only;
+       struct yaffs_summary_tags *sum_tags;
+       int block_in_nand = chunk_in_nand / dev->param.chunks_per_block;
+       int chunk_in_block = chunk_in_nand % dev->param.chunks_per_block;
+
+       if(!dev->sum_tags)
+               return YAFFS_OK;
+
+       if(chunk_in_block >= 0 && chunk_in_block < dev->chunks_per_summary) {
+               yaffs_pack_tags2_tags_only(&tags_only, tags);
+               sum_tags = &dev->sum_tags[chunk_in_block];
+               sum_tags->chunk_id = tags_only.chunk_id;
+               sum_tags->n_bytes = tags_only.n_bytes;
+               sum_tags->obj_id = tags_only.obj_id;
+
+               if(chunk_in_block == dev->chunks_per_summary - 1) {
+                       /* Time to write out the summary */
+                       yaffs_summary_write(dev, block_in_nand);
+                       yaffs_summary_clear(dev);
+                       yaffs_skip_rest_of_block(dev);
+               }
+       }
+       return YAFFS_OK;
+}
+
+int yaffs_summary_fetch(struct yaffs_dev *dev,
+                       struct yaffs_ext_tags *tags,
+                       int chunk_in_block)
+{
+       struct yaffs_packed_tags2_tags_only tags_only;
+       struct yaffs_summary_tags *sum_tags;
+       if(chunk_in_block >= 0 && chunk_in_block < dev->chunks_per_summary) {
+               sum_tags = &dev->sum_tags[chunk_in_block];
+               tags_only.chunk_id = sum_tags->chunk_id;
+               tags_only.n_bytes = sum_tags->n_bytes;
+               tags_only.obj_id = sum_tags->obj_id;
+               yaffs_unpack_tags2_tags_only(tags, &tags_only);
+               return YAFFS_OK;
+       }
+       return YAFFS_FAIL;
+}
+
+void yaffs_summary_gc(struct yaffs_dev *dev, int blk)
+{
+       struct yaffs_block_info *bi = yaffs_get_block_info(dev, blk);
+       int i;
+
+       if (!bi->has_summary)
+               return;
+
+       for (i = dev->chunks_per_summary; i < dev->param.chunks_per_block; i++) {
+               if( yaffs_check_chunk_bit(dev, blk, i)) {
+                       yaffs_clear_chunk_bit(dev, blk, i);
+                       bi->pages_in_use--;
+                       dev->n_free_chunks++;
+               }
+       }
+
+}
diff --git a/yaffs_summary.h b/yaffs_summary.h
new file mode 100644 (file)
index 0000000..be141d0
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
+ *
+ * Copyright (C) 2002-2011 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Charles Manning <charles@aleph1.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1 as
+ * published by the Free Software Foundation.
+ *
+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
+ */
+
+#ifndef __YAFFS_SUMMARY_H__
+#define __YAFFS_SUMMARY_H__
+
+#include "yaffs_packedtags2.h"
+
+
+int yaffs_summary_init(struct yaffs_dev *dev);
+void yaffs_summary_deinit(struct yaffs_dev *dev);
+
+int yaffs_summary_add(struct yaffs_dev *dev,
+                       struct yaffs_ext_tags *tags,
+                       int chunk_in_block);
+int yaffs_summary_fetch(struct yaffs_dev *dev,
+                       struct yaffs_ext_tags *tags,
+                       int chunk_in_block);
+int yaffs_summary_read(struct yaffs_dev *dev,
+                       struct yaffs_summary_tags *st,
+                       int blk);
+void yaffs_summary_gc(struct yaffs_dev *dev, int blk);
+
+
+#endif
index 818f72bbc64c17ea8f47cc61133289f3c386dff1..9ac5896da37713d51875c8f9bd23b6d4e434fa88 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -22,16 +22,15 @@ static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk);
 
 /********** Tags ECC calculations  *********/
 
-void yaffs_calc_ecc(const u8 * data, struct yaffs_spare *spare)
+void yaffs_calc_ecc(const u8 *data, struct yaffs_spare *spare)
 {
-       yaffs_ecc_cacl(data, spare->ecc1);
-       yaffs_ecc_cacl(&data[256], spare->ecc2);
+       yaffs_ecc_calc(data, spare->ecc1);
+       yaffs_ecc_calc(&data[256], spare->ecc2);
 }
 
 void yaffs_calc_tags_ecc(struct yaffs_tags *tags)
 {
        /* Calculate an ecc */
-
        unsigned char *b = ((union yaffs_tags_union *)tags)->as_bytes;
        unsigned i, j;
        unsigned ecc = 0;
@@ -46,9 +45,7 @@ void yaffs_calc_tags_ecc(struct yaffs_tags *tags)
                                ecc ^= bit;
                }
        }
-
        tags->ecc = ecc;
-
 }
 
 int yaffs_check_tags_ecc(struct yaffs_tags *tags)
@@ -76,7 +73,6 @@ int yaffs_check_tags_ecc(struct yaffs_tags *tags)
                /* TODO Need to do somethiong here */
                return -1;      /* unrecovered error */
        }
-
        return 0;
 }
 
@@ -124,11 +120,11 @@ static void yaffs_get_tags_from_spare(struct yaffs_dev *dev,
 
 static void yaffs_spare_init(struct yaffs_spare *spare)
 {
-       memset(spare, 0xFF, sizeof(struct yaffs_spare));
+       memset(spare, 0xff, sizeof(struct yaffs_spare));
 }
 
 static int yaffs_wr_nand(struct yaffs_dev *dev,
-                        int nand_chunk, const u8 * data,
+                        int nand_chunk, const u8 *data,
                         struct yaffs_spare *spare)
 {
        if (nand_chunk < dev->param.start_block * dev->param.chunks_per_block) {
@@ -143,7 +139,7 @@ static int yaffs_wr_nand(struct yaffs_dev *dev,
 
 static int yaffs_rd_chunk_nand(struct yaffs_dev *dev,
                               int nand_chunk,
-                              u8 * data,
+                              u8 *data,
                               struct yaffs_spare *spare,
                               enum yaffs_ecc_result *ecc_result,
                               int correct_errors)
@@ -166,10 +162,10 @@ static int yaffs_rd_chunk_nand(struct yaffs_dev *dev,
                        int ecc_result1, ecc_result2;
                        u8 calc_ecc[3];
 
-                       yaffs_ecc_cacl(data, calc_ecc);
+                       yaffs_ecc_calc(data, calc_ecc);
                        ecc_result1 =
                            yaffs_ecc_correct(data, spare->ecc1, calc_ecc);
-                       yaffs_ecc_cacl(&data[256], calc_ecc);
+                       yaffs_ecc_calc(&data[256], calc_ecc);
                        ecc_result2 =
                            yaffs_ecc_correct(&data[256], spare->ecc2,
                                              calc_ecc);
@@ -268,9 +264,8 @@ static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk)
        int flash_block = nand_chunk / dev->param.chunks_per_block;
 
        /* Mark the block for retirement */
-       yaffs_get_block_info(dev,
-                            flash_block + dev->block_offset)->needs_retiring =
-           1;
+       yaffs_get_block_info(dev, flash_block + dev->block_offset)->
+               needs_retiring = 1;
        yaffs_trace(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,
                "**>>Block %d marked for retirement",
                flash_block);
@@ -284,20 +279,20 @@ static void yaffs_handle_rd_data_error(struct yaffs_dev *dev, int nand_chunk)
 
 int yaffs_tags_compat_wr(struct yaffs_dev *dev,
                         int nand_chunk,
-                        const u8 * data, const struct yaffs_ext_tags *ext_tags)
+                        const u8 *data, const struct yaffs_ext_tags *ext_tags)
 {
        struct yaffs_spare spare;
        struct yaffs_tags tags;
 
        yaffs_spare_init(&spare);
-        
+
        if (ext_tags->is_deleted)
                spare.page_status = 0;
        else {
                tags.obj_id = ext_tags->obj_id;
                tags.chunk_id = ext_tags->chunk_id;
 
-               tags.n_bytes_lsb = ext_tags->n_bytes & 0x3ff;
+               tags.n_bytes_lsb = ext_tags->n_bytes & (1024 - 1);
 
                if (dev->data_bytes_per_chunk >= 1024)
                        tags.n_bytes_msb = (ext_tags->n_bytes >> 10) & 3;
@@ -310,69 +305,61 @@ int yaffs_tags_compat_wr(struct yaffs_dev *dev,
                        yaffs_calc_ecc(data, &spare);
 
                yaffs_load_tags_to_spare(&spare, &tags);
-
        }
-
        return yaffs_wr_nand(dev, nand_chunk, data, &spare);
 }
 
 int yaffs_tags_compat_rd(struct yaffs_dev *dev,
                         int nand_chunk,
-                        u8 * data, struct yaffs_ext_tags *ext_tags)
+                        u8 *data, struct yaffs_ext_tags *ext_tags)
 {
-
        struct yaffs_spare spare;
        struct yaffs_tags tags;
        enum yaffs_ecc_result ecc_result = YAFFS_ECC_RESULT_UNKNOWN;
-
        static struct yaffs_spare spare_ff;
        static int init;
+       int deleted;
 
        if (!init) {
-               memset(&spare_ff, 0xFF, sizeof(spare_ff));
+               memset(&spare_ff, 0xff, sizeof(spare_ff));
                init = 1;
        }
 
-       if (yaffs_rd_chunk_nand(dev, nand_chunk, data, &spare, &ecc_result, 1)) {
-               /* ext_tags may be NULL */
-               if (ext_tags) {
-
-                       int deleted =
-                           (hweight8(spare.page_status) < 7) ? 1 : 0;
+       if (!yaffs_rd_chunk_nand(dev, nand_chunk,
+                                       data, &spare, &ecc_result, 1))
+               return YAFFS_FAIL;
 
-                       ext_tags->is_deleted = deleted;
-                       ext_tags->ecc_result = ecc_result;
-                       ext_tags->block_bad = 0;        /* We're reading it */
-                       /* therefore it is not a bad block */
-                       ext_tags->chunk_used =
-                           (memcmp(&spare_ff, &spare, sizeof(spare_ff)) !=
-                            0) ? 1 : 0;
+       /* ext_tags may be NULL */
+       if (!ext_tags)
+               return YAFFS_OK;
 
-                       if (ext_tags->chunk_used) {
-                               yaffs_get_tags_from_spare(dev, &spare, &tags);
+       deleted = (hweight8(spare.page_status) < 7) ? 1 : 0;
 
-                               ext_tags->obj_id = tags.obj_id;
-                               ext_tags->chunk_id = tags.chunk_id;
-                               ext_tags->n_bytes = tags.n_bytes_lsb;
+       ext_tags->is_deleted = deleted;
+       ext_tags->ecc_result = ecc_result;
+       ext_tags->block_bad = 0;        /* We're reading it */
+       /* therefore it is not a bad block */
+       ext_tags->chunk_used =
+               memcmp(&spare_ff, &spare, sizeof(spare_ff)) ? 1 : 0;
 
-                               if (dev->data_bytes_per_chunk >= 1024)
-                                       ext_tags->n_bytes |=
-                                           (((unsigned)tags.
-                                             n_bytes_msb) << 10);
+       if (ext_tags->chunk_used) {
+               yaffs_get_tags_from_spare(dev, &spare, &tags);
+               ext_tags->obj_id = tags.obj_id;
+               ext_tags->chunk_id = tags.chunk_id;
+               ext_tags->n_bytes = tags.n_bytes_lsb;
 
-                               ext_tags->serial_number = tags.serial_number;
-                       }
-               }
+               if (dev->data_bytes_per_chunk >= 1024)
+                       ext_tags->n_bytes |=
+                               (((unsigned)tags.n_bytes_msb) << 10);
 
-               return YAFFS_OK;
-       } else {
-               return YAFFS_FAIL;
+               ext_tags->serial_number = tags.serial_number;
        }
+
+       return YAFFS_OK;
 }
 
 int yaffs_tags_compat_mark_bad(struct yaffs_dev *dev, int flash_block)
 {
-
        struct yaffs_spare spare;
 
        memset(&spare, 0xff, sizeof(struct yaffs_spare));
@@ -385,22 +372,20 @@ int yaffs_tags_compat_mark_bad(struct yaffs_dev *dev, int flash_block)
                      NULL, &spare);
 
        return YAFFS_OK;
-
 }
 
 int yaffs_tags_compat_query_block(struct yaffs_dev *dev,
                                  int block_no,
                                  enum yaffs_block_state *state,
-                                 u32 * seq_number)
+                                 u32 *seq_number)
 {
-
        struct yaffs_spare spare0, spare1;
        static struct yaffs_spare spare_ff;
        static int init;
        enum yaffs_ecc_result dummy;
 
        if (!init) {
-               memset(&spare_ff, 0xFF, sizeof(spare_ff));
+               memset(&spare_ff, 0xff, sizeof(spare_ff));
                init = 1;
        }
 
@@ -416,7 +401,7 @@ int yaffs_tags_compat_query_block(struct yaffs_dev *dev,
        else if (memcmp(&spare_ff, &spare0, sizeof(spare_ff)) == 0)
                *state = YAFFS_BLOCK_STATE_EMPTY;
        else
-               *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
+               *state = YAFFS_BLOCK_STATE_NEEDS_SCAN;
 
        return YAFFS_OK;
 }
index 8cd35dcd3cab375e43d6094d80bf3d1f2e611531..b3c665577252bbbc059295aa5ee10e45f16fbeb8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 #include "yaffs_guts.h"
 int yaffs_tags_compat_wr(struct yaffs_dev *dev,
                         int nand_chunk,
-                        const u8 * data, const struct yaffs_ext_tags *tags);
+                        const u8 *data, const struct yaffs_ext_tags *tags);
 int yaffs_tags_compat_rd(struct yaffs_dev *dev,
                         int nand_chunk,
-                        u8 * data, struct yaffs_ext_tags *tags);
+                        u8 *data, struct yaffs_ext_tags *tags);
 int yaffs_tags_compat_mark_bad(struct yaffs_dev *dev, int block_no);
 int yaffs_tags_compat_query_block(struct yaffs_dev *dev,
                                  int block_no,
                                  enum yaffs_block_state *state,
-                                 u32 * seq_number);
+                                 u32 *seq_number);
 
 void yaffs_calc_tags_ecc(struct yaffs_tags *tags);
 int yaffs_check_tags_ecc(struct yaffs_tags *tags);
diff --git a/yaffs_tagsvalidity.c b/yaffs_tagsvalidity.c
deleted file mode 100644 (file)
index 4358d79..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
- *
- * Copyright (C) 2002-2010 Aleph One Ltd.
- *   for Toby Churchill Ltd and Brightstar Engineering
- *
- * Created by Charles Manning <charles@aleph1.co.uk>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include "yaffs_tagsvalidity.h"
-
-void yaffs_init_tags(struct yaffs_ext_tags *tags)
-{
-       memset(tags, 0, sizeof(struct yaffs_ext_tags));
-       tags->validity0 = 0xAAAAAAAA;
-       tags->validity1 = 0x55555555;
-}
-
-int yaffs_validate_tags(struct yaffs_ext_tags *tags)
-{
-       return (tags->validity0 == 0xAAAAAAAA && tags->validity1 == 0x55555555);
-
-}
index 6273dbf9f63f150aea213c5307239b8da007a56b..fd26054d3912be85c704ca877540611d0ae372a3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -43,7 +43,7 @@ extern unsigned int yaffs_wr_attempts;
 #define YAFFS_TRACE_VERIFY             0x00010000
 #define YAFFS_TRACE_VERIFY_NAND                0x00020000
 #define YAFFS_TRACE_VERIFY_FULL                0x00040000
-#define YAFFS_TRACE_VERIFY_ALL         0x000F0000
+#define YAFFS_TRACE_VERIFY_ALL         0x000f0000
 
 #define YAFFS_TRACE_SYNC               0x00100000
 #define YAFFS_TRACE_BACKGROUND         0x00200000
@@ -52,6 +52,6 @@ extern unsigned int yaffs_wr_attempts;
 
 #define YAFFS_TRACE_ERROR              0x40000000
 #define YAFFS_TRACE_BUG                        0x80000000
-#define YAFFS_TRACE_ALWAYS             0xF0000000
+#define YAFFS_TRACE_ALWAYS             0xf0000000
 
 #endif
index 55884b97484726beb2d3060ee74e5000d1e289a1..b3e540dd52a3656c223587431bda39b76b56e502 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -36,9 +36,9 @@ static int yaffs_skip_nand_verification(struct yaffs_dev *dev)
        return !(yaffs_trace_mask & (YAFFS_TRACE_VERIFY_NAND));
 }
 
-static const char *block_state_name[] = {
+static const char * const block_state_name[] = {
        "Unknown",
-       "Needs scanning",
+       "Needs scan",
        "Scanning",
        "Empty",
        "Allocating",
@@ -66,7 +66,7 @@ void yaffs_verify_blk(struct yaffs_dev *dev, struct yaffs_block_info *bi, int n)
        switch (bi->block_state) {
        case YAFFS_BLOCK_STATE_UNKNOWN:
        case YAFFS_BLOCK_STATE_SCANNING:
-       case YAFFS_BLOCK_STATE_NEEDS_SCANNING:
+       case YAFFS_BLOCK_STATE_NEEDS_SCAN:
                yaffs_trace(YAFFS_TRACE_VERIFY,
                        "Block %d has bad run-state %s",
                        n, block_state_name[bi->block_state]);
@@ -76,11 +76,11 @@ void yaffs_verify_blk(struct yaffs_dev *dev, struct yaffs_block_info *bi, int n)
 
        actually_used = bi->pages_in_use - bi->soft_del_pages;
 
-       if (bi->pages_in_use < 0
-           || bi->pages_in_use > dev->param.chunks_per_block
-           || bi->soft_del_pages < 0
-           || bi->soft_del_pages > dev->param.chunks_per_block
-           || actually_used < 0 || actually_used > dev->param.chunks_per_block)
+       if (bi->pages_in_use < 0 ||
+           bi->pages_in_use > dev->param.chunks_per_block ||
+           bi->soft_del_pages < 0 ||
+           bi->soft_del_pages > dev->param.chunks_per_block ||
+           actually_used < 0 || actually_used > dev->param.chunks_per_block)
                yaffs_trace(YAFFS_TRACE_VERIFY,
                        "Block %d has illegal values pages_in_used %d soft_del_pages %d",
                        n, bi->pages_in_use, bi->soft_del_pages);
@@ -91,7 +91,6 @@ void yaffs_verify_blk(struct yaffs_dev *dev, struct yaffs_block_info *bi, int n)
                yaffs_trace(YAFFS_TRACE_VERIFY,
                        "Block %d has inconsistent values pages_in_use %d counted chunk bits %d",
                        n, bi->pages_in_use, in_use);
-
 }
 
 void yaffs_verify_collected_blk(struct yaffs_dev *dev,
@@ -215,9 +214,9 @@ void yaffs_verify_oh(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh,
                        "Obj %d header name is NULL",
                        obj->obj_id);
 
-       if (tags->obj_id > 1 && ((u8) (oh->name[0])) == 0xff)   /* Trashed name */
+       if (tags->obj_id > 1 && ((u8) (oh->name[0])) == 0xff)   /* Junk name */
                yaffs_trace(YAFFS_TRACE_VERIFY,
-                       "Obj %d header name is 0xFF",
+                       "Obj %d header name is 0xff",
                        obj->obj_id);
 }
 
@@ -226,6 +225,7 @@ void yaffs_verify_file(struct yaffs_obj *obj)
        int required_depth;
        int actual_depth;
        u32 last_chunk;
+       u32 the_chunk;
        u32 x;
        u32 i;
        struct yaffs_dev *dev;
@@ -265,17 +265,18 @@ void yaffs_verify_file(struct yaffs_obj *obj)
        for (i = 1; i <= last_chunk; i++) {
                tn = yaffs_find_tnode_0(dev, &obj->variant.file_variant, i);
 
-               if (tn) {
-                       u32 the_chunk = yaffs_get_group_base(dev, tn, i);
-                       if (the_chunk > 0) {
-                               yaffs_rd_chunk_tags_nand(dev, the_chunk, NULL,
-                                                        &tags);
-                               if (tags.obj_id != obj_id || tags.chunk_id != i)
+               if (!tn)
+                       continue;
+
+               the_chunk = yaffs_get_group_base(dev, tn, i);
+               if (the_chunk > 0) {
+                       yaffs_rd_chunk_tags_nand(dev, the_chunk, NULL,
+                                                &tags);
+                       if (tags.obj_id != obj_id || tags.chunk_id != i)
                                yaffs_trace(YAFFS_TRACE_VERIFY,
                                        "Object %d chunk_id %d NAND mismatch chunk %d tags (%d:%d)",
-                                        obj_id, i, the_chunk,
-                                        tags.obj_id, tags.chunk_id);
-                       }
+                                       obj_id, i, the_chunk,
+                                       tags.obj_id, tags.chunk_id);
                }
        }
 }
@@ -305,10 +306,8 @@ void yaffs_verify_special(struct yaffs_obj *obj)
 void yaffs_verify_obj(struct yaffs_obj *obj)
 {
        struct yaffs_dev *dev;
-
        u32 chunk_min;
        u32 chunk_max;
-
        u32 chunk_id_ok;
        u32 chunk_in_range;
        u32 chunk_wrongly_deleted;
@@ -350,7 +349,7 @@ void yaffs_verify_obj(struct yaffs_obj *obj)
        if (chunk_valid && !yaffs_skip_nand_verification(dev)) {
                struct yaffs_ext_tags tags;
                struct yaffs_obj_hdr *oh;
-               u8 *buffer = yaffs_get_temp_buffer(dev, __LINE__);
+               u8 *buffer = yaffs_get_temp_buffer(dev);
 
                oh = (struct yaffs_obj_hdr *)buffer;
 
@@ -358,7 +357,7 @@ void yaffs_verify_obj(struct yaffs_obj *obj)
 
                yaffs_verify_oh(obj, oh, &tags, 1);
 
-               yaffs_release_temp_buffer(dev, buffer, __LINE__);
+               yaffs_release_temp_buffer(dev, buffer);
        }
 
        /* Verify it has a parent */
@@ -369,8 +368,8 @@ void yaffs_verify_obj(struct yaffs_obj *obj)
        }
 
        /* Verify parent is a directory */
-       if (obj->parent
-           && obj->parent->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
+       if (obj->parent &&
+           obj->parent->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
                yaffs_trace(YAFFS_TRACE_VERIFY,
                        "Obj %d's parent is not a directory (type %d)",
                        obj->obj_id, obj->parent->variant_type);
@@ -414,7 +413,7 @@ void yaffs_verify_objects(struct yaffs_dev *dev)
 
        for (i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) {
                list_for_each(lh, &dev->obj_bucket[i].list) {
-                       obj = list_entry(lh, struct yaffs_obj, hash_link);      
+                       obj = list_entry(lh, struct yaffs_obj, hash_link);
                        yaffs_verify_obj(obj);
                }
        }
@@ -424,12 +423,11 @@ void yaffs_verify_obj_in_dir(struct yaffs_obj *obj)
 {
        struct list_head *lh;
        struct yaffs_obj *list_obj;
-
        int count = 0;
 
        if (!obj) {
                yaffs_trace(YAFFS_TRACE_ALWAYS, "No object to verify");
-               YBUG();
+               BUG();
                return;
        }
 
@@ -437,14 +435,14 @@ void yaffs_verify_obj_in_dir(struct yaffs_obj *obj)
                return;
 
        if (!obj->parent) {
-               yaffs_trace(YAFFS_TRACE_ALWAYS, "Object does not have parent" );
-               YBUG();
+               yaffs_trace(YAFFS_TRACE_ALWAYS, "Object does not have parent");
+               BUG();
                return;
        }
 
        if (obj->parent->variant_type != YAFFS_OBJECT_TYPE_DIRECTORY) {
                yaffs_trace(YAFFS_TRACE_ALWAYS, "Parent is not directory");
-               YBUG();
+               BUG();
        }
 
        /* Iterate through the objects in each hash entry */
@@ -460,7 +458,7 @@ void yaffs_verify_obj_in_dir(struct yaffs_obj *obj)
                yaffs_trace(YAFFS_TRACE_ALWAYS,
                        "Object in directory %d times",
                        count);
-               YBUG();
+               BUG();
        }
 }
 
@@ -470,7 +468,7 @@ void yaffs_verify_dir(struct yaffs_obj *directory)
        struct yaffs_obj *list_obj;
 
        if (!directory) {
-               YBUG();
+               BUG();
                return;
        }
 
@@ -481,7 +479,7 @@ void yaffs_verify_dir(struct yaffs_obj *directory)
                yaffs_trace(YAFFS_TRACE_ALWAYS,
                        "Directory has wrong type: %d",
                        directory->variant_type);
-               YBUG();
+               BUG();
        }
 
        /* Iterate through the objects in each hash entry */
@@ -492,7 +490,7 @@ void yaffs_verify_dir(struct yaffs_obj *directory)
                        yaffs_trace(YAFFS_TRACE_ALWAYS,
                                "Object in directory list has wrong parent %p",
                                list_obj->parent);
-                       YBUG();
+                       BUG();
                }
                yaffs_verify_obj_in_dir(list_obj);
        }
@@ -514,7 +512,7 @@ void yaffs_verify_free_chunks(struct yaffs_dev *dev)
 
        if (difference) {
                yaffs_trace(YAFFS_TRACE_ALWAYS,
-                       "Freechunks verification failure %d %d %d",
+                       "Freechunks verification failure %d %d %d",
                        dev->n_free_chunks, counted, difference);
                yaffs_free_verification_failures++;
        }
@@ -525,4 +523,3 @@ int yaffs_verify_file_sane(struct yaffs_obj *in)
        in = in;
        return YAFFS_OK;
 }
-
index cc6f88999305dce2075eaac48f44de9ff44752f9..4f4af8d29aa4c42fc7400d2f10d8ac7431694f6e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 78e2f9f6ac837ce52421b280ee1f713f27ec7cb4..b8e51243051a27fc7a17c3b79dbbfd72555699b1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10))
 #define YAFFS_COMPILE_BACKGROUND
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6, 23))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23))
 #define YAFFS_COMPILE_FREEZER
 #endif
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28))
 #define YAFFS_COMPILE_EXPORTFS
 #endif
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35))
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35))
 #define YAFFS_USE_SETATTR_COPY
 #define YAFFS_USE_TRUNCATE_SETSIZE
 #endif
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35))
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35))
 #define YAFFS_HAS_EVICT_INODE
 #endif
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13))
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 13))
 #define YAFFS_NEW_FOLLOW_LINK 1
 #else
 #define YAFFS_NEW_FOLLOW_LINK 0
@@ -72,7 +72,9 @@
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39))
 #include <linux/smp_lock.h>
+#endif
 #include <linux/pagemap.h>
 #include <linux/mtd/mtd.h>
 #include <linux/interrupt.h>
 #define YPROC_ROOT  NULL
 #endif
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26))
 #define Y_INIT_TIMER(a)        init_timer(a)
 #else
 #define Y_INIT_TIMER(a)        init_timer_on_stack(a)
@@ -176,7 +178,7 @@ unsigned int yaffs_wr_attempts = YAFFS_WR_ATTEMPTS;
 unsigned int yaffs_auto_checkpoint = 1;
 unsigned int yaffs_gc_control = 1;
 unsigned int yaffs_bg_enable = 1;
-
+unsigned int yaffs_auto_select = 1;
 /* Module Parameters */
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
 module_param(yaffs_trace_mask, uint, 0644);
@@ -210,7 +212,8 @@ static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino);
 #define yaffs_inode_to_obj_lv(iptr) ((iptr)->u.generic_ip)
 #endif
 
-#define yaffs_inode_to_obj(iptr) ((struct yaffs_obj *)(yaffs_inode_to_obj_lv(iptr)))
+#define yaffs_inode_to_obj(iptr) \
+       ((struct yaffs_obj *)(yaffs_inode_to_obj_lv(iptr)))
 #define yaffs_dentry_to_obj(dptr) yaffs_inode_to_obj((dptr)->d_inode)
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
@@ -221,12 +224,12 @@ static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino);
 
 #define update_dir_time(dir) do {\
                        (dir)->i_ctime = (dir)->i_mtime = CURRENT_TIME; \
-               } while(0)
+               } while (0)
 
 static void yaffs_put_super(struct super_block *sb);
 
 static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
-                               loff_t * pos);
+                               loff_t *pos);
 static ssize_t yaffs_hold_space(struct file *f);
 static void yaffs_release_space(struct file *f);
 
@@ -236,7 +239,9 @@ static int yaffs_file_flush(struct file *file, fl_owner_t id);
 static int yaffs_file_flush(struct file *file);
 #endif
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+static int yaffs_sync_object(struct file *file, loff_t start, loff_t end, int datasync);
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))
 static int yaffs_sync_object(struct file *file, int datasync);
 #else
 static int yaffs_sync_object(struct file *file, struct dentry *dentry,
@@ -306,14 +311,12 @@ static int yaffs_writepage(struct page *page, struct writeback_control *wbc);
 static int yaffs_writepage(struct page *page);
 #endif
 
-#ifdef CONFIG_YAFFS_XATTR
 static int yaffs_setxattr(struct dentry *dentry, const char *name,
                   const void *value, size_t size, int flags);
-static ssize_t yaffs_getxattr(struct dentry *dentry, const char *name, void *buff,
-                      size_t size);
+static ssize_t yaffs_getxattr(struct dentry *dentry, const char *name,
+                               void *buff, size_t size);
 static int yaffs_removexattr(struct dentry *dentry, const char *name);
 static ssize_t yaffs_listxattr(struct dentry *dentry, char *buff, size_t size);
-#endif
 
 #if (YAFFS_USE_WRITE_BEGIN_END != 0)
 static int yaffs_write_begin(struct file *filp, struct address_space *mapping,
@@ -396,7 +399,7 @@ static const struct file_operations yaffs_file_operations = {
 };
 #endif
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25))
 static void zero_user_segment(struct page *page, unsigned start, unsigned end)
 {
        void *kaddr = kmap_atomic(page, KM_USER0);
@@ -408,12 +411,10 @@ static void zero_user_segment(struct page *page, unsigned start, unsigned end)
 
 static const struct inode_operations yaffs_file_inode_operations = {
        .setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
        .setxattr = yaffs_setxattr,
        .getxattr = yaffs_getxattr,
        .listxattr = yaffs_listxattr,
        .removexattr = yaffs_removexattr,
-#endif
 };
 
 static const struct inode_operations yaffs_symlink_inode_operations = {
@@ -423,12 +424,10 @@ static const struct inode_operations yaffs_symlink_inode_operations = {
        .put_link = yaffs_put_link,
 #endif
        .setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
        .setxattr = yaffs_setxattr,
        .getxattr = yaffs_getxattr,
        .listxattr = yaffs_listxattr,
        .removexattr = yaffs_removexattr,
-#endif
 };
 
 static const struct inode_operations yaffs_dir_inode_operations = {
@@ -442,12 +441,10 @@ static const struct inode_operations yaffs_dir_inode_operations = {
        .mknod = yaffs_mknod,
        .rename = yaffs_rename,
        .setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
        .setxattr = yaffs_setxattr,
        .getxattr = yaffs_getxattr,
        .listxattr = yaffs_listxattr,
        .removexattr = yaffs_removexattr,
-#endif
 };
 
 static const struct file_operations yaffs_dir_operations = {
@@ -479,7 +476,7 @@ static const struct super_operations yaffs_super_ops = {
 
 static int yaffs_vfs_setattr(struct inode *inode, struct iattr *attr)
 {
-#ifdef  YAFFS_USE_SETATTR_COPY
+#ifdef YAFFS_USE_SETATTR_COPY
        setattr_copy(inode, attr);
        return 0;
 #else
@@ -490,7 +487,7 @@ static int yaffs_vfs_setattr(struct inode *inode, struct iattr *attr)
 
 static int yaffs_vfs_setsize(struct inode *inode, loff_t newsize)
 {
-#ifdef  YAFFS_USE_TRUNCATE_SETSIZE
+#ifdef YAFFS_USE_TRUNCATE_SETSIZE
        truncate_setsize(inode, newsize);
        return 0;
 #else
@@ -791,7 +788,7 @@ static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry)
        if (current != yaffs_dev_to_lc(dev)->readdir_process)
                yaffs_gross_lock(dev);
 
-       yaffs_trace(YAFFS_TRACE_OS,"yaffs_lookup for %d:%s",
+       yaffs_trace(YAFFS_TRACE_OS, "yaffs_lookup for %d:%s",
                yaffs_inode_to_obj(dir)->obj_id, dentry->d_name.name);
 
        obj = yaffs_find_by_name(yaffs_inode_to_obj(dir), dentry->d_name.name);
@@ -1833,7 +1830,9 @@ static int yaffs_symlink(struct inode *dir, struct dentry *dentry,
        return -ENOMEM;
 }
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+static int yaffs_sync_object(struct file *file, loff_t start, loff_t end, int datasync)
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 34))
 static int yaffs_sync_object(struct file *file, int datasync)
 #else
 static int yaffs_sync_object(struct file *file, struct dentry *dentry,
@@ -1961,7 +1960,6 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
        return error;
 }
 
-#ifdef CONFIG_YAFFS_XATTR
 static int yaffs_setxattr(struct dentry *dentry, const char *name,
                   const void *value, size_t size, int flags)
 {
@@ -2064,7 +2062,6 @@ static ssize_t yaffs_listxattr(struct dentry * dentry, char *buff, size_t size)
        return error;
 }
 
-#endif
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
 static int yaffs_statfs(struct dentry *dentry, struct kstatfs *buf)
@@ -2226,7 +2223,7 @@ static int yaffs_do_sync_fs(struct super_block *sb, int request_checkpoint)
  * yaffs_bg_start() launches the background thread.
  * yaffs_bg_stop() cleans up the background thread.
  *
- * NB: 
+ * NB:
  * The thread should only run after the yaffs is initialised
  * The thread should be stopped before yaffs is unmounted.
  * The thread should not do any writing while the fs is in read only.
@@ -2533,6 +2530,7 @@ struct yaffs_options {
        int lazy_loading_overridden;
        int empty_lost_and_found;
        int empty_lost_and_found_overridden;
+       int disable_summary;
 };
 
 #define MAX_OPT_LEN 30
@@ -2574,6 +2572,8 @@ static int yaffs_parse_options(struct yaffs_options *options,
                } else if (!strcmp(cur_opt, "lazy-loading-on")) {
                        options->lazy_loading_enabled = 1;
                        options->lazy_loading_overridden = 1;
+               } else if (!strcmp(cur_opt, "disable-summary")) {
+                       options->disable_summary = 1;
                } else if (!strcmp(cur_opt, "empty-lost-and-found-off")) {
                        options->empty_lost_and_found = 0;
                        options->empty_lost_and_found_overridden = 1;
@@ -2708,9 +2708,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
        yaffs_trace(YAFFS_TRACE_OS, " size %lld", mtd->size);
 #endif
 
-#ifdef CONFIG_YAFFS_AUTO_YAFFS2
-
-       if (yaffs_version == 1 && WRITE_SIZE(mtd) >= 2048) {
+       if (yaffs_auto_select && yaffs_version == 1 && WRITE_SIZE(mtd) >= 2048) {
                yaffs_trace(YAFFS_TRACE_ALWAYS, "auto selecting yaffs2");
                yaffs_version = 2;
        }
@@ -2721,7 +2719,6 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
                yaffs_trace(YAFFS_TRACE_ALWAYS, "auto selecting yaffs1");
                yaffs_version = 1;
        }
-#endif
 
        if (yaffs_version == 2) {
                /* Check for version 2 style functions */
@@ -2838,40 +2835,18 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
        param->n_caches = (options.no_cache) ? 0 : 10;
        param->inband_tags = options.inband_tags;
 
-#ifdef CONFIG_YAFFS_DISABLE_LAZY_LOAD
-       param->disable_lazy_load = 1;
-#endif
-#ifdef CONFIG_YAFFS_XATTR
        param->enable_xattr = 1;
-#endif
        if (options.lazy_loading_overridden)
                param->disable_lazy_load = !options.lazy_loading_enabled;
 
-#ifdef CONFIG_YAFFS_DISABLE_TAGS_ECC
-       param->no_tags_ecc = 1;
-#endif
-
-#ifdef CONFIG_YAFFS_DISABLE_BACKGROUND
-#else
        param->defered_dir_update = 1;
-#endif
 
        if (options.tags_ecc_overridden)
                param->no_tags_ecc = !options.tags_ecc_on;
 
-#ifdef CONFIG_YAFFS_EMPTY_LOST_AND_FOUND
        param->empty_lost_n_found = 1;
-#endif
-
-#ifdef CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING
-       param->refresh_period = 0;
-#else
        param->refresh_period = 500;
-#endif
-
-#ifdef CONFIG_YAFFS__ALWAYS_CHECK_CHUNK_ERASED
-       param->always_check_erased = 1;
-#endif
+       param->disable_summary = options.disable_summary;
 
        if (options.empty_lost_and_found_overridden)
                param->empty_lost_n_found = options.empty_lost_and_found;
@@ -2882,7 +2857,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
                param->read_chunk_tags_fn = nandmtd2_read_chunk_tags;
                param->bad_block_fn = nandmtd2_mark_block_bad;
                param->query_block_fn = nandmtd2_query_block;
-               yaffs_dev_to_lc(dev)->spare_buffer = 
+               yaffs_dev_to_lc(dev)->spare_buffer =
                                kmalloc(mtd->oobsize, GFP_NOFS);
                param->is_yaffs2 = 1;
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
@@ -2920,13 +2895,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
 
        yaffs_dev_to_lc(dev)->super = sb;
 
-#ifndef CONFIG_YAFFS_DOES_ECC
        param->use_nand_ecc = 1;
-#endif
-
-#ifdef CONFIG_YAFFS_DISABLE_WIDE_TNODES
-       param->wide_tnodes_disabled = 1;
-#endif
 
        param->skip_checkpt_rd = options.skip_checkpoint_read;
        param->skip_checkpt_wr = options.skip_checkpoint_write;
@@ -2960,7 +2929,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
 
        err = yaffs_guts_initialise(dev);
 
-       yaffs_trace(YAFFS_TRACE_OS, 
+       yaffs_trace(YAFFS_TRACE_OS,
                "yaffs_read_super: guts initialised %s",
                (err == YAFFS_OK) ? "OK" : "FAILED");
 
@@ -3010,7 +2979,13 @@ static int yaffs_internal_read_super_mtd(struct super_block *sb, void *data,
        return yaffs_internal_read_super(1, sb, data, silent) ? 0 : -EINVAL;
 }
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+static struct dentry *yaffs_mount(struct file_system_type *fs_type, int flags,
+        const char *dev_name, void *data)
+{
+    return mount_bdev(fs_type, flags, dev_name, data, yaffs_internal_read_super_mtd);
+}
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
 static int yaffs_read_super(struct file_system_type *fs,
                            int flags, const char *dev_name,
                            void *data, struct vfsmount *mnt)
@@ -3033,8 +3008,12 @@ static struct super_block *yaffs_read_super(struct file_system_type *fs,
 static struct file_system_type yaffs_fs_type = {
        .owner = THIS_MODULE,
        .name = "yaffs",
-       .get_sb = yaffs_read_super,
-       .kill_sb = kill_block_super,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+        .mount = yaffs_mount,
+#else
+        .get_sb = yaffs_read_super,
+#endif
+       .kill_sb = kill_block_super,
        .fs_flags = FS_REQUIRES_DEV,
 };
 #else
@@ -3048,7 +3027,6 @@ static DECLARE_FSTYPE(yaffs_fs_type, "yaffs", yaffs_read_super,
                      FS_REQUIRES_DEV);
 #endif
 
-#ifdef CONFIG_YAFFS_YAFFS2
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0))
 static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data,
@@ -3057,7 +3035,13 @@ static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data,
        return yaffs_internal_read_super(2, sb, data, silent) ? 0 : -EINVAL;
 }
 
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+static struct dentry *yaffs2_mount(struct file_system_type *fs_type, int flags,
+        const char *dev_name, void *data)
+{
+        return mount_bdev(fs_type, flags, dev_name, data, yaffs2_internal_read_super_mtd);
+}
+#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 17))
 static int yaffs2_read_super(struct file_system_type *fs,
                             int flags, const char *dev_name, void *data,
                             struct vfsmount *mnt)
@@ -3079,8 +3063,12 @@ static struct super_block *yaffs2_read_super(struct file_system_type *fs,
 static struct file_system_type yaffs2_fs_type = {
        .owner = THIS_MODULE,
        .name = "yaffs2",
-       .get_sb = yaffs2_read_super,
-       .kill_sb = kill_block_super,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
+        .mount = yaffs2_mount,
+#else
+        .get_sb = yaffs2_read_super,
+#endif
+       .kill_sb = kill_block_super,
        .fs_flags = FS_REQUIRES_DEV,
 };
 #else
@@ -3094,7 +3082,6 @@ static DECLARE_FSTYPE(yaffs2_fs_type, "yaffs2", yaffs2_read_super,
                      FS_REQUIRES_DEV);
 #endif
 
-#endif /* CONFIG_YAFFS_YAFFS2 */
 
 static struct proc_dir_entry *my_proc_entry;
 
@@ -3151,8 +3138,8 @@ static char *yaffs_dump_dev_part1(char *buf, struct yaffs_dev *dev)
                                dev->oldest_dirty_gc_count);
        buf += sprintf(buf, "n_gc_blocks.......... %u\n", dev->n_gc_blocks);
        buf += sprintf(buf, "bg_gcs............... %u\n", dev->bg_gcs);
-       buf += sprintf(buf, "n_retired_writes..... %u\n",
-                               dev->n_retired_writes);
+       buf += sprintf(buf, "n_retried_writes..... %u\n",
+                               dev->n_retried_writes);
        buf += sprintf(buf, "n_retired_blocks..... %u\n",
                                dev->n_retired_blocks);
        buf += sprintf(buf, "n_ecc_fixed.......... %u\n", dev->n_ecc_fixed);
@@ -3167,6 +3154,8 @@ static char *yaffs_dump_dev_part1(char *buf, struct yaffs_dev *dev)
                                dev->n_unlinked_files);
        buf += sprintf(buf, "refresh_count........ %u\n", dev->refresh_count);
        buf += sprintf(buf, "n_bg_deletions....... %u\n", dev->n_bg_deletions);
+       buf += sprintf(buf, "tags_used............ %u\n", dev->tags_used);
+       buf += sprintf(buf, "summary_used......... %u\n", dev->summary_used);
 
        return buf;
 }
@@ -3393,12 +3382,6 @@ static int __init init_yaffs_fs(void)
        yaffs_trace(YAFFS_TRACE_ALWAYS,
                "yaffs built " __DATE__ " " __TIME__ " Installing.");
 
-#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED
-       yaffs_trace(YAFFS_TRACE_ALWAYS,
-               " \n\n\n\nYAFFS-WARNING CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED selected.\n\n\n\n"
-       );
-#endif
-
        mutex_init(&yaffs_context_lock);
 
        /* Install the proc_fs entries */
@@ -3465,5 +3448,5 @@ module_init(init_yaffs_fs)
     module_exit(exit_yaffs_fs)
 
     MODULE_DESCRIPTION("YAFFS2 - a NAND specific flash file system");
-MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002-2010");
+MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002-2011");
 MODULE_LICENSE("GPL");
index 1893125d338f4322ec27bde53a4e1839b1b67cc5..f8228457e18697ddfd73900d29fca6736fb578a1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -36,7 +36,6 @@
  * a single version and should not include any multi-version code.
  */
 #include <linux/version.h>
-
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/kthread.h>
 #include <linux/delay.h>
 #include <linux/freezer.h>
-
 #include <asm/div64.h>
-
 #include <linux/statfs.h>
-
-#define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf)
-
-#define YPROC_ROOT  NULL
-
-#define Y_INIT_TIMER(a)        init_timer_on_stack(a)
-
-#define WRITE_SIZE_STR "writesize"
-#define WRITE_SIZE(mtd) ((mtd)->writesize)
-
-static uint32_t YCALCBLOCKS(uint64_t partition_size, uint32_t block_size)
-{
-       uint64_t result = partition_size;
-       do_div(result, block_size);
-       return (uint32_t) result;
-}
-
 #include <linux/uaccess.h>
 #include <linux/mtd/mtd.h>
 
@@ -82,9 +62,7 @@ static uint32_t YCALCBLOCKS(uint64_t partition_size, uint32_t block_size)
 #include "yaffs_trace.h"
 #include "yaffs_guts.h"
 #include "yaffs_attribs.h"
-
 #include "yaffs_linux.h"
-
 #include "yaffs_mtdif.h"
 #include "yaffs_mtdif1.h"
 #include "yaffs_mtdif2.h"
@@ -94,6 +72,7 @@ unsigned int yaffs_wr_attempts = YAFFS_WR_ATTEMPTS;
 unsigned int yaffs_auto_checkpoint = 1;
 unsigned int yaffs_gc_control = 1;
 unsigned int yaffs_bg_enable = 1;
+unsigned int yaffs_auto_select = 1;
 
 /* Module Parameters */
 module_param(yaffs_trace_mask, uint, 0644);
@@ -101,16 +80,27 @@ module_param(yaffs_wr_attempts, uint, 0644);
 module_param(yaffs_auto_checkpoint, uint, 0644);
 module_param(yaffs_gc_control, uint, 0644);
 module_param(yaffs_bg_enable, uint, 0644);
+module_param(yaffs_auto_select, uint, 0644);
+
+#define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf)
+
+static uint32_t YCALCBLOCKS(uint64_t partition_size, uint32_t block_size)
+{
+       uint64_t result = partition_size;
 
+       do_div(result, block_size);
+       return (uint32_t) result;
+}
 
 #define yaffs_inode_to_obj_lv(iptr) ((iptr)->i_private)
-#define yaffs_inode_to_obj(iptr) ((struct yaffs_obj *)(yaffs_inode_to_obj_lv(iptr)))
+#define yaffs_inode_to_obj(iptr)\
+       ((struct yaffs_obj *)(yaffs_inode_to_obj_lv(iptr)))
 #define yaffs_dentry_to_obj(dptr) yaffs_inode_to_obj((dptr)->d_inode)
 #define yaffs_super_to_dev(sb) ((struct yaffs_dev *)sb->s_fs_info)
 
 #define update_dir_time(dir) do {\
                        (dir)->i_ctime = (dir)->i_mtime = CURRENT_TIME; \
-               } while(0)
+               } while (0)
 
 
 static unsigned yaffs_gc_control_callback(struct yaffs_dev *dev)
@@ -156,7 +146,6 @@ static struct inode *yaffs_iget(struct super_block *sb, unsigned long ino)
        yaffs_gross_lock(dev);
 
        obj = yaffs_find_by_number(dev, inode->i_ino);
-
        yaffs_fill_inode_from_obj(inode, obj);
 
        yaffs_gross_unlock(dev);
@@ -203,13 +192,10 @@ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
                       dev_t rdev)
 {
        struct inode *inode;
-
        struct yaffs_obj *obj = NULL;
        struct yaffs_dev *dev;
-
        struct yaffs_obj *parent = yaffs_inode_to_obj(dir);
-
-       int error = -ENOSPC;
+       int error;
        uid_t uid = current->cred->fsuid;
        gid_t gid =
            (dir->i_mode & S_ISGID) ? dir->i_gid : current->cred->fsgid;
@@ -217,16 +203,16 @@ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
        if ((dir->i_mode & S_ISGID) && S_ISDIR(mode))
                mode |= S_ISGID;
 
-       if (parent) {
-               yaffs_trace(YAFFS_TRACE_OS,
-                       "yaffs_mknod: parent object %d type %d",
-                       parent->obj_id, parent->variant_type);
-       } else {
+       if (!parent) {
                yaffs_trace(YAFFS_TRACE_OS,
                        "yaffs_mknod: could not get parent object");
                return -EPERM;
        }
 
+       yaffs_trace(YAFFS_TRACE_OS,
+                       "yaffs_mknod: parent object %d type %d",
+                       parent->obj_id, parent->variant_type);
+
        yaffs_trace(YAFFS_TRACE_OS,
                "yaffs_mknod: making oject for %s, mode %x dev %x",
                dentry->d_name.name, mode, rdev);
@@ -235,6 +221,11 @@ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
 
        yaffs_gross_lock(dev);
 
+       if (yaffs_get_n_free_chunks(dev) < 1) {
+               error = -ENOSPC;
+               goto err_out;
+       }
+
        switch (mode & S_IFMT) {
        default:
                /* Special (socket, fifo, device...) */
@@ -259,24 +250,29 @@ static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
                break;
        }
 
+       if (!obj) {
+               error = -ENOMEM;
+               goto err_out;
+       }
+
        /* Can not call yaffs_get_inode() with gross lock held */
        yaffs_gross_unlock(dev);
 
-       if (obj) {
-               inode = yaffs_get_inode(dir->i_sb, mode, rdev, obj);
-               d_instantiate(dentry, inode);
-               update_dir_time(dir);
-               yaffs_trace(YAFFS_TRACE_OS,
-                       "yaffs_mknod created object %d count = %d",
-                       obj->obj_id, atomic_read(&inode->i_count));
-               error = 0;
-               yaffs_fill_inode_from_obj(dir, parent);
-       } else {
-               yaffs_trace(YAFFS_TRACE_OS, "yaffs_mknod failed making object");
-               error = -ENOMEM;
-       }
 
+       inode = yaffs_get_inode(dir->i_sb, mode, rdev, obj);
+       d_instantiate(dentry, inode);
+       update_dir_time(dir);
+       yaffs_trace(YAFFS_TRACE_OS,
+               "yaffs_mknod created object %d count = %d",
+               obj->obj_id, atomic_read(&inode->i_count));
+       yaffs_fill_inode_from_obj(dir, parent);
+       return 0;
+
+err_out:
+       yaffs_gross_unlock(dev);
+       yaffs_trace(YAFFS_TRACE_OS, "yaffs_mknod error %d", error);
        return error;
+
 }
 
 static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
@@ -335,6 +331,7 @@ static int yaffs_symlink(struct inode *dir, struct dentry *dentry,
 {
        struct yaffs_obj *obj;
        struct yaffs_dev *dev;
+       struct inode *inode;
        uid_t uid = current->cred->fsuid;
        gid_t gid =
            (dir->i_mode & S_ISGID) ? dir->i_gid : current->cred->fsgid;
@@ -347,19 +344,17 @@ static int yaffs_symlink(struct inode *dir, struct dentry *dentry,
                                   S_IFLNK | S_IRWXUGO, uid, gid, symname);
        yaffs_gross_unlock(dev);
 
-       if (obj) {
-               struct inode *inode;
-
-               inode = yaffs_get_inode(dir->i_sb, obj->yst_mode, 0, obj);
-               d_instantiate(dentry, inode);
-               update_dir_time(dir);
-               yaffs_trace(YAFFS_TRACE_OS, "symlink created OK");
-               return 0;
-       } else {
+       if (!obj) {
                yaffs_trace(YAFFS_TRACE_OS, "symlink not created");
+               return -ENOMEM;
        }
 
-       return -ENOMEM;
+       inode = yaffs_get_inode(dir->i_sb, obj->yst_mode, 0, obj);
+       d_instantiate(dentry, inode);
+       update_dir_time(dir);
+       yaffs_trace(YAFFS_TRACE_OS, "symlink created OK");
+
+       return 0;
 }
 
 static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry,
@@ -367,7 +362,6 @@ static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry,
 {
        struct yaffs_obj *obj;
        struct inode *inode = NULL;
-
        struct yaffs_dev *dev = yaffs_inode_to_obj(dir)->my_dev;
 
        if (current != yaffs_dev_to_lc(dev)->readdir_process)
@@ -411,7 +405,6 @@ static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry,
 static int yaffs_unlink(struct inode *dir, struct dentry *dentry)
 {
        int ret_val;
-
        struct yaffs_dev *dev;
        struct yaffs_obj *obj;
 
@@ -512,6 +505,7 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
        struct inode *inode = dentry->d_inode;
        int error = 0;
        struct yaffs_dev *dev;
+       int result;
 
        yaffs_trace(YAFFS_TRACE_OS,
                "yaffs_setattr of object %d",
@@ -521,17 +515,15 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
        if (attr->ia_valid & ATTR_SIZE && (attr->ia_size >> 31))
                error = -EINVAL;
 
-       if (error == 0)
+       if (!error)
                error = inode_change_ok(inode, attr);
-       if (error == 0) {
-               int result;
-               if (!error) {
-                       setattr_copy(inode, attr);
-                       yaffs_trace(YAFFS_TRACE_OS, "inode_setattr called");
-                       if (attr->ia_valid & ATTR_SIZE) {
-                               truncate_setsize(inode, attr->ia_size);
-                               inode->i_blocks = (inode->i_size + 511) >> 9;
-                       }
+
+       if (!error) {
+               setattr_copy(inode, attr);
+               yaffs_trace(YAFFS_TRACE_OS, "inode_setattr called");
+               if (attr->ia_valid & ATTR_SIZE) {
+                       truncate_setsize(inode, attr->ia_size);
+                       inode->i_blocks = (inode->i_size + 511) >> 9;
                }
                dev = yaffs_inode_to_obj(inode)->my_dev;
                if (attr->ia_valid & ATTR_SIZE) {
@@ -539,15 +531,12 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
                                           (int)(attr->ia_size),
                                           (int)(attr->ia_size));
                }
+
                yaffs_gross_lock(dev);
                result = yaffs_set_attribs(yaffs_inode_to_obj(inode), attr);
-               if (result == YAFFS_OK) {
-                       error = 0;
-               } else {
+               if (result != YAFFS_OK)
                        error = -EPERM;
-               }
                yaffs_gross_unlock(dev);
-
        }
 
        yaffs_trace(YAFFS_TRACE_OS, "yaffs_setattr done returning %d", error);
@@ -555,39 +544,31 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
        return error;
 }
 
-#ifdef CONFIG_YAFFS_XATTR
 static int yaffs_setxattr(struct dentry *dentry, const char *name,
                   const void *value, size_t size, int flags)
 {
        struct inode *inode = dentry->d_inode;
-       int error = 0;
+       int error;
        struct yaffs_dev *dev;
        struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
 
        yaffs_trace(YAFFS_TRACE_OS, "yaffs_setxattr of object %d", obj->obj_id);
 
-       if (error == 0) {
-               int result;
-               dev = obj->my_dev;
-               yaffs_gross_lock(dev);
-               result = yaffs_set_xattrib(obj, name, value, size, flags);
-               if (result == YAFFS_OK)
-                       error = 0;
-               else if (result < 0)
-                       error = result;
-               yaffs_gross_unlock(dev);
+       dev = obj->my_dev;
+       yaffs_gross_lock(dev);
+       error = yaffs_set_xattrib(obj, name, value, size, flags);
+       yaffs_gross_unlock(dev);
 
-       }
        yaffs_trace(YAFFS_TRACE_OS, "yaffs_setxattr done returning %d", error);
 
        return error;
 }
 
-static ssize_t yaffs_getxattr(struct dentry * dentry, const char *name, void *buff,
-                      size_t size)
+static ssize_t yaffs_getxattr(struct dentry *dentry, const char *name,
+                               void *buff, size_t size)
 {
        struct inode *inode = dentry->d_inode;
-       int error = 0;
+       int error;
        struct yaffs_dev *dev;
        struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
 
@@ -595,13 +576,11 @@ static ssize_t yaffs_getxattr(struct dentry * dentry, const char *name, void *bu
                "yaffs_getxattr \"%s\" from object %d",
                name, obj->obj_id);
 
-       if (error == 0) {
-               dev = obj->my_dev;
-               yaffs_gross_lock(dev);
-               error = yaffs_get_xattrib(obj, name, buff, size);
-               yaffs_gross_unlock(dev);
+       dev = obj->my_dev;
+       yaffs_gross_lock(dev);
+       error = yaffs_get_xattrib(obj, name, buff, size);
+       yaffs_gross_unlock(dev);
 
-       }
        yaffs_trace(YAFFS_TRACE_OS, "yaffs_getxattr done returning %d", error);
 
        return error;
@@ -610,56 +589,45 @@ static ssize_t yaffs_getxattr(struct dentry * dentry, const char *name, void *bu
 static int yaffs_removexattr(struct dentry *dentry, const char *name)
 {
        struct inode *inode = dentry->d_inode;
-       int error = 0;
+       int error;
        struct yaffs_dev *dev;
        struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
 
        yaffs_trace(YAFFS_TRACE_OS,
                "yaffs_removexattr of object %d", obj->obj_id);
 
-       if (error == 0) {
-               int result;
-               dev = obj->my_dev;
-               yaffs_gross_lock(dev);
-               result = yaffs_remove_xattrib(obj, name);
-               if (result == YAFFS_OK)
-                       error = 0;
-               else if (result < 0)
-                       error = result;
-               yaffs_gross_unlock(dev);
+       dev = obj->my_dev;
+       yaffs_gross_lock(dev);
+       error = yaffs_remove_xattrib(obj, name);
+       yaffs_gross_unlock(dev);
 
-       }
        yaffs_trace(YAFFS_TRACE_OS,
                "yaffs_removexattr done returning %d", error);
 
        return error;
 }
 
-static ssize_t yaffs_listxattr(struct dentry * dentry, char *buff, size_t size)
+static ssize_t yaffs_listxattr(struct dentry *dentry, char *buff, size_t size)
 {
        struct inode *inode = dentry->d_inode;
-       int error = 0;
+       int error;
        struct yaffs_dev *dev;
        struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
 
        yaffs_trace(YAFFS_TRACE_OS,
                "yaffs_listxattr of object %d", obj->obj_id);
 
-       if (error == 0) {
-               dev = obj->my_dev;
-               yaffs_gross_lock(dev);
-               error = yaffs_list_xattrib(obj, buff, size);
-               yaffs_gross_unlock(dev);
+       dev = obj->my_dev;
+       yaffs_gross_lock(dev);
+       error = yaffs_list_xattrib(obj, buff, size);
+       yaffs_gross_unlock(dev);
 
-       }
        yaffs_trace(YAFFS_TRACE_OS,
                "yaffs_listxattr done returning %d", error);
 
        return error;
 }
 
-#endif
-
 static const struct inode_operations yaffs_dir_inode_operations = {
        .create = yaffs_create,
        .lookup = yaffs_lookup,
@@ -671,12 +639,10 @@ static const struct inode_operations yaffs_dir_inode_operations = {
        .mknod = yaffs_mknod,
        .rename = yaffs_rename,
        .setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
        .setxattr = yaffs_setxattr,
        .getxattr = yaffs_getxattr,
        .listxattr = yaffs_listxattr,
        .removexattr = yaffs_removexattr,
-#endif
 };
 /*-----------------------------------------------------------------*/
 /* Directory search context allows us to unlock access to yaffs during
@@ -715,18 +681,21 @@ static struct yaffs_search_context *yaffs_new_search(struct yaffs_obj *dir)
        struct yaffs_dev *dev = dir->my_dev;
        struct yaffs_search_context *sc =
            kmalloc(sizeof(struct yaffs_search_context), GFP_NOFS);
-       if (sc) {
-               sc->dir_obj = dir;
-               sc->dev = dev;
-               if (list_empty(&sc->dir_obj->variant.dir_variant.children))
-                       sc->next_return = NULL;
-               else
-                       sc->next_return =
-                           list_entry(dir->variant.dir_variant.children.next,
-                                      struct yaffs_obj, siblings);
-               INIT_LIST_HEAD(&sc->others);
-               list_add(&sc->others, &(yaffs_dev_to_lc(dev)->search_contexts));
-       }
+
+       if (!sc)
+               return NULL;
+
+       sc->dir_obj = dir;
+       sc->dev = dev;
+       if (list_empty(&sc->dir_obj->variant.dir_variant.children))
+               sc->next_return = NULL;
+       else
+               sc->next_return =
+                   list_entry(dir->variant.dir_variant.children.next,
+                              struct yaffs_obj, siblings);
+       INIT_LIST_HEAD(&sc->others);
+       list_add(&sc->others, &(yaffs_dev_to_lc(dev)->search_contexts));
+
        return sc;
 }
 
@@ -799,7 +768,6 @@ static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir)
        unsigned long offset, curoffs;
        struct yaffs_obj *l;
        int ret_val = 0;
-
        char name[YAFFS_MAX_NAME_LENGTH + 1];
 
        obj = yaffs_dentry_to_obj(f->f_dentry);
@@ -909,11 +877,10 @@ static const struct file_operations yaffs_dir_operations = {
 static int yaffs_file_flush(struct file *file, fl_owner_t id)
 {
        struct yaffs_obj *obj = yaffs_dentry_to_obj(file->f_dentry);
-
        struct yaffs_dev *dev = obj->my_dev;
 
        yaffs_trace(YAFFS_TRACE_OS,
-               "yaffs_file_flush object %d (%s)",
+               "yaffs_file_flush object %d (%s)",
                obj->obj_id, obj->dirty ? "dirty" : "clean");
 
        yaffs_gross_lock(dev);
@@ -991,7 +958,6 @@ struct dentry *yaffs2_get_parent(struct dentry *dentry)
                        }
                }
        }
-
        return parent;
 }
 
@@ -1013,7 +979,6 @@ static int yaffs_readlink(struct dentry *dentry, char __user * buffer,
 {
        unsigned char *alias;
        int ret;
-
        struct yaffs_dev *dev = yaffs_dentry_to_obj(dentry)->my_dev;
 
        yaffs_gross_lock(dev);
@@ -1127,7 +1092,6 @@ static int yaffs_readpage_nolock(struct file *f, struct page *pg)
        struct yaffs_obj *obj;
        unsigned char *pg_buf;
        int ret;
-
        struct yaffs_dev *dev;
 
        yaffs_trace(YAFFS_TRACE_OS,
@@ -1172,6 +1136,7 @@ static int yaffs_readpage_nolock(struct file *f, struct page *pg)
 static int yaffs_readpage_unlock(struct file *f, struct page *pg)
 {
        int ret = yaffs_readpage_nolock(f, pg);
+
        unlock_page(pg);
        return ret;
 }
@@ -1268,18 +1233,17 @@ static int yaffs_writepage(struct page *page, struct writeback_control *wbc)
        return (n_written == n_bytes) ? 0 : -ENOSPC;
 }
 
-/* Space holding and freeing is done to ensure we have space available for 
+/* Space holding and freeing is done to ensure we have space available for
  * write_begin/end.
  * For now we just assume few parallel writes and check against a small
  * number.
- * Todo: need to do this with a counter to handle parallel reads better.
+ * Todo: need to do this with a counter to handle parallel reads better
  */
 
 static ssize_t yaffs_hold_space(struct file *f)
 {
        struct yaffs_obj *obj;
        struct yaffs_dev *dev;
-
        int n_free_chunks;
 
        obj = yaffs_dentry_to_obj(f->f_dentry);
@@ -1315,7 +1279,6 @@ static int yaffs_write_begin(struct file *filp, struct address_space *mapping,
 {
        struct page *pg = NULL;
        pgoff_t index = pos >> PAGE_CACHE_SHIFT;
-
        int ret = 0;
        int space_held = 0;
 
@@ -1365,7 +1328,7 @@ out:
 }
 
 static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
-                               loff_t * pos)
+                               loff_t *pos)
 {
        struct yaffs_obj *obj;
        int n_written, ipos;
@@ -1375,11 +1338,11 @@ static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
        obj = yaffs_dentry_to_obj(f->f_dentry);
 
        if (!obj) {
-               /* This should not happen */
+               /* This should not happen */
                yaffs_trace(YAFFS_TRACE_OS,
                        "yaffs_file_write: hey obj is null!");
-                return -ENINVAL;
-        }
+               return -EINVAL;
+       }
 
        dev = obj->my_dev;
 
@@ -1415,7 +1378,6 @@ static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n,
                                "yaffs_file_write size updated to %d bytes, %d blocks",
                                ipos, (int)(inode->i_blocks));
                }
-
        }
        yaffs_gross_unlock(dev);
        return (n_written == 0) && (n > 0) ? -ENOSPC : n_written;
@@ -1474,11 +1436,12 @@ static int yaffs_statfs(struct dentry *dentry, struct kstatfs *buf)
 
                bytes_in_dev =
                    ((uint64_t)
-                    ((dev->param.end_block - dev->param.start_block +
-                      1))) * ((uint64_t) (dev->param.chunks_per_block *
+                    ((dev->param.end_block - dev->param.start_block + 1))) *
+                    ((uint64_t) (dev->param.chunks_per_block *
                                           dev->data_bytes_per_chunk));
 
-               do_div(bytes_in_dev, sb->s_blocksize);  /* bytes_in_dev becomes the number of blocks */
+               do_div(bytes_in_dev, sb->s_blocksize);
+                       /* bytes_in_dev becomes the number of blocks */
                buf->f_blocks = bytes_in_dev;
 
                bytes_free = ((uint64_t) (yaffs_get_n_free_chunks(dev))) *
@@ -1534,6 +1497,7 @@ static void yaffs_flush_inodes(struct super_block *sb)
 static void yaffs_flush_super(struct super_block *sb, int do_checkpoint)
 {
        struct yaffs_dev *dev = yaffs_super_to_dev(sb);
+
        if (!dev)
                return;
 
@@ -1602,7 +1566,7 @@ static int yaffs_do_sync_fs(struct super_block *sb, int request_checkpoint)
  * yaffs_bg_start() launches the background thread.
  * yaffs_bg_stop() cleans up the background thread.
  *
- * NB: 
+ * NB:
  * The thread should only run after the yaffs is initialised
  * The thread should be stopped before yaffs is unmounted.
  * The thread should not do any writing while the fs is in read only.
@@ -1622,7 +1586,6 @@ static int yaffs_bg_thread_fn(void *data)
        unsigned long next_gc = now;
        unsigned long expires;
        unsigned int urgency;
-
        int gc_result;
        struct timer_list timer;
 
@@ -1659,12 +1622,12 @@ static int yaffs_bg_thread_fn(void *data)
                                else
                                        next_gc = now + HZ * 2;
                        } else  {
-                               /*
+                               /*
                                 * gc not running so set to next_dir_update
                                 * to cut down on wake ups
                                 */
                                next_gc = next_dir_update;
-                        }
+                       }
                }
                yaffs_gross_unlock(dev);
                expires = next_dir_update;
@@ -1673,7 +1636,7 @@ static int yaffs_bg_thread_fn(void *data)
                if (time_before(expires, now))
                        expires = now + HZ;
 
-               Y_INIT_TIMER(&timer);
+               init_timer_on_stack(&timer);
                timer.expires = expires + 1;
                timer.data = (unsigned long)current;
                timer.function = yaffs_background_waker;
@@ -1745,12 +1708,9 @@ static int yaffs_sync_fs(struct super_block *sb, int wait)
        return 0;
 }
 
-
 static LIST_HEAD(yaffs_context_list);
 struct mutex yaffs_context_lock;
 
-
-
 struct yaffs_options {
        int inband_tags;
        int skip_checkpoint_read;
@@ -1766,7 +1726,7 @@ struct yaffs_options {
 
 #define MAX_OPT_LEN 30
 static int yaffs_parse_options(struct yaffs_options *options,
-                              const char *options_str)
+                               const char *options_str)
 {
        char cur_opt[MAX_OPT_LEN + 1];
        int p;
@@ -1824,11 +1784,10 @@ static int yaffs_parse_options(struct yaffs_options *options,
                        error = 1;
                }
        }
-
        return error;
 }
 
-static struct address_space_operations yaffs_file_address_operations = {
+static const struct address_space_operations yaffs_file_address_operations = {
        .readpage = yaffs_readpage,
        .writepage = yaffs_writepage,
        .write_begin = yaffs_write_begin,
@@ -1839,12 +1798,10 @@ static struct address_space_operations yaffs_file_address_operations = {
 
 static const struct inode_operations yaffs_file_inode_operations = {
        .setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
        .setxattr = yaffs_setxattr,
        .getxattr = yaffs_getxattr,
        .listxattr = yaffs_listxattr,
        .removexattr = yaffs_removexattr,
-#endif
 };
 
 static const struct inode_operations yaffs_symlink_inode_operations = {
@@ -1852,104 +1809,97 @@ static const struct inode_operations yaffs_symlink_inode_operations = {
        .follow_link = yaffs_follow_link,
        .put_link = yaffs_put_link,
        .setattr = yaffs_setattr,
-#ifdef CONFIG_YAFFS_XATTR
        .setxattr = yaffs_setxattr,
        .getxattr = yaffs_getxattr,
        .listxattr = yaffs_listxattr,
        .removexattr = yaffs_removexattr,
-#endif
 };
 
 static void yaffs_fill_inode_from_obj(struct inode *inode,
                                      struct yaffs_obj *obj)
 {
-       if (inode && obj) {
-
-               /* Check mode against the variant type and attempt to repair if broken. */
-               u32 mode = obj->yst_mode;
-               switch (obj->variant_type) {
-               case YAFFS_OBJECT_TYPE_FILE:
-                       if (!S_ISREG(mode)) {
-                               obj->yst_mode &= ~S_IFMT;
-                               obj->yst_mode |= S_IFREG;
-                       }
+       u32 mode;
 
-                       break;
-               case YAFFS_OBJECT_TYPE_SYMLINK:
-                       if (!S_ISLNK(mode)) {
-                               obj->yst_mode &= ~S_IFMT;
-                               obj->yst_mode |= S_IFLNK;
-                       }
+       if (!inode || !obj)  {
+               yaffs_trace(YAFFS_TRACE_OS,
+                       "yaffs_fill_inode invalid parameters");
+               return;
+       }
 
-                       break;
-               case YAFFS_OBJECT_TYPE_DIRECTORY:
-                       if (!S_ISDIR(mode)) {
-                               obj->yst_mode &= ~S_IFMT;
-                               obj->yst_mode |= S_IFDIR;
-                       }
+       /* Check mode against the variant type
+        * and attempt to repair if broken. */
+       mode = obj->yst_mode;
 
-                       break;
-               case YAFFS_OBJECT_TYPE_UNKNOWN:
-               case YAFFS_OBJECT_TYPE_HARDLINK:
-               case YAFFS_OBJECT_TYPE_SPECIAL:
-               default:
-                       /* TODO? */
-                       break;
+       switch (obj->variant_type) {
+       case YAFFS_OBJECT_TYPE_FILE:
+               if (!S_ISREG(mode)) {
+                       obj->yst_mode &= ~S_IFMT;
+                       obj->yst_mode |= S_IFREG;
                }
-
-               inode->i_flags |= S_NOATIME;
-
-               inode->i_ino = obj->obj_id;
-               inode->i_mode = obj->yst_mode;
-               inode->i_uid = obj->yst_uid;
-               inode->i_gid = obj->yst_gid;
-
-               inode->i_rdev = old_decode_dev(obj->yst_rdev);
-
-               inode->i_atime.tv_sec = (time_t) (obj->yst_atime);
-               inode->i_atime.tv_nsec = 0;
-               inode->i_mtime.tv_sec = (time_t) obj->yst_mtime;
-               inode->i_mtime.tv_nsec = 0;
-               inode->i_ctime.tv_sec = (time_t) obj->yst_ctime;
-               inode->i_ctime.tv_nsec = 0;
-               inode->i_size = yaffs_get_obj_length(obj);
-               inode->i_blocks = (inode->i_size + 511) >> 9;
-
-               inode->i_nlink = yaffs_get_obj_link_count(obj);
-
-               yaffs_trace(YAFFS_TRACE_OS,
-                       "yaffs_fill_inode mode %x uid %d gid %d size %d count %d",
-                       inode->i_mode, inode->i_uid, inode->i_gid,
-                       (int)inode->i_size, atomic_read(&inode->i_count));
-
-               switch (obj->yst_mode & S_IFMT) {
-               default:        /* fifo, device or socket */
-                       init_special_inode(inode, obj->yst_mode,
-                                          old_decode_dev(obj->yst_rdev));
-                       break;
-               case S_IFREG:   /* file */
-                       inode->i_op = &yaffs_file_inode_operations;
-                       inode->i_fop = &yaffs_file_operations;
-                       inode->i_mapping->a_ops =
-                           &yaffs_file_address_operations;
-                       break;
-               case S_IFDIR:   /* directory */
-                       inode->i_op = &yaffs_dir_inode_operations;
-                       inode->i_fop = &yaffs_dir_operations;
-                       break;
-               case S_IFLNK:   /* symlink */
-                       inode->i_op = &yaffs_symlink_inode_operations;
-                       break;
+               break;
+       case YAFFS_OBJECT_TYPE_SYMLINK:
+               if (!S_ISLNK(mode)) {
+                       obj->yst_mode &= ~S_IFMT;
+                       obj->yst_mode |= S_IFLNK;
+               }
+               break;
+       case YAFFS_OBJECT_TYPE_DIRECTORY:
+               if (!S_ISDIR(mode)) {
+                       obj->yst_mode &= ~S_IFMT;
+                       obj->yst_mode |= S_IFDIR;
                }
+               break;
+       case YAFFS_OBJECT_TYPE_UNKNOWN:
+       case YAFFS_OBJECT_TYPE_HARDLINK:
+       case YAFFS_OBJECT_TYPE_SPECIAL:
+       default:
+               /* TODO? */
+               break;
+       }
 
-               yaffs_inode_to_obj_lv(inode) = obj;
+       inode->i_flags |= S_NOATIME;
+       inode->i_ino = obj->obj_id;
+       inode->i_mode = obj->yst_mode;
+       inode->i_uid = obj->yst_uid;
+       inode->i_gid = obj->yst_gid;
 
-               obj->my_inode = inode;
+       inode->i_rdev = old_decode_dev(obj->yst_rdev);
 
-       } else {
-               yaffs_trace(YAFFS_TRACE_OS,
-                       "yaffs_fill_inode invalid parameters");
+       inode->i_atime.tv_sec = (time_t) (obj->yst_atime);
+       inode->i_atime.tv_nsec = 0;
+       inode->i_mtime.tv_sec = (time_t) obj->yst_mtime;
+       inode->i_mtime.tv_nsec = 0;
+       inode->i_ctime.tv_sec = (time_t) obj->yst_ctime;
+       inode->i_ctime.tv_nsec = 0;
+       inode->i_size = yaffs_get_obj_length(obj);
+       inode->i_blocks = (inode->i_size + 511) >> 9;
+       inode->i_nlink = yaffs_get_obj_link_count(obj);
+       yaffs_trace(YAFFS_TRACE_OS,
+               "yaffs_fill_inode mode %x uid %d gid %d size %d count %d",
+               inode->i_mode, inode->i_uid, inode->i_gid,
+               (int)inode->i_size, atomic_read(&inode->i_count));
+
+       switch (obj->yst_mode & S_IFMT) {
+       default:        /* fifo, device or socket */
+               init_special_inode(inode, obj->yst_mode,
+                                  old_decode_dev(obj->yst_rdev));
+               break;
+       case S_IFREG:   /* file */
+               inode->i_op = &yaffs_file_inode_operations;
+               inode->i_fop = &yaffs_file_operations;
+               inode->i_mapping->a_ops = &yaffs_file_address_operations;
+               break;
+       case S_IFDIR:   /* directory */
+               inode->i_op = &yaffs_dir_inode_operations;
+               inode->i_fop = &yaffs_dir_operations;
+               break;
+       case S_IFLNK:   /* symlink */
+               inode->i_op = &yaffs_symlink_inode_operations;
+               break;
        }
+
+       yaffs_inode_to_obj_lv(inode) = obj;
+       obj->my_inode = inode;
 }
 
 static void yaffs_put_super(struct super_block *sb)
@@ -2018,11 +1968,8 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
        char *data_str = (char *)data;
        struct yaffs_linux_context *context = NULL;
        struct yaffs_param *param;
-
        int read_only = 0;
-
        struct yaffs_options options;
-
        unsigned mount_id;
        int found;
        struct yaffs_linux_context *context_iterator;
@@ -2031,7 +1978,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
        if (!sb) {
                printk(KERN_INFO "yaffs: sb is NULL\n");
                return NULL;
-        }
+       }
 
        sb->s_magic = YAFFS_MAGIC;
        sb->s_op = &yaffs_super_ops;
@@ -2057,10 +2004,9 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
 
        memset(&options, 0, sizeof(options));
 
-       if (yaffs_parse_options(&options, data_str)) {
+       if (yaffs_parse_options(&options, data_str))
                /* Option parsing failed */
                return NULL;
-       }
 
        sb->s_blocksize = PAGE_CACHE_SIZE;
        sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
@@ -2102,25 +2048,21 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
        yaffs_trace(YAFFS_TRACE_OS, " writeoob %p", mtd->write_oob);
        yaffs_trace(YAFFS_TRACE_OS, " block_isbad %p", mtd->block_isbad);
        yaffs_trace(YAFFS_TRACE_OS, " block_markbad %p", mtd->block_markbad);
-       yaffs_trace(YAFFS_TRACE_OS, " %s %d", WRITE_SIZE_STR, WRITE_SIZE(mtd));
+       yaffs_trace(YAFFS_TRACE_OS, " writesize %d", mtd->writesize);
        yaffs_trace(YAFFS_TRACE_OS, " oobsize %d", mtd->oobsize);
        yaffs_trace(YAFFS_TRACE_OS, " erasesize %d", mtd->erasesize);
        yaffs_trace(YAFFS_TRACE_OS, " size %lld", mtd->size);
 
-#ifdef CONFIG_YAFFS_AUTO_YAFFS2
-
-       if (yaffs_version == 1 && WRITE_SIZE(mtd) >= 2048) {
+       if (yaffs_auto_select && yaffs_version == 1 && mtd->writesize >= 2048) {
                yaffs_trace(YAFFS_TRACE_ALWAYS, "auto selecting yaffs2");
                yaffs_version = 2;
        }
 
-       /* Added NCB 26/5/2006 for completeness */
-       if (yaffs_version == 2 && !options.inband_tags
-           && WRITE_SIZE(mtd) == 512) {
+       if (yaffs_auto_select && yaffs_version == 2 && !options.inband_tags &&
+               mtd->writesize == 512) {
                yaffs_trace(YAFFS_TRACE_ALWAYS, "auto selecting yaffs1");
                yaffs_version = 1;
        }
-#endif
 
        if (yaffs_version == 2) {
                /* Check for version 2 style functions */
@@ -2134,7 +2076,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
                        return NULL;
                }
 
-               if ((WRITE_SIZE(mtd) < YAFFS_MIN_YAFFS2_CHUNK_SIZE ||
+               if ((mtd->writesize < YAFFS_MIN_YAFFS2_CHUNK_SIZE ||
                     mtd->oobsize < YAFFS_MIN_YAFFS2_SPARE_SIZE) &&
                    !options.inband_tags) {
                        yaffs_trace(YAFFS_TRACE_ALWAYS,
@@ -2151,7 +2093,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
                        return NULL;
                }
 
-               if (WRITE_SIZE(mtd) < YAFFS_BYTES_PER_CHUNK ||
+               if (mtd->writesize < YAFFS_BYTES_PER_CHUNK ||
                    mtd->oobsize != YAFFS_BYTES_PER_SPARE) {
                        yaffs_trace(YAFFS_TRACE_ALWAYS,
                                "MTD device does not support have the right page sizes");
@@ -2175,10 +2117,8 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
        context = kmalloc(sizeof(struct yaffs_linux_context), GFP_KERNEL);
 
        if (!dev || !context) {
-               if (dev)
-                       kfree(dev);
-               if (context)
-                       kfree(context);
+               kfree(dev);
+               kfree(context);
                dev = NULL;
                context = NULL;
        }
@@ -2219,40 +2159,19 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
        param->n_caches = (options.no_cache) ? 0 : 10;
        param->inband_tags = options.inband_tags;
 
-#ifdef CONFIG_YAFFS_DISABLE_LAZY_LOAD
        param->disable_lazy_load = 1;
-#endif
-#ifdef CONFIG_YAFFS_XATTR
        param->enable_xattr = 1;
-#endif
        if (options.lazy_loading_overridden)
                param->disable_lazy_load = !options.lazy_loading_enabled;
 
-#ifdef CONFIG_YAFFS_DISABLE_TAGS_ECC
-       param->no_tags_ecc = 1;
-#endif
-
-#ifdef CONFIG_YAFFS_DISABLE_BACKGROUND
-#else
        param->defered_dir_update = 1;
-#endif
 
        if (options.tags_ecc_overridden)
                param->no_tags_ecc = !options.tags_ecc_on;
 
-#ifdef CONFIG_YAFFS_EMPTY_LOST_AND_FOUND
        param->empty_lost_n_found = 1;
-#endif
 
-#ifdef CONFIG_YAFFS_DISABLE_BLOCK_REFRESHING
-       param->refresh_period = 0;
-#else
        param->refresh_period = 500;
-#endif
-
-#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED
-       param->always_check_erased = 1;
-#endif
 
        if (options.empty_lost_and_found_overridden)
                param->empty_lost_n_found = options.empty_lost_and_found;
@@ -2263,8 +2182,8 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
                param->read_chunk_tags_fn = nandmtd2_read_chunk_tags;
                param->bad_block_fn = nandmtd2_mark_block_bad;
                param->query_block_fn = nandmtd2_query_block;
-               yaffs_dev_to_lc(dev)->spare_buffer = 
-                               kmalloc(mtd->oobsize, GFP_NOFS);
+               yaffs_dev_to_lc(dev)->spare_buffer =
+                               kmalloc(mtd->oobsize, GFP_NOFS);
                param->is_yaffs2 = 1;
                param->total_bytes_per_chunk = mtd->writesize;
                param->chunks_per_block = mtd->erasesize / mtd->writesize;
@@ -2291,22 +2210,19 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
 
        yaffs_dev_to_lc(dev)->super = sb;
 
-#ifndef CONFIG_YAFFS_DOES_ECC
        param->use_nand_ecc = 1;
-#endif
 
        param->skip_checkpt_rd = options.skip_checkpoint_read;
        param->skip_checkpt_wr = options.skip_checkpoint_write;
 
        mutex_lock(&yaffs_context_lock);
        /* Get a mount id */
-       found = 0;
-       for (mount_id = 0; !found; mount_id++) {
+       for (mount_id = 0, found = 0; !found; mount_id++) {
                found = 1;
                list_for_each(l, &yaffs_context_list) {
                        context_iterator =
-                           list_entry(l, struct yaffs_linux_context,
-                                      context_list);
+                               list_entry(l, struct yaffs_linux_context,
+                                       context_list);
                        if (context_iterator->mount_id == mount_id)
                                found = 0;
                }
@@ -2393,8 +2309,6 @@ static struct file_system_type yaffs_fs_type = {
        .fs_flags = FS_REQUIRES_DEV,
 };
 
-#ifdef CONFIG_YAFFS_YAFFS2
-
 static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data,
                                          int silent)
 {
@@ -2416,13 +2330,14 @@ static struct file_system_type yaffs2_fs_type = {
        .kill_sb = kill_block_super,
        .fs_flags = FS_REQUIRES_DEV,
 };
-#endif /* CONFIG_YAFFS_YAFFS2 */
+
 
 static struct proc_dir_entry *my_proc_entry;
 
 static char *yaffs_dump_dev_part0(char *buf, struct yaffs_dev *dev)
 {
        struct yaffs_param *param = &dev->param;
+
        buf += sprintf(buf, "start_block........... %d\n", param->start_block);
        buf += sprintf(buf, "end_block............. %d\n", param->end_block);
        buf += sprintf(buf, "total_bytes_per_chunk. %d\n",
@@ -2476,7 +2391,7 @@ static char *yaffs_dump_dev_part1(char *buf, struct yaffs_dev *dev)
        buf += sprintf(buf, "n_gc_blocks........... %u\n", dev->n_gc_blocks);
        buf += sprintf(buf, "bg_gcs................ %u\n", dev->bg_gcs);
        buf +=
-           sprintf(buf, "n_retired_writes...... %u\n", dev->n_retired_writes);
+           sprintf(buf, "n_retried_writes...... %u\n", dev->n_retried_writes);
        buf +=
            sprintf(buf, "n_retired_blocks...... %u\n", dev->n_retired_blocks);
        buf += sprintf(buf, "n_ecc_fixed........... %u\n", dev->n_ecc_fixed);
@@ -2524,7 +2439,8 @@ static int yaffs_proc_read(char *page,
 
                mutex_lock(&yaffs_context_lock);
 
-               /* Locate and print the Nth entry.  Order N-squared but N is small. */
+               /* Locate and print the Nth entry.
+                * Order N-squared but N is small. */
                list_for_each(item, &yaffs_context_list) {
                        struct yaffs_linux_context *dc =
                            list_entry(item, struct yaffs_linux_context,
@@ -2542,7 +2458,7 @@ static int yaffs_proc_read(char *page,
                                buf = yaffs_dump_dev_part0(buf, dev);
                        } else {
                                buf = yaffs_dump_dev_part1(buf, dev);
-                        }
+                       }
 
                        break;
                }
@@ -2553,149 +2469,6 @@ static int yaffs_proc_read(char *page,
 }
 
 
-/**
- * Set the verbosity of the warnings and error messages.
- *
- * Note that the names can only be a..z or _ with the current code.
- */
-
-static struct {
-       char *mask_name;
-       unsigned mask_bitfield;
-} mask_flags[] = {
-       {"allocate", YAFFS_TRACE_ALLOCATE}, 
-       {"always", YAFFS_TRACE_ALWAYS},
-       {"background", YAFFS_TRACE_BACKGROUND},
-       {"bad_blocks", YAFFS_TRACE_BAD_BLOCKS},
-       {"buffers", YAFFS_TRACE_BUFFERS},
-       {"bug", YAFFS_TRACE_BUG},
-       {"checkpt", YAFFS_TRACE_CHECKPOINT},
-       {"deletion", YAFFS_TRACE_DELETION},
-       {"erase", YAFFS_TRACE_ERASE},
-       {"error", YAFFS_TRACE_ERROR},
-       {"gc_detail", YAFFS_TRACE_GC_DETAIL},
-       {"gc", YAFFS_TRACE_GC},
-       {"lock", YAFFS_TRACE_LOCK},
-       {"mtd", YAFFS_TRACE_MTD},
-       {"nandaccess", YAFFS_TRACE_NANDACCESS},
-       {"os", YAFFS_TRACE_OS},
-       {"scan_debug", YAFFS_TRACE_SCAN_DEBUG},
-       {"scan", YAFFS_TRACE_SCAN},
-       {"mount", YAFFS_TRACE_MOUNT},
-       {"tracing", YAFFS_TRACE_TRACING},
-       {"sync", YAFFS_TRACE_SYNC},
-       {"write", YAFFS_TRACE_WRITE},
-       {"verify", YAFFS_TRACE_VERIFY},
-       {"verify_nand", YAFFS_TRACE_VERIFY_NAND},
-       {"verify_full", YAFFS_TRACE_VERIFY_FULL},
-       {"verify_all", YAFFS_TRACE_VERIFY_ALL},
-       {"all", 0xffffffff},
-       {"none", 0},
-       {NULL, 0},
-};
-
-#define MAX_MASK_NAME_LENGTH 40
-static int yaffs_proc_write_trace_options(struct file *file, const char *buf,
-                                         unsigned long count, void *data)
-{
-       unsigned rg = 0, mask_bitfield;
-       char *end;
-       char *mask_name;
-       const char *x;
-       char substring[MAX_MASK_NAME_LENGTH + 1];
-       int i;
-       int done = 0;
-       int add, len = 0;
-       int pos = 0;
-
-       rg = yaffs_trace_mask;
-
-       while (!done && (pos < count)) {
-               done = 1;
-               while ((pos < count) && isspace(buf[pos]))
-                       pos++;
-
-               switch (buf[pos]) {
-               case '+':
-               case '-':
-               case '=':
-                       add = buf[pos];
-                       pos++;
-                       break;
-
-               default:
-                       add = ' ';
-                       break;
-               }
-               mask_name = NULL;
-
-               mask_bitfield = simple_strtoul(buf + pos, &end, 0);
-
-               if (end > buf + pos) {
-                       mask_name = "numeral";
-                       len = end - (buf + pos);
-                       pos += len;
-                       done = 0;
-               } else {
-                       for (x = buf + pos, i = 0;
-                            (*x == '_' || (*x >= 'a' && *x <= 'z')) &&
-                            i < MAX_MASK_NAME_LENGTH; x++, i++, pos++)
-                               substring[i] = *x;
-                       substring[i] = '\0';
-
-                       for (i = 0; mask_flags[i].mask_name != NULL; i++) {
-                               if (strcmp(substring, mask_flags[i].mask_name)
-                                   == 0) {
-                                       mask_name = mask_flags[i].mask_name;
-                                       mask_bitfield =
-                                           mask_flags[i].mask_bitfield;
-                                       done = 0;
-                                       break;
-                               }
-                       }
-               }
-
-               if (mask_name != NULL) {
-                       done = 0;
-                       switch (add) {
-                       case '-':
-                               rg &= ~mask_bitfield;
-                               break;
-                       case '+':
-                               rg |= mask_bitfield;
-                               break;
-                       case '=':
-                               rg = mask_bitfield;
-                               break;
-                       default:
-                               rg |= mask_bitfield;
-                               break;
-                       }
-               }
-       }
-
-       yaffs_trace_mask = rg | YAFFS_TRACE_ALWAYS;
-
-       printk(KERN_DEBUG "new trace = 0x%08X\n", yaffs_trace_mask);
-
-       if (rg & YAFFS_TRACE_ALWAYS) {
-               for (i = 0; mask_flags[i].mask_name != NULL; i++) {
-                       char flag;
-                       flag = ((rg & mask_flags[i].mask_bitfield) ==
-                               mask_flags[i].mask_bitfield) ? '+' : '-';
-                       printk(KERN_DEBUG "%c%s\n", flag,
-                              mask_flags[i].mask_name);
-               }
-       }
-
-       return count;
-}
-
-static int yaffs_proc_write(struct file *file, const char *buf,
-                           unsigned long count, void *data)
-{
-       return yaffs_proc_write_trace_options(file, buf, count, data);
-}
 
 /* Stuff to handle installation of file systems */
 struct file_system_to_install {
@@ -2717,24 +2490,19 @@ static int __init init_yaffs_fs(void)
        yaffs_trace(YAFFS_TRACE_ALWAYS,
                "yaffs built " __DATE__ " " __TIME__ " Installing.");
 
-#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED
-       yaffs_trace(YAFFS_TRACE_ALWAYS,
-               "\n\nYAFFS-WARNING CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED selected.\n\n\n");
-#endif
-
        mutex_init(&yaffs_context_lock);
 
        /* Install the proc_fs entries */
        my_proc_entry = create_proc_entry("yaffs",
-                                         S_IRUGO | S_IFREG, YPROC_ROOT);
+                                         S_IRUGO | S_IFREG, NULL);
 
        if (my_proc_entry) {
-               my_proc_entry->write_proc = yaffs_proc_write;
+               my_proc_entry->write_proc = NULL;
                my_proc_entry->read_proc = yaffs_proc_read;
                my_proc_entry->data = NULL;
        } else {
                return -ENOMEM;
-        }
+       }
 
 
        /* Now add the file system entries */
@@ -2772,7 +2540,7 @@ static void __exit exit_yaffs_fs(void)
        yaffs_trace(YAFFS_TRACE_ALWAYS,
                "yaffs built " __DATE__ " " __TIME__ " removing.");
 
-       remove_proc_entry("yaffs", YPROC_ROOT);
+       remove_proc_entry("yaffs", NULL);
 
        fsinst = fs_to_install;
 
@@ -2786,8 +2554,8 @@ static void __exit exit_yaffs_fs(void)
 }
 
 module_init(init_yaffs_fs)
-    module_exit(exit_yaffs_fs)
+module_exit(exit_yaffs_fs)
 
-    MODULE_DESCRIPTION("YAFFS2 - a NAND specific flash file system");
-MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002-2010");
+MODULE_DESCRIPTION("YAFFS2 - a NAND specific flash file system");
+MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002-2011");
 MODULE_LICENSE("GPL");
index c879f57f921116e14243c87692ee079aaf7737da..da6a40ff96f26ff8def4e0dfd7f2525966d4c7c5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -24,29 +24,25 @@ int yaffs1_scan(struct yaffs_dev *dev)
        struct yaffs_ext_tags tags;
        int blk;
        int result;
-
        int chunk;
        int c;
        int deleted;
        enum yaffs_block_state state;
-       struct yaffs_obj *hard_list = NULL;
+       LIST_HEAD(hard_list);
        struct yaffs_block_info *bi;
        u32 seq_number;
        struct yaffs_obj_hdr *oh;
        struct yaffs_obj *in;
        struct yaffs_obj *parent;
-
        int alloc_failed = 0;
-
        struct yaffs_shadow_fixer *shadow_fixers = NULL;
-
        u8 *chunk_data;
 
        yaffs_trace(YAFFS_TRACE_SCAN,
                "yaffs1_scan starts  intstartblk %d intendblk %d...",
                dev->internal_start_block, dev->internal_end_block);
 
-       chunk_data = yaffs_get_temp_buffer(dev, __LINE__);
+       chunk_data = yaffs_get_temp_buffer(dev);
 
        dev->seq_number = YAFFS_LOWEST_SEQUENCE_NUMBER;
 
@@ -93,8 +89,9 @@ int yaffs1_scan(struct yaffs_dev *dev)
                deleted = 0;
 
                /* For each chunk in each block that needs scanning.... */
-               for (c = 0; !alloc_failed && c < dev->param.chunks_per_block &&
-                    state == YAFFS_BLOCK_STATE_NEEDS_SCANNING; c++) {
+               for (c = 0;
+                       !alloc_failed && c < dev->param.chunks_per_block &&
+                       state == YAFFS_BLOCK_STATE_NEEDS_SCAN; c++) {
                        /* Read the tags and decide what to do */
                        chunk = blk * dev->param.chunks_per_block + c;
 
@@ -103,8 +100,8 @@ int yaffs1_scan(struct yaffs_dev *dev)
 
                        /* Let's have a good look at this chunk... */
 
-                       if (tags.ecc_result == YAFFS_ECC_RESULT_UNFIXED
-                           || tags.is_deleted) {
+                       if (tags.ecc_result == YAFFS_ECC_RESULT_UNFIXED ||
+                           tags.is_deleted) {
                                /* YAFFS1 only...
                                 * A deleted chunk
                                 */
@@ -117,11 +114,12 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                 */
 
                                if (c == 0) {
-                                       /* We're looking at the first chunk in the block so the block is unused */
+                                       /* We're looking at the first chunk in
+                                        *the block so the block is unused */
                                        state = YAFFS_BLOCK_STATE_EMPTY;
                                        dev->n_erased_blocks++;
                                } else {
-                                       /* this is the block being allocated from */
+                                       /* this is the block being allocated */
                                        yaffs_trace(YAFFS_TRACE_SCAN,
                                                " Allocating from %d %d",
                                                blk, c);
@@ -129,7 +127,6 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                        dev->alloc_block = blk;
                                        dev->alloc_page = c;
                                        dev->alloc_block_finder = blk;
-                                       /* Set block finder here to encourage the allocator to go forth from here. */
 
                                }
 
@@ -143,10 +140,10 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                bi->pages_in_use++;
 
                                in = yaffs_find_or_create_by_number(dev,
-                                                                   tags.obj_id,
-                                                                   YAFFS_OBJECT_TYPE_FILE);
-                               /* PutChunkIntoFile checks for a clash (two data chunks with
-                                * the same chunk_id).
+                                                       tags.obj_id,
+                                                       YAFFS_OBJECT_TYPE_FILE);
+                               /* PutChunkIntoFile checks for a clash
+                                * (two data chunks with the same chunk_id).
                                 */
 
                                if (!in)
@@ -159,14 +156,14 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                }
 
                                endpos =
-                                   (tags.chunk_id -
-                                    1) * dev->data_bytes_per_chunk +
+                                   (tags.chunk_id - 1) *
+                                   dev->data_bytes_per_chunk +
                                    tags.n_bytes;
-                               if (in
-                                   && in->variant_type ==
-                                   YAFFS_OBJECT_TYPE_FILE
-                                   && in->variant.file_variant.scanned_size <
-                                   endpos) {
+                               if (in &&
+                                   in->variant_type ==
+                                    YAFFS_OBJECT_TYPE_FILE &&
+                                   in->variant.file_variant.scanned_size <
+                                     endpos) {
                                        in->variant.file_variant.scanned_size =
                                            endpos;
                                        if (!dev->param.use_header_file_size) {
@@ -179,7 +176,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                }
                        } else {
                                /* chunk_id == 0, so it is an ObjectHeader.
-                                * Thus, we read in the object header and make the object
+                                * Make the object
                                 */
                                yaffs_set_chunk_bit(dev, blk, c);
                                bi->pages_in_use++;
@@ -193,18 +190,19 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                in = yaffs_find_by_number(dev, tags.obj_id);
                                if (in && in->variant_type != oh->type) {
                                        /* This should not happen, but somehow
-                                        * Wev'e ended up with an obj_id that has been reused but not yet
-                                        * deleted, and worse still it has changed type. Delete the old object.
+                                        * Wev'e ended up with an obj_id that
+                                        * has been reused but not yet deleted,
+                                        * and worse still it has changed type.
+                                        * Delete the old object.
                                         */
 
                                        yaffs_del_obj(in);
-
-                                       in = 0;
+                                       in = NULL;
                                }
 
                                in = yaffs_find_or_create_by_number(dev,
-                                                                   tags.obj_id,
-                                                                   oh->type);
+                                                               tags.obj_id,
+                                                               oh->type);
 
                                if (!in)
                                        alloc_failed = 1;
@@ -232,7 +230,9 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                }
 
                                if (in && in->valid) {
-                                       /* We have already filled this one. We have a duplicate and need to resolve it. */
+                                       /* We have already filled this one.
+                                        * We have a duplicate and need to
+                                        * resolve it. */
 
                                        unsigned existing_serial = in->serial;
                                        unsigned new_serial =
@@ -240,13 +240,15 @@ int yaffs1_scan(struct yaffs_dev *dev)
 
                                        if (((existing_serial + 1) & 3) ==
                                            new_serial) {
-                                               /* Use new one - destroy the exisiting one */
+                                               /* Use new one - destroy the
+                                                * exisiting one */
                                                yaffs_chunk_del(dev,
                                                                in->hdr_chunk,
                                                                1, __LINE__);
                                                in->valid = 0;
                                        } else {
-                                               /* Use existing - destroy this one. */
+                                               /* Use existing - destroy
+                                                * this one. */
                                                yaffs_chunk_del(dev, chunk, 1,
                                                                __LINE__);
                                        }
@@ -256,7 +258,8 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                    (tags.obj_id == YAFFS_OBJECTID_ROOT ||
                                     tags.obj_id ==
                                     YAFFS_OBJECTID_LOSTNFOUND)) {
-                                       /* We only load some info, don't fiddle with directory structure */
+                                       /* We only load some info, don't fiddle
+                                        * with directory structure */
                                        in->valid = 1;
                                        in->variant_type = oh->type;
 
@@ -295,12 +298,14 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                                parent->variant_type =
                                                    YAFFS_OBJECT_TYPE_DIRECTORY;
                                                INIT_LIST_HEAD(&parent->
-                                                              variant.dir_variant.children);
-                                       } else if (!parent
-                                                  || parent->variant_type !=
-                                                  YAFFS_OBJECT_TYPE_DIRECTORY) {
-                                               /* Hoosterman, another problem....
-                                                * We're trying to use a non-directory as a directory
+                                                       variant.dir_variant.
+                                                       children);
+                                       } else if (!parent ||
+                                               parent->variant_type !=
+                                               YAFFS_OBJECT_TYPE_DIRECTORY) {
+                                               /* Hoosterman, a problem....
+                                                * We're trying to use a
+                                                * non-directory as a directory
                                                 */
 
                                                yaffs_trace(YAFFS_TRACE_ERROR,
@@ -311,19 +316,6 @@ int yaffs1_scan(struct yaffs_dev *dev)
 
                                        yaffs_add_obj_to_dir(parent, in);
 
-                                       if (0 && (parent == dev->del_dir ||
-                                                 parent ==
-                                                 dev->unlinked_dir)) {
-                                               in->deleted = 1;        /* If it is unlinked at start up then it wants deleting */
-                                               dev->n_deleted_files++;
-                                       }
-                                       /* Note re hardlinks.
-                                        * Since we might scan a hardlink before its equivalent object is scanned
-                                        * we put them all in a list.
-                                        * After scanning is complete, we should have all the objects, so we run through this
-                                        * list and fix up all the chains.
-                                        */
-
                                        switch (in->variant_type) {
                                        case YAFFS_OBJECT_TYPE_UNKNOWN:
                                                /* Todo got a problem */
@@ -333,7 +325,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                                    use_header_file_size)
 
                                                        in->variant.
-                                                           file_variant.file_size
+                                                        file_variant.file_size
                                                            = oh->file_size;
 
                                                break;
@@ -341,10 +333,8 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                                in->variant.
                                                    hardlink_variant.equiv_id =
                                                    oh->equiv_id;
-                                               in->hard_links.next =
-                                                   (struct list_head *)
-                                                   hard_list;
-                                               hard_list = in;
+                                               list_add(&in->hard_links,
+                                                               &hard_list);
                                                break;
                                        case YAFFS_OBJECT_TYPE_DIRECTORY:
                                                /* Do nothing */
@@ -361,18 +351,19 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                                        alloc_failed = 1;
                                                break;
                                        }
-
                                }
                        }
                }
 
-               if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) {
-                       /* If we got this far while scanning, then the block is fully allocated. */
+               if (state == YAFFS_BLOCK_STATE_NEEDS_SCAN) {
+                       /* If we got this far while scanning,
+                        * then the block is fully allocated. */
                        state = YAFFS_BLOCK_STATE_FULL;
                }
 
                if (state == YAFFS_BLOCK_STATE_ALLOCATING) {
-                       /* If the block was partially allocated then treat it as fully allocated. */
+                       /* If the block was partially allocated then
+                        * treat it as fully allocated. */
                        state = YAFFS_BLOCK_STATE_FULL;
                        dev->alloc_block = -1;
                }
@@ -382,21 +373,22 @@ int yaffs1_scan(struct yaffs_dev *dev)
                /* Now let's see if it was dirty */
                if (bi->pages_in_use == 0 &&
                    !bi->has_shrink_hdr &&
-                   bi->block_state == YAFFS_BLOCK_STATE_FULL) {
+                   bi->block_state == YAFFS_BLOCK_STATE_FULL)
                        yaffs_block_became_dirty(dev, blk);
-               }
-
        }
 
        /* Ok, we've done all the scanning.
         * Fix up the hard link chains.
-        * We should now have scanned all the objects, now it's time to add these
-        * hardlinks.
+        * We should now have scanned all the objects, now it's time to add
+        * these hardlinks.
         */
 
-       yaffs_link_fixup(dev, hard_list);
+       yaffs_link_fixup(dev, &hard_list);
 
-       /* Fix up any shadowed objects */
+       /*
+        * Fix up any shadowed objects.
+        * There should not be more than one of these.
+        */
        {
                struct yaffs_shadow_fixer *fixer;
                struct yaffs_obj *obj;
@@ -404,8 +396,9 @@ int yaffs1_scan(struct yaffs_dev *dev)
                while (shadow_fixers) {
                        fixer = shadow_fixers;
                        shadow_fixers = fixer->next;
-                       /* Complete the rename transaction by deleting the shadowed object
-                        * then setting the object header to unshadowed.
+                       /* Complete the rename transaction by deleting the
+                        * shadowed object then setting the object header
+                        to unshadowed.
                         */
                        obj = yaffs_find_by_number(dev, fixer->shadowed_id);
                        if (obj)
@@ -420,7 +413,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
                }
        }
 
-       yaffs_release_temp_buffer(dev, chunk_data, __LINE__);
+       yaffs_release_temp_buffer(dev, chunk_data);
 
        if (alloc_failed)
                return YAFFS_FAIL;
index db23e04973ba981f3153d80d7a2dbd0ac5d2b61f..97e2fdd08a5d6d6c72c566ed94fb0335df37a883 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 339f47fc6ac1cddcce1eddfdf186d3c9870f74f3..5761e960e646c816c0628a2c7b64470bb55c04f1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -20,6 +20,7 @@
 #include "yaffs_getblockinfo.h"
 #include "yaffs_verify.h"
 #include "yaffs_attribs.h"
+#include "yaffs_summary.h"
 
 /*
  * Checkpoints are really no benefit on very small partitions.
@@ -28,7 +29,6 @@
  * the partition is at least this big.
  */
 #define YAFFS_CHECKPOINT_MIN_BLOCKS 60
-
 #define YAFFS_SMALL_HOLE_THRESHOLD 4
 
 /*
@@ -55,7 +55,8 @@ void yaffs_calc_oldest_dirty_seq(struct yaffs_dev *dev)
        for (i = dev->internal_start_block; i <= dev->internal_end_block; i++) {
                if (b->block_state == YAFFS_BLOCK_STATE_FULL &&
                    (b->pages_in_use - b->soft_del_pages) <
-                   dev->param.chunks_per_block && b->seq_number < seq) {
+                   dev->param.chunks_per_block &&
+                   b->seq_number < seq) {
                        seq = b->seq_number;
                        block_no = i;
                }
@@ -66,7 +67,6 @@ void yaffs_calc_oldest_dirty_seq(struct yaffs_dev *dev)
                dev->oldest_dirty_seq = seq;
                dev->oldest_dirty_block = block_no;
        }
-
 }
 
 void yaffs2_find_oldest_dirty_seq(struct yaffs_dev *dev)
@@ -81,7 +81,7 @@ void yaffs2_find_oldest_dirty_seq(struct yaffs_dev *dev)
 /*
  * yaffs_clear_oldest_dirty_seq()
  * Called when a block is erased or marked bad. (ie. when its seq_number
- * becomes invalid). If the value matches the oldest then we clear 
+ * becomes invalid). If the value matches the oldest then we clear
  * dev->oldest_dirty_seq to force its recomputation.
  */
 void yaffs2_clear_oldest_dirty_seq(struct yaffs_dev *dev,
@@ -127,8 +127,8 @@ int yaffs_block_ok_for_gc(struct yaffs_dev *dev, struct yaffs_block_info *bi)
 
        yaffs2_find_oldest_dirty_seq(dev);
 
-       /* Can't do gc of this block if there are any blocks older than this one that have
-        * discarded pages.
+       /* Can't do gc of this block if there are any blocks older than this
+        * one that have discarded pages.
         */
        return (bi->seq_number <= dev->oldest_dirty_seq);
 }
@@ -138,13 +138,11 @@ int yaffs_block_ok_for_gc(struct yaffs_dev *dev, struct yaffs_block_info *bi)
  * periodically finds the oldest full block by sequence number for refreshing.
  * Only for yaffs2.
  */
-u32 yaffs2_find_refresh_block(struct yaffs_dev * dev)
+u32 yaffs2_find_refresh_block(struct yaffs_dev *dev)
 {
        u32 b;
-
        u32 oldest = 0;
        u32 oldest_seq = 0;
-
        struct yaffs_block_info *bi;
 
        if (!dev->param.is_yaffs2)
@@ -210,29 +208,29 @@ int yaffs2_checkpt_required(struct yaffs_dev *dev)
 int yaffs_calc_checkpt_blocks_required(struct yaffs_dev *dev)
 {
        int retval;
+       int n_bytes = 0;
+       int n_blocks;
+       int dev_blocks;
 
        if (!dev->param.is_yaffs2)
                return 0;
 
        if (!dev->checkpoint_blocks_required && yaffs2_checkpt_required(dev)) {
                /* Not a valid value so recalculate */
-               int n_bytes = 0;
-               int n_blocks;
-               int dev_blocks =
-                   (dev->param.end_block - dev->param.start_block + 1);
-
+               dev_blocks = dev->param.end_block - dev->param.start_block + 1;
                n_bytes += sizeof(struct yaffs_checkpt_validity);
                n_bytes += sizeof(struct yaffs_checkpt_dev);
                n_bytes += dev_blocks * sizeof(struct yaffs_block_info);
                n_bytes += dev_blocks * dev->chunk_bit_stride;
                n_bytes +=
-                   (sizeof(struct yaffs_checkpt_obj) +
-                    sizeof(u32)) * (dev->n_obj);
-               n_bytes += (dev->tnode_size + sizeof(u32)) * (dev->n_tnodes);
+                   (sizeof(struct yaffs_checkpt_obj) + sizeof(u32)) *
+                   dev->n_obj;
+               n_bytes += (dev->tnode_size + sizeof(u32)) * dev->n_tnodes;
                n_bytes += sizeof(struct yaffs_checkpt_validity);
                n_bytes += sizeof(u32); /* checksum */
 
-               /* Round up and add 2 blocks to allow for some bad blocks, so add 3 */
+               /* Round up and add 2 blocks to allow for some bad blocks,
+                * so add 3 */
 
                n_blocks =
                    (n_bytes /
@@ -312,9 +310,7 @@ static int yaffs2_wr_checkpt_dev(struct yaffs_dev *dev)
 {
        struct yaffs_checkpt_dev cp;
        u32 n_bytes;
-       u32 n_blocks =
-           (dev->internal_end_block - dev->internal_start_block + 1);
-
+       u32 n_blocks = dev->internal_end_block - dev->internal_start_block + 1;
        int ok;
 
        /* Write device runtime values */
@@ -322,22 +318,20 @@ static int yaffs2_wr_checkpt_dev(struct yaffs_dev *dev)
        cp.struct_type = sizeof(cp);
 
        ok = (yaffs2_checkpt_wr(dev, &cp, sizeof(cp)) == sizeof(cp));
+       if (!ok)
+               return 0;
 
        /* Write block info */
-       if (ok) {
-               n_bytes = n_blocks * sizeof(struct yaffs_block_info);
-               ok = (yaffs2_checkpt_wr(dev, dev->block_info, n_bytes) ==
-                     n_bytes);
-       }
+       n_bytes = n_blocks * sizeof(struct yaffs_block_info);
+       ok = (yaffs2_checkpt_wr(dev, dev->block_info, n_bytes) == n_bytes);
+       if (!ok)
+               return 0;
 
        /* Write chunk bits */
-       if (ok) {
-               n_bytes = n_blocks * dev->chunk_bit_stride;
-               ok = (yaffs2_checkpt_wr(dev, dev->chunk_bits, n_bytes) ==
-                     n_bytes);
-       }
-       return ok ? 1 : 0;
+       n_bytes = n_blocks * dev->chunk_bit_stride;
+       ok = (yaffs2_checkpt_wr(dev, dev->chunk_bits, n_bytes) == n_bytes);
 
+       return ok ? 1 : 0;
 }
 
 static int yaffs2_rd_checkpt_dev(struct yaffs_dev *dev)
@@ -346,7 +340,6 @@ static int yaffs2_rd_checkpt_dev(struct yaffs_dev *dev)
        u32 n_bytes;
        u32 n_blocks =
            (dev->internal_end_block - dev->internal_start_block + 1);
-
        int ok;
 
        ok = (yaffs2_checkpt_rd(dev, &cp, sizeof(cp)) == sizeof(cp));
@@ -364,6 +357,7 @@ static int yaffs2_rd_checkpt_dev(struct yaffs_dev *dev)
 
        if (!ok)
                return 0;
+
        n_bytes = n_blocks * dev->chunk_bit_stride;
 
        ok = (yaffs2_checkpt_rd(dev, dev->chunk_bits, n_bytes) == n_bytes);
@@ -374,7 +368,6 @@ static int yaffs2_rd_checkpt_dev(struct yaffs_dev *dev)
 static void yaffs2_obj_checkpt_obj(struct yaffs_checkpt_obj *cp,
                                   struct yaffs_obj *obj)
 {
-
        cp->obj_id = obj->obj_id;
        cp->parent_id = (obj->parent) ? obj->parent->obj_id : 0;
        cp->hdr_chunk = obj->hdr_chunk;
@@ -394,10 +387,9 @@ static void yaffs2_obj_checkpt_obj(struct yaffs_checkpt_obj *cp,
                cp->size_or_equiv_obj = obj->variant.hardlink_variant.equiv_id;
 }
 
-static int taffs2_checkpt_obj_to_obj(struct yaffs_obj *obj,
+static int yaffs2_checkpt_obj_to_obj(struct yaffs_obj *obj,
                                     struct yaffs_checkpt_obj *cp)
 {
-
        struct yaffs_obj *parent;
 
        if (obj->variant_type != cp->variant_type) {
@@ -412,8 +404,8 @@ static int taffs2_checkpt_obj_to_obj(struct yaffs_obj *obj,
 
        if (cp->parent_id)
                parent = yaffs_find_or_create_by_number(obj->my_dev,
-                                                       cp->parent_id,
-                                                       YAFFS_OBJECT_TYPE_DIRECTORY);
+                                               cp->parent_id,
+                                               YAFFS_OBJECT_TYPE_DIRECTORY);
        else
                parent = NULL;
 
@@ -457,39 +449,33 @@ static int yaffs2_checkpt_tnode_worker(struct yaffs_obj *in,
        int i;
        struct yaffs_dev *dev = in->my_dev;
        int ok = 1;
-
-       if (tn) {
-               if (level > 0) {
-
-                       for (i = 0; i < YAFFS_NTNODES_INTERNAL && ok; i++) {
-                               if (tn->internal[i]) {
-                                       ok = yaffs2_checkpt_tnode_worker(in,
-                                                                        tn->
-                                                                        internal
-                                                                        [i],
-                                                                        level -
-                                                                        1,
-                                                                        (chunk_offset
-                                                                         <<
-                                                                         YAFFS_TNODES_INTERNAL_BITS)
-                                                                        + i);
-                               }
-                       }
-               } else if (level == 0) {
-                       u32 base_offset =
-                           chunk_offset << YAFFS_TNODES_LEVEL0_BITS;
-                       ok = (yaffs2_checkpt_wr
-                             (dev, &base_offset,
-                              sizeof(base_offset)) == sizeof(base_offset));
-                       if (ok)
-                               ok = (yaffs2_checkpt_wr
-                                     (dev, tn,
-                                      dev->tnode_size) == dev->tnode_size);
+       u32 base_offset;
+
+       if (!tn)
+               return 1;
+
+       if (level > 0) {
+               for (i = 0; i < YAFFS_NTNODES_INTERNAL && ok; i++) {
+                       if (!tn->internal[i])
+                               continue;
+                       ok = yaffs2_checkpt_tnode_worker(in,
+                                tn->internal[i],
+                                level - 1,
+                                (chunk_offset <<
+                                 YAFFS_TNODES_INTERNAL_BITS) + i);
                }
+               return ok;
        }
 
-       return ok;
+       /* Level 0 tnode */
+       base_offset = chunk_offset << YAFFS_TNODES_LEVEL0_BITS;
+       ok = (yaffs2_checkpt_wr(dev, &base_offset, sizeof(base_offset)) ==
+                       sizeof(base_offset));
+       if (ok)
+               ok = (yaffs2_checkpt_wr(dev, tn, dev->tnode_size) ==
+                       dev->tnode_size);
 
+       return ok;
 }
 
 static int yaffs2_wr_checkpt_tnodes(struct yaffs_obj *obj)
@@ -497,16 +483,16 @@ static int yaffs2_wr_checkpt_tnodes(struct yaffs_obj *obj)
        u32 end_marker = ~0;
        int ok = 1;
 
-       if (obj->variant_type == YAFFS_OBJECT_TYPE_FILE) {
-               ok = yaffs2_checkpt_tnode_worker(obj,
-                                                obj->variant.file_variant.top,
-                                                obj->variant.file_variant.
-                                                top_level, 0);
-               if (ok)
-                       ok = (yaffs2_checkpt_wr
-                             (obj->my_dev, &end_marker,
-                              sizeof(end_marker)) == sizeof(end_marker));
-       }
+       if (obj->variant_type != YAFFS_OBJECT_TYPE_FILE)
+               return ok;
+
+       ok = yaffs2_checkpt_tnode_worker(obj,
+                                        obj->variant.file_variant.top,
+                                        obj->variant.file_variant.
+                                        top_level, 0);
+       if (ok)
+               ok = (yaffs2_checkpt_wr(obj->my_dev, &end_marker,
+                               sizeof(end_marker)) == sizeof(end_marker));
 
        return ok ? 1 : 0;
 }
@@ -528,12 +514,11 @@ static int yaffs2_rd_checkpt_tnodes(struct yaffs_obj *obj)
                /* Read level 0 tnode */
 
                tn = yaffs_get_tnode(dev);
-               if (tn) {
+               if (tn)
                        ok = (yaffs2_checkpt_rd(dev, tn, dev->tnode_size) ==
-                             dev->tnode_size);
-               } else {
+                               dev->tnode_size);
+               else
                        ok = 0;
-                }
 
                if (tn && ok)
                        ok = yaffs_add_find_tnode_0(dev,
@@ -544,7 +529,6 @@ static int yaffs2_rd_checkpt_tnodes(struct yaffs_obj *obj)
                        ok = (yaffs2_checkpt_rd
                              (dev, &base_chunk,
                               sizeof(base_chunk)) == sizeof(base_chunk));
-
        }
 
        yaffs_trace(YAFFS_TRACE_CHECKPOINT,
@@ -569,7 +553,7 @@ static int yaffs2_wr_checkpt_objs(struct yaffs_dev *dev)
        for (i = 0; ok && i < YAFFS_NOBJECT_BUCKETS; i++) {
                list_for_each(lh, &dev->obj_bucket[i].list) {
                        obj = list_entry(lh, struct yaffs_obj, hash_link);
-                        if (!obj->defered_free) {
+                       if (!obj->defered_free) {
                                yaffs2_obj_checkpt_obj(&cp, obj);
                                cp.struct_type = sizeof(cp);
 
@@ -579,18 +563,18 @@ static int yaffs2_wr_checkpt_objs(struct yaffs_dev *dev)
                                        cp.variant_type, cp.hdr_chunk, obj);
 
                                ok = (yaffs2_checkpt_wr(dev, &cp,
-                                              sizeof(cp)) == sizeof(cp));
+                                               sizeof(cp)) == sizeof(cp));
 
                                if (ok &&
-                                       obj->variant_type ==
-                                               YAFFS_OBJECT_TYPE_FILE)
-                                        ok = yaffs2_wr_checkpt_tnodes(obj);
+                                       obj->variant_type ==
+                                       YAFFS_OBJECT_TYPE_FILE)
+                                       ok = yaffs2_wr_checkpt_tnodes(obj);
                        }
                }
        }
 
        /* Dump end of list */
-       memset(&cp, 0xFF, sizeof(struct yaffs_checkpt_obj));
+       memset(&cp, 0xff, sizeof(struct yaffs_checkpt_obj));
        cp.struct_type = sizeof(cp);
 
        if (ok)
@@ -605,7 +589,8 @@ static int yaffs2_rd_checkpt_objs(struct yaffs_dev *dev)
        struct yaffs_checkpt_obj cp;
        int ok = 1;
        int done = 0;
-       struct yaffs_obj *hard_list = NULL;
+       LIST_HEAD(hard_list);
+
 
        while (ok && !done) {
                ok = (yaffs2_checkpt_rd(dev, &cp, sizeof(cp)) == sizeof(cp));
@@ -628,25 +613,24 @@ static int yaffs2_rd_checkpt_objs(struct yaffs_dev *dev)
                            yaffs_find_or_create_by_number(dev, cp.obj_id,
                                                           cp.variant_type);
                        if (obj) {
-                               ok = taffs2_checkpt_obj_to_obj(obj, &cp);
+                               ok = yaffs2_checkpt_obj_to_obj(obj, &cp);
                                if (!ok)
                                        break;
-                               if (obj->variant_type == YAFFS_OBJECT_TYPE_FILE) {
+                               if (obj->variant_type ==
+                                       YAFFS_OBJECT_TYPE_FILE) {
                                        ok = yaffs2_rd_checkpt_tnodes(obj);
                                } else if (obj->variant_type ==
-                                          YAFFS_OBJECT_TYPE_HARDLINK) {
-                                       obj->hard_links.next =
-                                           (struct list_head *)hard_list;
-                                       hard_list = obj;
+                                       YAFFS_OBJECT_TYPE_HARDLINK) {
+                                       list_add(&obj->hard_links, &hard_list);
                                }
                        } else {
                                ok = 0;
-                        }
+                       }
                }
        }
 
        if (ok)
-               yaffs_link_fixup(dev, hard_list);
+               yaffs_link_fixup(dev, &hard_list);
 
        return ok ? 1 : 0;
 }
@@ -659,7 +643,7 @@ static int yaffs2_wr_checkpt_sum(struct yaffs_dev *dev)
        yaffs2_get_checkpt_sum(dev, &checkpt_sum);
 
        ok = (yaffs2_checkpt_wr(dev, &checkpt_sum, sizeof(checkpt_sum)) ==
-             sizeof(checkpt_sum));
+               sizeof(checkpt_sum));
 
        if (!ok)
                return 0;
@@ -676,7 +660,7 @@ static int yaffs2_rd_checkpt_sum(struct yaffs_dev *dev)
        yaffs2_get_checkpt_sum(dev, &checkpt_sum0);
 
        ok = (yaffs2_checkpt_rd(dev, &checkpt_sum1, sizeof(checkpt_sum1)) ==
-             sizeof(checkpt_sum1));
+               sizeof(checkpt_sum1));
 
        if (!ok)
                return 0;
@@ -787,7 +771,6 @@ static int yaffs2_rd_checkpt_data(struct yaffs_dev *dev)
                dev->is_checkpointed = 0;
 
        return ok ? 1 : 0;
-
 }
 
 void yaffs2_checkpt_invalidate(struct yaffs_dev *dev)
@@ -802,7 +785,6 @@ void yaffs2_checkpt_invalidate(struct yaffs_dev *dev)
 
 int yaffs_checkpoint_save(struct yaffs_dev *dev)
 {
-
        yaffs_trace(YAFFS_TRACE_CHECKPOINT,
                "save entry: is_checkpointed %d",
                dev->is_checkpointed);
@@ -826,6 +808,7 @@ int yaffs_checkpoint_save(struct yaffs_dev *dev)
 int yaffs2_checkpt_restore(struct yaffs_dev *dev)
 {
        int retval;
+
        yaffs_trace(YAFFS_TRACE_CHECKPOINT,
                "restore entry: is_checkpointed %d",
                dev->is_checkpointed);
@@ -849,17 +832,15 @@ int yaffs2_handle_hole(struct yaffs_obj *obj, loff_t new_size)
 {
        /* if new_size > old_file_size.
         * We're going to be writing a hole.
-        * If the hole is small then write zeros otherwise write a start of hole marker.
+        * If the hole is small then write zeros otherwise write a start
+        * of hole marker.
         */
-
        loff_t old_file_size;
        int increase;
        int small_hole;
        int result = YAFFS_OK;
        struct yaffs_dev *dev = NULL;
-
        u8 *local_buffer = NULL;
-
        int small_increase_ok = 0;
 
        if (!obj)
@@ -888,7 +869,7 @@ int yaffs2_handle_hole(struct yaffs_obj *obj, loff_t new_size)
                small_hole = 0;
 
        if (small_hole)
-               local_buffer = yaffs_get_temp_buffer(dev, __LINE__);
+               local_buffer = yaffs_get_temp_buffer(dev);
 
        if (local_buffer) {
                /* fill hole with zero bytes */
@@ -910,12 +891,12 @@ int yaffs2_handle_hole(struct yaffs_obj *obj, loff_t new_size)
                                increase -= this_write;
                        } else {
                                small_increase_ok = 0;
-                        }
+                       }
                }
 
-               yaffs_release_temp_buffer(dev, local_buffer, __LINE__);
+               yaffs_release_temp_buffer(dev, local_buffer);
 
-               /* If we were out of space then reverse any chunks we've added */
+               /* If out of space then reverse any chunks we've added */
                if (!small_increase_ok)
                        yaffs_resize_file_down(obj, old_file_size);
        }
@@ -929,7 +910,6 @@ int yaffs2_handle_hole(struct yaffs_obj *obj, loff_t new_size)
        }
 
        return result;
-
 }
 
 struct yaffs_block_index {
@@ -943,44 +923,443 @@ static int yaffs2_ybicmp(const void *a, const void *b)
        int bseq = ((struct yaffs_block_index *)b)->seq;
        int ablock = ((struct yaffs_block_index *)a)->block;
        int bblock = ((struct yaffs_block_index *)b)->block;
+
        if (aseq == bseq)
                return ablock - bblock;
-       else
-               return aseq - bseq;
+
+       return aseq - bseq;
 }
 
-int yaffs2_scan_backwards(struct yaffs_dev *dev)
+static inline int yaffs2_scan_chunk(struct yaffs_dev *dev,
+               struct yaffs_block_info *bi,
+               int blk, int chunk_in_block,
+               int *found_chunks,
+               u8 *chunk_data,
+               struct list_head *hard_list,
+               int summary_available)
 {
+       struct yaffs_obj_hdr *oh;
+       struct yaffs_obj *in;
+       struct yaffs_obj *parent;
+       int equiv_id;
+       int file_size;
+       int is_shrink;
+       int is_unlinked;
        struct yaffs_ext_tags tags;
+       int result;
+       int alloc_failed = 0;
+       int chunk = blk * dev->param.chunks_per_block + chunk_in_block;
+       struct yaffs_file_var *file_var;
+       struct yaffs_hardlink_var *hl_var;
+       struct yaffs_symlink_var *sl_var;
+
+       if (summary_available) {
+               result = yaffs_summary_fetch(dev, &tags, chunk_in_block);
+               tags.seq_number = bi->seq_number;
+       }
+
+       if (!summary_available || tags.obj_id == 0) {
+               result = yaffs_rd_chunk_tags_nand(dev, chunk, NULL, &tags);
+               dev->tags_used++;
+       } else {
+               dev->summary_used++;
+       }
+
+       /* Let's have a good look at this chunk... */
+
+       if (!tags.chunk_used) {
+               /* An unassigned chunk in the block.
+                * If there are used chunks after this one, then
+                * it is a chunk that was skipped due to failing
+                * the erased check. Just skip it so that it can
+                * be deleted.
+                * But, more typically, We get here when this is
+                * an unallocated chunk and his means that
+                * either the block is empty or this is the one
+                * being allocated from
+                */
+
+               if (*found_chunks) {
+                       /* This is a chunk that was skipped due
+                        * to failing the erased check */
+               } else if (chunk_in_block == 0) {
+                       /* We're looking at the first chunk in
+                        * the block so the block is unused */
+                       bi->block_state = YAFFS_BLOCK_STATE_EMPTY;
+                       dev->n_erased_blocks++;
+               } else {
+                       if (bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN ||
+                           bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING) {
+                               if (dev->seq_number == bi->seq_number) {
+                                       /* Allocating from this block*/
+                                       yaffs_trace(YAFFS_TRACE_SCAN,
+                                           " Allocating from %d %d",
+                                           blk, chunk_in_block);
+
+                                       bi->block_state =
+                                               YAFFS_BLOCK_STATE_ALLOCATING;
+                                       dev->alloc_block = blk;
+                                       dev->alloc_page = chunk_in_block;
+                                       dev->alloc_block_finder = blk;
+                               } else {
+                                       /* This is a partially written block
+                                        * that is not the current
+                                        * allocation block.
+                                        */
+                                       yaffs_trace(YAFFS_TRACE_SCAN,
+                                               "Partially written block %d detected. gc will fix this.",
+                                               blk);
+                               }
+                       }
+               }
+
+               dev->n_free_chunks++;
+
+       } else if (tags.ecc_result ==
+               YAFFS_ECC_RESULT_UNFIXED) {
+               yaffs_trace(YAFFS_TRACE_SCAN,
+                       " Unfixed ECC in chunk(%d:%d), chunk ignored",
+                       blk, chunk_in_block);
+                       dev->n_free_chunks++;
+       } else if (tags.obj_id > YAFFS_MAX_OBJECT_ID ||
+                  tags.chunk_id > YAFFS_MAX_CHUNK_ID ||
+                  tags.obj_id == YAFFS_OBJECTID_SUMMARY ||
+                  (tags.chunk_id > 0 &&
+                    tags.n_bytes > dev->data_bytes_per_chunk) ||
+                  tags.seq_number != bi->seq_number) {
+               yaffs_trace(YAFFS_TRACE_SCAN,
+                       "Chunk (%d:%d) with bad tags:obj = %d, chunk_id = %d, n_bytes = %d, ignored",
+                       blk, chunk_in_block, tags.obj_id,
+                       tags.chunk_id, tags.n_bytes);
+               dev->n_free_chunks++;
+       } else if (tags.chunk_id > 0) {
+               /* chunk_id > 0 so it is a data chunk... */
+               unsigned int endpos;
+               u32 chunk_base = (tags.chunk_id - 1) *
+                                       dev->data_bytes_per_chunk;
+
+               *found_chunks = 1;
+
+               yaffs_set_chunk_bit(dev, blk, chunk_in_block);
+               bi->pages_in_use++;
+
+               in = yaffs_find_or_create_by_number(dev,
+                                       tags.obj_id,
+                                       YAFFS_OBJECT_TYPE_FILE);
+               if (!in)
+                       /* Out of memory */
+                       alloc_failed = 1;
+
+               if (in &&
+                   in->variant_type == YAFFS_OBJECT_TYPE_FILE &&
+                   chunk_base < in->variant.file_variant.shrink_size) {
+                       /* This has not been invalidated by
+                        * a resize */
+                       if (!yaffs_put_chunk_in_file(in, tags.chunk_id,
+                                                               chunk, -1))
+                               alloc_failed = 1;
+
+                       /* File size is calculated by looking at
+                        * the data chunks if we have not
+                        * seen an object header yet.
+                        * Stop this practice once we find an
+                        * object header.
+                        */
+                       endpos = chunk_base + tags.n_bytes;
+
+                       if (!in->valid &&
+                           in->variant.file_variant.scanned_size < endpos) {
+                               in->variant.file_variant.
+                                   scanned_size = endpos;
+                               in->variant.file_variant.
+                                   file_size = endpos;
+                       }
+               } else if (in) {
+                       /* This chunk has been invalidated by a
+                        * resize, or a past file deletion
+                        * so delete the chunk*/
+                       yaffs_chunk_del(dev, chunk, 1, __LINE__);
+               }
+       } else {
+               /* chunk_id == 0, so it is an ObjectHeader.
+                * Thus, we read in the object header and make
+                * the object
+                */
+               *found_chunks = 1;
+
+               yaffs_set_chunk_bit(dev, blk, chunk_in_block);
+               bi->pages_in_use++;
+
+               oh = NULL;
+               in = NULL;
+
+               if (tags.extra_available) {
+                       in = yaffs_find_or_create_by_number(dev,
+                                       tags.obj_id,
+                                       tags.extra_obj_type);
+                       if (!in)
+                               alloc_failed = 1;
+               }
+
+               if (!in ||
+                   (!in->valid && dev->param.disable_lazy_load) ||
+                   tags.extra_shadows ||
+                   (!in->valid && (tags.obj_id == YAFFS_OBJECTID_ROOT ||
+                                tags.obj_id == YAFFS_OBJECTID_LOSTNFOUND))) {
+
+                       /* If we don't have  valid info then we
+                        * need to read the chunk
+                        * TODO In future we can probably defer
+                        * reading the chunk and living with
+                        * invalid data until needed.
+                        */
+
+                       result = yaffs_rd_chunk_tags_nand(dev,
+                                                 chunk,
+                                                 chunk_data,
+                                                 NULL);
+
+                       oh = (struct yaffs_obj_hdr *)chunk_data;
+
+                       if (dev->param.inband_tags) {
+                               /* Fix up the header if they got
+                                * corrupted by inband tags */
+                               oh->shadows_obj =
+                                   oh->inband_shadowed_obj_id;
+                               oh->is_shrink =
+                                   oh->inband_is_shrink;
+                       }
+
+                       if (!in) {
+                               in = yaffs_find_or_create_by_number(dev,
+                                                       tags.obj_id, oh->type);
+                               if (!in)
+                                       alloc_failed = 1;
+                       }
+               }
+
+               if (!in) {
+                       /* TODO Hoosterman we have a problem! */
+                       yaffs_trace(YAFFS_TRACE_ERROR,
+                               "yaffs tragedy: Could not make object for object  %d at chunk %d during scan",
+                               tags.obj_id, chunk);
+                       return YAFFS_FAIL;
+               }
+
+               if (in->valid) {
+                       /* We have already filled this one.
+                        * We have a duplicate that will be
+                        * discarded, but we first have to suck
+                        * out resize info if it is a file.
+                        */
+                       if ((in->variant_type == YAFFS_OBJECT_TYPE_FILE) &&
+                               ((oh && oh->type == YAFFS_OBJECT_TYPE_FILE) ||
+                                (tags.extra_available &&
+                                 tags.extra_obj_type == YAFFS_OBJECT_TYPE_FILE)
+                               )) {
+                               u32 this_size = (oh) ?
+                                       oh->file_size :
+                                       tags.extra_length;
+                               u32 parent_obj_id = (oh) ?
+                                       oh->parent_obj_id :
+                                       tags.extra_parent_id;
+
+                               is_shrink = (oh) ?
+                                       oh->is_shrink :
+                                       tags.extra_is_shrink;
+
+                               /* If it is deleted (unlinked
+                                * at start also means deleted)
+                                * we treat the file size as
+                                * being zeroed at this point.
+                                */
+                               if (parent_obj_id == YAFFS_OBJECTID_DELETED ||
+                                   parent_obj_id == YAFFS_OBJECTID_UNLINKED) {
+                                       this_size = 0;
+                                       is_shrink = 1;
+                               }
+
+                               if (is_shrink &&
+                                   in->variant.file_variant.shrink_size >
+                                   this_size)
+                                       in->variant.file_variant.shrink_size =
+                                       this_size;
+
+                               if (is_shrink)
+                                       bi->has_shrink_hdr = 1;
+                       }
+                       /* Use existing - destroy this one. */
+                       yaffs_chunk_del(dev, chunk, 1, __LINE__);
+               }
+
+               if (!in->valid && in->variant_type !=
+                   (oh ? oh->type : tags.extra_obj_type))
+                       yaffs_trace(YAFFS_TRACE_ERROR,
+                               "yaffs tragedy: Bad object type, %d != %d, for object %d at chunk %d during scan",
+                               oh ? oh->type : tags.extra_obj_type,
+                               in->variant_type, tags.obj_id,
+                               chunk);
+
+               if (!in->valid &&
+                   (tags.obj_id == YAFFS_OBJECTID_ROOT ||
+                    tags.obj_id == YAFFS_OBJECTID_LOSTNFOUND)) {
+                       /* We only load some info, don't fiddle
+                        * with directory structure */
+                       in->valid = 1;
+
+                       if (oh) {
+                               in->yst_mode = oh->yst_mode;
+                               yaffs_load_attribs(in, oh);
+                               in->lazy_loaded = 0;
+                       } else {
+                               in->lazy_loaded = 1;
+                       }
+                       in->hdr_chunk = chunk;
+
+               } else if (!in->valid) {
+                       /* we need to load this info */
+                       in->valid = 1;
+                       in->hdr_chunk = chunk;
+                       if (oh) {
+                               in->variant_type = oh->type;
+                               in->yst_mode = oh->yst_mode;
+                               yaffs_load_attribs(in, oh);
+
+                               if (oh->shadows_obj > 0)
+                                       yaffs_handle_shadowed_obj(dev,
+                                            oh->shadows_obj, 1);
+
+                               yaffs_set_obj_name_from_oh(in, oh);
+                               parent = yaffs_find_or_create_by_number(dev,
+                                               oh->parent_obj_id,
+                                               YAFFS_OBJECT_TYPE_DIRECTORY);
+                               file_size = oh->file_size;
+                               is_shrink = oh->is_shrink;
+                               equiv_id = oh->equiv_id;
+                       } else {
+                               in->variant_type = tags.extra_obj_type;
+                               parent = yaffs_find_or_create_by_number(dev,
+                                               tags.extra_parent_id,
+                                               YAFFS_OBJECT_TYPE_DIRECTORY);
+                               file_size = tags.extra_length;
+                               is_shrink = tags.extra_is_shrink;
+                               equiv_id = tags.extra_equiv_id;
+                               in->lazy_loaded = 1;
+                       }
+                       in->dirty = 0;
+
+                       if (!parent)
+                               alloc_failed = 1;
+
+                       /* directory stuff...
+                        * hook up to parent
+                        */
+
+                       if (parent &&
+                           parent->variant_type == YAFFS_OBJECT_TYPE_UNKNOWN) {
+                               /* Set up as a directory */
+                               parent->variant_type =
+                                       YAFFS_OBJECT_TYPE_DIRECTORY;
+                               INIT_LIST_HEAD(&parent->
+                                               variant.dir_variant.children);
+                       } else if (!parent ||
+                                  parent->variant_type !=
+                                       YAFFS_OBJECT_TYPE_DIRECTORY) {
+                               /* Hoosterman, another problem....
+                                * Trying to use a non-directory as a directory
+                                */
+
+                               yaffs_trace(YAFFS_TRACE_ERROR,
+                                       "yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found."
+                                       );
+                               parent = dev->lost_n_found;
+                       }
+                       yaffs_add_obj_to_dir(parent, in);
+
+                       is_unlinked = (parent == dev->del_dir) ||
+                                       (parent == dev->unlinked_dir);
+
+                       if (is_shrink)
+                               /* Mark the block */
+                               bi->has_shrink_hdr = 1;
+
+                       /* Note re hardlinks.
+                        * Since we might scan a hardlink before its equivalent
+                        * object is scanned we put them all in a list.
+                        * After scanning is complete, we should have all the
+                        * objects, so we run through this list and fix up all
+                        * the chains.
+                        */
+
+                       switch (in->variant_type) {
+                       case YAFFS_OBJECT_TYPE_UNKNOWN:
+                               /* Todo got a problem */
+                               break;
+                       case YAFFS_OBJECT_TYPE_FILE:
+                               file_var = &in->variant.file_variant;
+                               if (file_var->scanned_size < file_size) {
+                                       /* This covers the case where the file
+                                        * size is greater than the data held.
+                                        * This will happen if the file is
+                                        * resized to be larger than its
+                                        * current data extents.
+                                        */
+                                       file_var->file_size = file_size;
+                                       file_var->scanned_size = file_size;
+                               }
+
+                               if (file_var->shrink_size > file_size)
+                                       file_var->shrink_size = file_size;
+
+                               break;
+                       case YAFFS_OBJECT_TYPE_HARDLINK:
+                               hl_var = &in->variant.hardlink_variant;
+                               if (!is_unlinked) {
+                                       hl_var->equiv_id = equiv_id;
+                                       list_add(&in->hard_links, hard_list);
+                               }
+                               break;
+                       case YAFFS_OBJECT_TYPE_DIRECTORY:
+                               /* Do nothing */
+                               break;
+                       case YAFFS_OBJECT_TYPE_SPECIAL:
+                               /* Do nothing */
+                               break;
+                       case YAFFS_OBJECT_TYPE_SYMLINK:
+                               sl_var = &in->variant.symlink_variant;
+                               if (oh) {
+                                       sl_var->alias =
+                                           yaffs_clone_str(oh->alias);
+                                       if (!sl_var->alias)
+                                               alloc_failed = 1;
+                               }
+                               break;
+                       }
+               }
+       }
+       return alloc_failed ? YAFFS_FAIL : YAFFS_OK;
+}
+
+int yaffs2_scan_backwards(struct yaffs_dev *dev)
+{
        int blk;
        int block_iter;
        int start_iter;
        int end_iter;
        int n_to_scan = 0;
-
-       int chunk;
-       int result;
+       enum yaffs_block_state state;
        int c;
        int deleted;
-       enum yaffs_block_state state;
-       struct yaffs_obj *hard_list = NULL;
+       LIST_HEAD(hard_list);
        struct yaffs_block_info *bi;
        u32 seq_number;
-       struct yaffs_obj_hdr *oh;
-       struct yaffs_obj *in;
-       struct yaffs_obj *parent;
        int n_blocks = dev->internal_end_block - dev->internal_start_block + 1;
-       int is_unlinked;
        u8 *chunk_data;
-
-       int file_size;
-       int is_shrink;
        int found_chunks;
-       int equiv_id;
        int alloc_failed = 0;
-
        struct yaffs_block_index *block_index = NULL;
        int alt_block_index = 0;
+       int summary_available;
 
        yaffs_trace(YAFFS_TRACE_SCAN,
                "yaffs2_scan_backwards starts  intstartblk %d intendblk %d...",
@@ -988,8 +1367,8 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
 
        dev->seq_number = YAFFS_LOWEST_SEQUENCE_NUMBER;
 
-       block_index = kmalloc(n_blocks * sizeof(struct yaffs_block_index),
-                       GFP_NOFS);
+       block_index =
+               kmalloc(n_blocks * sizeof(struct yaffs_block_index), GFP_NOFS);
 
        if (!block_index) {
                block_index =
@@ -1006,7 +1385,7 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
 
        dev->blocks_in_checkpt = 0;
 
-       chunk_data = yaffs_get_temp_buffer(dev, __LINE__);
+       chunk_data = yaffs_get_temp_buffer(dev);
 
        /* Scan all the blocks to determine their state */
        bi = dev->block_info;
@@ -1022,35 +1401,32 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
                bi->seq_number = seq_number;
 
                if (bi->seq_number == YAFFS_SEQUENCE_CHECKPOINT_DATA)
-                       bi->block_state = state = YAFFS_BLOCK_STATE_CHECKPOINT;
+                       bi->block_state = YAFFS_BLOCK_STATE_CHECKPOINT;
                if (bi->seq_number == YAFFS_SEQUENCE_BAD_BLOCK)
-                       bi->block_state = state = YAFFS_BLOCK_STATE_DEAD;
+                       bi->block_state = YAFFS_BLOCK_STATE_DEAD;
 
                yaffs_trace(YAFFS_TRACE_SCAN_DEBUG,
                        "Block scanning block %d state %d seq %d",
-                       blk, state, seq_number);
+                       blk, bi->block_state, seq_number);
 
-               if (state == YAFFS_BLOCK_STATE_CHECKPOINT) {
+               if (bi->block_state == YAFFS_BLOCK_STATE_CHECKPOINT) {
                        dev->blocks_in_checkpt++;
 
-               } else if (state == YAFFS_BLOCK_STATE_DEAD) {
+               } else if (bi->block_state == YAFFS_BLOCK_STATE_DEAD) {
                        yaffs_trace(YAFFS_TRACE_BAD_BLOCKS,
                                "block %d is bad", blk);
-               } else if (state == YAFFS_BLOCK_STATE_EMPTY) {
+               } else if (bi->block_state == YAFFS_BLOCK_STATE_EMPTY) {
                        yaffs_trace(YAFFS_TRACE_SCAN_DEBUG, "Block empty ");
                        dev->n_erased_blocks++;
                        dev->n_free_chunks += dev->param.chunks_per_block;
-               } else if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) {
-
+               } else if (bi->block_state ==
+                               YAFFS_BLOCK_STATE_NEEDS_SCAN) {
                        /* Determine the highest sequence number */
                        if (seq_number >= YAFFS_LOWEST_SEQUENCE_NUMBER &&
                            seq_number < YAFFS_HIGHEST_SEQUENCE_NUMBER) {
-
                                block_index[n_to_scan].seq = seq_number;
                                block_index[n_to_scan].block = blk;
-
                                n_to_scan++;
-
                                if (seq_number >= dev->seq_number)
                                        dev->seq_number = seq_number;
                        } else {
@@ -1058,7 +1434,6 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
                                yaffs_trace(YAFFS_TRACE_SCAN,
                                        "Block scanning block %d has bad sequence number %d",
                                        blk, seq_number);
-
                        }
                }
                bi++;
@@ -1082,7 +1457,8 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
        yaffs_trace(YAFFS_TRACE_SCAN_DEBUG, "%d blocks to scan", n_to_scan);
 
        /* For each block.... backwards */
-       for (block_iter = end_iter; !alloc_failed && block_iter >= start_iter;
+       for (block_iter = end_iter;
+            !alloc_failed && block_iter >= start_iter;
             block_iter--) {
                /* Cooperative multitasking! This loop can run for so
                   long that watchdog timers expire. */
@@ -1090,474 +1466,38 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
 
                /* get the block to scan in the correct order */
                blk = block_index[block_iter].block;
-
                bi = yaffs_get_block_info(dev, blk);
-
-               state = bi->block_state;
-
                deleted = 0;
 
+               summary_available = yaffs_summary_read(dev, dev->sum_tags, blk);
+
                /* For each chunk in each block that needs scanning.... */
                found_chunks = 0;
-               for (c = dev->param.chunks_per_block - 1;
+               if(summary_available)
+                       c = dev->chunks_per_summary - 1;
+               else
+                       c = dev->param.chunks_per_block - 1;
+
+               for (/* c is already initialised */;
                     !alloc_failed && c >= 0 &&
-                    (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING ||
-                     state == YAFFS_BLOCK_STATE_ALLOCATING); c--) {
+                    (bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN ||
+                     bi->block_state == YAFFS_BLOCK_STATE_ALLOCATING);
+                     c--) {
                        /* Scan backwards...
                         * Read the tags and decide what to do
                         */
-
-                       chunk = blk * dev->param.chunks_per_block + c;
-
-                       result = yaffs_rd_chunk_tags_nand(dev, chunk, NULL,
-                                                         &tags);
-
-                       /* Let's have a good look at this chunk... */
-
-                       if (!tags.chunk_used) {
-                               /* An unassigned chunk in the block.
-                                * If there are used chunks after this one, then
-                                * it is a chunk that was skipped due to failing the erased
-                                * check. Just skip it so that it can be deleted.
-                                * But, more typically, We get here when this is an unallocated
-                                * chunk and his means that either the block is empty or
-                                * this is the one being allocated from
-                                */
-
-                               if (found_chunks) {
-                                       /* This is a chunk that was skipped due to failing the erased check */
-                               } else if (c == 0) {
-                                       /* We're looking at the first chunk in the block so the block is unused */
-                                       state = YAFFS_BLOCK_STATE_EMPTY;
-                                       dev->n_erased_blocks++;
-                               } else {
-                                       if (state ==
-                                           YAFFS_BLOCK_STATE_NEEDS_SCANNING
-                                           || state ==
-                                           YAFFS_BLOCK_STATE_ALLOCATING) {
-                                               if (dev->seq_number ==
-                                                   bi->seq_number) {
-                                                       /* this is the block being allocated from */
-
-                                                       yaffs_trace(YAFFS_TRACE_SCAN,
-                                                               " Allocating from %d %d",
-                                                               blk, c);
-
-                                                       state =
-                                                           YAFFS_BLOCK_STATE_ALLOCATING;
-                                                       dev->alloc_block = blk;
-                                                       dev->alloc_page = c;
-                                                       dev->
-                                                           alloc_block_finder =
-                                                           blk;
-                                               } else {
-                                                       /* This is a partially written block that is not
-                                                        * the current allocation block.
-                                                        */
-
-                                                       yaffs_trace(YAFFS_TRACE_SCAN,
-                                                               "Partially written block %d detected",
-                                                               blk);
-                                               }
-                                       }
-                               }
-
-                               dev->n_free_chunks++;
-
-                       } else if (tags.ecc_result == YAFFS_ECC_RESULT_UNFIXED) {
-                               yaffs_trace(YAFFS_TRACE_SCAN,
-                                       " Unfixed ECC in chunk(%d:%d), chunk ignored",
-                                       blk, c);
-
-                               dev->n_free_chunks++;
-
-                       } else if (tags.obj_id > YAFFS_MAX_OBJECT_ID ||
-                                  tags.chunk_id > YAFFS_MAX_CHUNK_ID ||
-                                  (tags.chunk_id > 0
-                                   && tags.n_bytes > dev->data_bytes_per_chunk)
-                                  || tags.seq_number != bi->seq_number) {
-                               yaffs_trace(YAFFS_TRACE_SCAN,
-                                       "Chunk (%d:%d) with bad tags:obj = %d, chunk_id = %d, n_bytes = %d, ignored",
-                                       blk, c, tags.obj_id,
-                                       tags.chunk_id, tags.n_bytes);
-
-                               dev->n_free_chunks++;
-
-                       } else if (tags.chunk_id > 0) {
-                               /* chunk_id > 0 so it is a data chunk... */
-                               unsigned int endpos;
-                               u32 chunk_base =
-                                   (tags.chunk_id -
-                                    1) * dev->data_bytes_per_chunk;
-
-                               found_chunks = 1;
-
-                               yaffs_set_chunk_bit(dev, blk, c);
-                               bi->pages_in_use++;
-
-                               in = yaffs_find_or_create_by_number(dev,
-                                                                   tags.obj_id,
-                                                                   YAFFS_OBJECT_TYPE_FILE);
-                               if (!in) {
-                                       /* Out of memory */
-                                       alloc_failed = 1;
-                               }
-
-                               if (in &&
-                                   in->variant_type == YAFFS_OBJECT_TYPE_FILE
-                                   && chunk_base <
-                                   in->variant.file_variant.shrink_size) {
-                                       /* This has not been invalidated by a resize */
-                                       if (!yaffs_put_chunk_in_file
-                                           (in, tags.chunk_id, chunk, -1)) {
-                                               alloc_failed = 1;
-                                       }
-
-                                       /* File size is calculated by looking at the data chunks if we have not
-                                        * seen an object header yet. Stop this practice once we find an object header.
-                                        */
-                                       endpos = chunk_base + tags.n_bytes;
-
-                                       if (!in->valid &&       /* have not got an object header yet */
-                                           in->variant.file_variant.
-                                           scanned_size < endpos) {
-                                               in->variant.file_variant.
-                                                   scanned_size = endpos;
-                                               in->variant.file_variant.
-                                                   file_size = endpos;
-                                       }
-
-                               } else if (in) {
-                                       /* This chunk has been invalidated by a resize, or a past file deletion
-                                        * so delete the chunk*/
-                                       yaffs_chunk_del(dev, chunk, 1,
-                                                       __LINE__);
-
-                               }
-                       } else {
-                               /* chunk_id == 0, so it is an ObjectHeader.
-                                * Thus, we read in the object header and make the object
-                                */
-                               found_chunks = 1;
-
-                               yaffs_set_chunk_bit(dev, blk, c);
-                               bi->pages_in_use++;
-
-                               oh = NULL;
-                               in = NULL;
-
-                               if (tags.extra_available) {
-                                       in = yaffs_find_or_create_by_number(dev,
-                                                                           tags.
-                                                                           obj_id,
-                                                                           tags.
-                                                                           extra_obj_type);
-                                       if (!in)
-                                               alloc_failed = 1;
-                               }
-
-                               if (!in ||
-                                   (!in->valid && dev->param.disable_lazy_load)
-                                   || tags.extra_shadows || (!in->valid
-                                                             && (tags.obj_id ==
-                                                                 YAFFS_OBJECTID_ROOT
-                                                                 || tags.
-                                                                 obj_id ==
-                                                                 YAFFS_OBJECTID_LOSTNFOUND)))
-                               {
-
-                                       /* If we don't have  valid info then we need to read the chunk
-                                        * TODO In future we can probably defer reading the chunk and
-                                        * living with invalid data until needed.
-                                        */
-
-                                       result = yaffs_rd_chunk_tags_nand(dev,
-                                                                         chunk,
-                                                                         chunk_data,
-                                                                         NULL);
-
-                                       oh = (struct yaffs_obj_hdr *)chunk_data;
-
-                                       if (dev->param.inband_tags) {
-                                               /* Fix up the header if they got corrupted by inband tags */
-                                               oh->shadows_obj =
-                                                   oh->inband_shadowed_obj_id;
-                                               oh->is_shrink =
-                                                   oh->inband_is_shrink;
-                                       }
-
-                                       if (!in) {
-                                               in = yaffs_find_or_create_by_number(dev, tags.obj_id, oh->type);
-                                               if (!in)
-                                                       alloc_failed = 1;
-                                       }
-
-                               }
-
-                               if (!in) {
-                                       /* TODO Hoosterman we have a problem! */
-                                       yaffs_trace(YAFFS_TRACE_ERROR,
-                                               "yaffs tragedy: Could not make object for object  %d at chunk %d during scan",
-                                               tags.obj_id, chunk);
-                                       continue;
-                               }
-
-                               if (in->valid) {
-                                       /* We have already filled this one.
-                                        * We have a duplicate that will be discarded, but
-                                        * we first have to suck out resize info if it is a file.
-                                        */
-
-                                       if ((in->variant_type ==
-                                            YAFFS_OBJECT_TYPE_FILE) && ((oh
-                                                                         &&
-                                                                         oh->
-                                                                         type
-                                                                         ==
-                                                                         YAFFS_OBJECT_TYPE_FILE)
-                                                                        ||
-                                                                        (tags.
-                                                                         extra_available
-                                                                         &&
-                                                                         tags.
-                                                                         extra_obj_type
-                                                                         ==
-                                                                         YAFFS_OBJECT_TYPE_FILE)))
-                                       {
-                                               u32 this_size =
-                                                   (oh) ? oh->
-                                                   file_size :
-                                                   tags.extra_length;
-                                               u32 parent_obj_id =
-                                                   (oh) ? oh->parent_obj_id :
-                                                   tags.extra_parent_id;
-
-                                               is_shrink =
-                                                   (oh) ? oh->
-                                                   is_shrink :
-                                                   tags.extra_is_shrink;
-
-                                               /* If it is deleted (unlinked at start also means deleted)
-                                                * we treat the file size as being zeroed at this point.
-                                                */
-                                               if (parent_obj_id ==
-                                                   YAFFS_OBJECTID_DELETED
-                                                   || parent_obj_id ==
-                                                   YAFFS_OBJECTID_UNLINKED) {
-                                                       this_size = 0;
-                                                       is_shrink = 1;
-                                               }
-
-                                               if (is_shrink
-                                                   && in->variant.file_variant.
-                                                   shrink_size > this_size)
-                                                       in->variant.
-                                                           file_variant.
-                                                           shrink_size =
-                                                           this_size;
-
-                                               if (is_shrink)
-                                                       bi->has_shrink_hdr = 1;
-
-                                       }
-                                       /* Use existing - destroy this one. */
-                                       yaffs_chunk_del(dev, chunk, 1,
-                                                       __LINE__);
-
-                               }
-
-                               if (!in->valid && in->variant_type !=
-                                   (oh ? oh->type : tags.extra_obj_type))
-                                       yaffs_trace(YAFFS_TRACE_ERROR,
-                                               "yaffs tragedy: Bad object type, %d != %d, for object %d at chunk %d during scan",
-                                               oh ?
-                                               oh->type : tags.extra_obj_type,
-                                               in->variant_type, tags.obj_id,
-                                               chunk);
-
-                               if (!in->valid &&
-                                   (tags.obj_id == YAFFS_OBJECTID_ROOT ||
-                                    tags.obj_id ==
-                                    YAFFS_OBJECTID_LOSTNFOUND)) {
-                                       /* We only load some info, don't fiddle with directory structure */
-                                       in->valid = 1;
-
-                                       if (oh) {
-
-                                               in->yst_mode = oh->yst_mode;
-                                               yaffs_load_attribs(in, oh);
-                                               in->lazy_loaded = 0;
-                                       } else {
-                                               in->lazy_loaded = 1;
-                                        }
-                                       in->hdr_chunk = chunk;
-
-                               } else if (!in->valid) {
-                                       /* we need to load this info */
-
-                                       in->valid = 1;
-                                       in->hdr_chunk = chunk;
-
-                                       if (oh) {
-                                               in->variant_type = oh->type;
-
-                                               in->yst_mode = oh->yst_mode;
-                                               yaffs_load_attribs(in, oh);
-
-                                               if (oh->shadows_obj > 0)
-                                                       yaffs_handle_shadowed_obj
-                                                           (dev,
-                                                            oh->shadows_obj,
-                                                            1);
-
-                                               yaffs_set_obj_name_from_oh(in,
-                                                                          oh);
-                                               parent =
-                                                   yaffs_find_or_create_by_number
-                                                   (dev, oh->parent_obj_id,
-                                                    YAFFS_OBJECT_TYPE_DIRECTORY);
-
-                                               file_size = oh->file_size;
-                                               is_shrink = oh->is_shrink;
-                                               equiv_id = oh->equiv_id;
-
-                                       } else {
-                                               in->variant_type =
-                                                   tags.extra_obj_type;
-                                               parent =
-                                                   yaffs_find_or_create_by_number
-                                                   (dev, tags.extra_parent_id,
-                                                    YAFFS_OBJECT_TYPE_DIRECTORY);
-                                               file_size = tags.extra_length;
-                                               is_shrink =
-                                                   tags.extra_is_shrink;
-                                               equiv_id = tags.extra_equiv_id;
-                                               in->lazy_loaded = 1;
-
-                                       }
-                                       in->dirty = 0;
-
-                                       if (!parent)
-                                               alloc_failed = 1;
-
-                                       /* directory stuff...
-                                        * hook up to parent
-                                        */
-
-                                       if (parent && parent->variant_type ==
-                                           YAFFS_OBJECT_TYPE_UNKNOWN) {
-                                               /* Set up as a directory */
-                                               parent->variant_type =
-                                                   YAFFS_OBJECT_TYPE_DIRECTORY;
-                                               INIT_LIST_HEAD(&parent->
-                                                              variant.dir_variant.children);
-                                       } else if (!parent
-                                                  || parent->variant_type !=
-                                                  YAFFS_OBJECT_TYPE_DIRECTORY) {
-                                               /* Hoosterman, another problem....
-                                                * We're trying to use a non-directory as a directory
-                                                */
-
-                                               yaffs_trace(YAFFS_TRACE_ERROR,
-                                                       "yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found."
-                                                       );
-                                               parent = dev->lost_n_found;
-                                       }
-
-                                       yaffs_add_obj_to_dir(parent, in);
-
-                                       is_unlinked = (parent == dev->del_dir)
-                                           || (parent == dev->unlinked_dir);
-
-                                       if (is_shrink) {
-                                               /* Mark the block as having a shrink header */
-                                               bi->has_shrink_hdr = 1;
-                                       }
-
-                                       /* Note re hardlinks.
-                                        * Since we might scan a hardlink before its equivalent object is scanned
-                                        * we put them all in a list.
-                                        * After scanning is complete, we should have all the objects, so we run
-                                        * through this list and fix up all the chains.
-                                        */
-
-                                       switch (in->variant_type) {
-                                       case YAFFS_OBJECT_TYPE_UNKNOWN:
-                                               /* Todo got a problem */
-                                               break;
-                                       case YAFFS_OBJECT_TYPE_FILE:
-
-                                               if (in->variant.
-                                                   file_variant.scanned_size <
-                                                   file_size) {
-                                                       /* This covers the case where the file size is greater
-                                                        * than where the data is
-                                                        * This will happen if the file is resized to be larger
-                                                        * than its current data extents.
-                                                        */
-                                                       in->variant.
-                                                           file_variant.
-                                                           file_size =
-                                                           file_size;
-                                                       in->variant.
-                                                           file_variant.
-                                                           scanned_size =
-                                                           file_size;
-                                               }
-
-                                               if (in->variant.file_variant.
-                                                   shrink_size > file_size)
-                                                       in->variant.
-                                                           file_variant.
-                                                           shrink_size =
-                                                           file_size;
-
-                                               break;
-                                       case YAFFS_OBJECT_TYPE_HARDLINK:
-                                               if (!is_unlinked) {
-                                                       in->variant.
-                                                           hardlink_variant.
-                                                           equiv_id = equiv_id;
-                                                       in->hard_links.next =
-                                                           (struct list_head *)
-                                                           hard_list;
-                                                       hard_list = in;
-                                               }
-                                               break;
-                                       case YAFFS_OBJECT_TYPE_DIRECTORY:
-                                               /* Do nothing */
-                                               break;
-                                       case YAFFS_OBJECT_TYPE_SPECIAL:
-                                               /* Do nothing */
-                                               break;
-                                       case YAFFS_OBJECT_TYPE_SYMLINK:
-                                               if (oh) {
-                                                       in->variant.
-                                                           symlink_variant.
-                                                           alias =
-                                                           yaffs_clone_str(oh->
-                                                                           alias);
-                                                       if (!in->variant.
-                                                           symlink_variant.
-                                                           alias)
-                                                               alloc_failed =
-                                                                   1;
-                                               }
-                                               break;
-                                       }
-
-                               }
-
-                       }
-
-               }               /* End of scanning for each chunk */
-
-               if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) {
-                       /* If we got this far while scanning, then the block is fully allocated. */
-                       state = YAFFS_BLOCK_STATE_FULL;
+                       if (yaffs2_scan_chunk(dev, bi, blk, c,
+                                       &found_chunks, chunk_data,
+                                       &hard_list, summary_available) ==
+                                       YAFFS_FAIL)
+                               alloc_failed = 1;
                }
 
-               bi->block_state = state;
+               if (bi->block_state == YAFFS_BLOCK_STATE_NEEDS_SCAN) {
+                       /* If we got this far while scanning, then the block
+                        * is fully allocated. */
+                       bi->block_state = YAFFS_BLOCK_STATE_FULL;
+               }
 
                /* Now let's see if it was dirty */
                if (bi->pages_in_use == 0 &&
@@ -1565,7 +1505,6 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
                    bi->block_state == YAFFS_BLOCK_STATE_FULL) {
                        yaffs_block_became_dirty(dev, blk);
                }
-
        }
 
        yaffs_skip_rest_of_block(dev);
@@ -1577,12 +1516,12 @@ int yaffs2_scan_backwards(struct yaffs_dev *dev)
 
        /* Ok, we've done all the scanning.
         * Fix up the hard link chains.
-        * We should now have scanned all the objects, now it's time to add these
+        * We have scanned all the objects, now it's time to add these
         * hardlinks.
         */
-       yaffs_link_fixup(dev, hard_list);
+       yaffs_link_fixup(dev, &hard_list);
 
-       yaffs_release_temp_buffer(dev, chunk_data, __LINE__);
+       yaffs_release_temp_buffer(dev, chunk_data);
 
        if (alloc_failed)
                return YAFFS_FAIL;
index e1a9287fc5065b2cb0883efe1bb4b143a9997068..2363bfd8bcab6b07d02c4b50c1394546dd349d10 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
index 10e284e8ec7b4e0271f5837f18ef04ef9973f862..666d909bf6018299da92aa522f51f6b1824c6831 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -49,6 +49,7 @@
 #include <linux/sort.h>
 #include <linux/bitops.h>
 
+/*  These type wrappings are used to support Unicode names in WinCE. */
 #define YCHAR char
 #define YUCHAR unsigned char
 #define _Y(x)     x
        ({ int x = __builtin_choose_expr(assertion, 0, (void)0); (void) x; })
 
 
-#ifndef Y_DUMP_STACK
-#define Y_DUMP_STACK() dump_stack()
-#endif
-
 #define yaffs_trace(msk, fmt, ...) do { \
-       if(yaffs_trace_mask & (msk)) \
+       if (yaffs_trace_mask & (msk)) \
                printk(KERN_DEBUG "yaffs: " fmt "\n", ##__VA_ARGS__); \
-} while(0)
-
-#ifndef YBUG
-#define YBUG() do {\
-       yaffs_trace(YAFFS_TRACE_BUG,\
-               "bug " __FILE__ " %d",\
-               __LINE__);\
-       Y_DUMP_STACK();\
 } while (0)
-#endif
+
 
 #endif
index 8183425448cde06732aa5499156c661fe1314e90..d8194754a8f3c49dd20e28b982b681095b73191a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -31,6 +31,7 @@
 #include <linux/sort.h>
 #include <linux/bitops.h>
 
+/*  These type wrappings are used to support Unicode names in WinCE. */
 #define YCHAR char
 #define YUCHAR unsigned char
 #define _Y(x)     x
 #define compile_time_assertion(assertion) \
        ({ int x = __builtin_choose_expr(assertion, 0, (void)0); (void) x; })
 
-
-#ifndef Y_DUMP_STACK
-#define Y_DUMP_STACK() dump_stack()
-#endif
-
+#ifdef CONFIG_YAFFS_DEBUG
 #define yaffs_trace(msk, fmt, ...) do { \
-       if(yaffs_trace_mask & (msk)) \
+       if (yaffs_trace_mask & (msk)) \
                printk(KERN_DEBUG "yaffs: " fmt "\n", ##__VA_ARGS__); \
-} while(0)
-
-#ifndef YBUG
-#define YBUG() do {\
-       yaffs_trace(YAFFS_TRACE_BUG,\
-               "bug " __FILE__ " %d",\
-               __LINE__);\
-       Y_DUMP_STACK();\
+} while (0)
+#else
+#define yaffs_trace(msk, fmt, ...) do { \
 } while (0)
 #endif