yaffs2.git
2 years agoAdded create and validate tests.
Timothy Manning [Fri, 10 Sep 2021 04:03:13 +0000 (16:03 +1200)]
Added create and validate tests.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years ago64 bit test now cleans correctly.
Timothy Manning [Mon, 16 Aug 2021 22:21:48 +0000 (10:21 +1200)]
64 bit test now cleans correctly.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded .swp files to .gitignore.
Timothy Manning [Mon, 16 Aug 2021 22:06:32 +0000 (10:06 +1200)]
Added .swp files to .gitignore.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoUpdating Makefile to build more time tests.
Timothy Manning [Mon, 16 Aug 2021 22:02:29 +0000 (10:02 +1200)]
Updating Makefile to build more time tests.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdding more time tests
Timothy Manning [Mon, 9 Aug 2021 21:01:10 +0000 (09:01 +1200)]
Adding more time tests

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoupdated unit test runner to also clean its sub dirs
Timothy Manning [Sat, 7 Aug 2021 22:33:46 +0000 (10:33 +1200)]
updated unit test runner to also clean its sub dirs

2 years agoTests will now delete the emfiles with make clean
Timothy Manning [Fri, 6 Aug 2021 03:56:25 +0000 (15:56 +1200)]
Tests will now delete the emfiles with make clean

2 years agoCopied yaffs direct files are now read only.
Timothy Manning [Fri, 6 Aug 2021 02:43:05 +0000 (14:43 +1200)]
Copied yaffs direct files are now read only.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded more testcases to the 64 bit time tests.
Timothy Manning [Fri, 6 Aug 2021 02:27:40 +0000 (14:27 +1200)]
Added more testcases to the 64 bit time tests.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoFixed issues with 32 bit time tests
Timothy Manning [Fri, 6 Aug 2021 02:24:25 +0000 (14:24 +1200)]
Fixed issues with 32 bit time tests

Fixed the makefile to complile in 32 bit mode
Fixed yaffs_endian.c to swap 32 bit sized times.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded gitignores to the repository.
Timothy Manning [Fri, 6 Aug 2021 02:07:04 +0000 (14:07 +1200)]
Added gitignores to the repository.

Each of the yaffs direct tests has its own gitignore file.
This is so that if the test is moved or deleted then the
gitignore file is dealt with appropriately.

However all the symlinks are handled by the root .gitinore file.
If a test is moved or deleated, run the script in the root gitignore
file to update the list of all the symlinks in the repository.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoFixed an error with the 32 bit time.
Timothy Manning [Thu, 5 Aug 2021 03:27:00 +0000 (15:27 +1200)]
Fixed an error with the 32 bit time.

The compiler was throwing an "right shift count >= width of type"
error when yaffs was compiled using 32 bit time.

This was fixed by replacing an if statement with a #define.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoMerge remote-tracking branch 'origin/64_and_32_bit_time_tests'
Timothy Manning [Thu, 5 Aug 2021 01:12:48 +0000 (13:12 +1200)]
Merge remote-tracking branch 'origin/64_and_32_bit_time_tests'

2 years agoFurther integration of 64-bit time changes
Charles Manning [Thu, 29 Jul 2021 04:38:02 +0000 (16:38 +1200)]
Further integration of 64-bit time changes

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
2 years agoFixed quick_tests return codes.
Timothy Manning [Wed, 28 Jul 2021 00:23:46 +0000 (12:23 +1200)]
Fixed quick_tests return codes.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoFixed the return codes in is_yaffs_working_tests
Timothy Manning [Wed, 28 Jul 2021 00:08:15 +0000 (12:08 +1200)]
Fixed the return codes in is_yaffs_working_tests

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded a docstring explaining how to use test_runner.py
Timothy Manning [Tue, 27 Jul 2021 06:11:58 +0000 (18:11 +1200)]
Added a docstring explaining how to use test_runner.py

Also deleted the old Makefile based test runner.
Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded a test runner for the unit tests
Timothy Manning [Tue, 27 Jul 2021 05:52:03 +0000 (17:52 +1200)]
Added a test runner for the unit tests

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoYTIME_T 32 bit test now builds with 32 bit time
Timothy Manning [Mon, 26 Jul 2021 02:09:16 +0000 (14:09 +1200)]
YTIME_T 32 bit test now builds with 32 bit time

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoFixed an issue with the 32 bit YTIME_T test.
Timothy Manning [Sat, 24 Jul 2021 04:15:13 +0000 (16:15 +1200)]
Fixed an issue with the 32 bit YTIME_T test.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoFinished the 64 bit YTIME_T test.
Timothy Manning [Sat, 24 Jul 2021 04:13:19 +0000 (16:13 +1200)]
Finished the 64 bit YTIME_T test.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded tests for 32 and 64 bit time.
Timothy Manning [Sat, 24 Jul 2021 02:17:44 +0000 (14:17 +1200)]
Added tests for 32 and 64 bit time.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoMerge remote-tracking branch 'origin/time_upgrade' into 64_and_32_bit_time_tests
Timothy Manning [Fri, 23 Jul 2021 01:50:06 +0000 (13:50 +1200)]
Merge remote-tracking branch 'origin/time_upgrade' into 64_and_32_bit_time_tests

2 years agoMerge branch 'time_upgrade'
Charles Manning [Wed, 7 Jul 2021 04:00:35 +0000 (16:00 +1200)]
Merge branch 'time_upgrade'

2 years agoClear ll_init flag during de-initialisation
Charles Manning [Wed, 7 Jul 2021 01:14:24 +0000 (13:14 +1200)]
Clear ll_init flag during de-initialisation

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
2 years agoyaffs_rtems: Add yaffs_cache to RTEMS makefile and tweak RTEMS
Charles Manning [Wed, 7 Jul 2021 00:59:35 +0000 (12:59 +1200)]
yaffs_rtems: Add yaffs_cache to RTEMS makefile and tweak RTEMS

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
2 years agoAdded a README to basic-tests
Timothy Manning [Thu, 1 Jul 2021 03:09:14 +0000 (15:09 +1200)]
Added a README to basic-tests

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoRenamed timothy_tests to stress_tests
Timothy Manning [Thu, 1 Jul 2021 02:53:16 +0000 (14:53 +1200)]
Renamed timothy_tests to stress_tests

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded a makefile to run all the unit tests.
Timothy Manning [Thu, 1 Jul 2021 02:28:05 +0000 (14:28 +1200)]
Added a makefile to run all the unit tests.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoMoved unit tests into their own folder.
Timothy Manning [Tue, 29 Jun 2021 03:49:34 +0000 (15:49 +1200)]
Moved unit tests into their own folder.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded test target to makefile.
Timothy Manning [Tue, 29 Jun 2021 03:40:36 +0000 (15:40 +1200)]
Added test target to makefile.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded a test target to makefile
Timothy Manning [Tue, 29 Jun 2021 03:36:40 +0000 (15:36 +1200)]
Added a test target to makefile

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoRemoved obsolete test from linux_tests.
Timothy Manning [Tue, 29 Jun 2021 03:24:57 +0000 (15:24 +1200)]
Removed obsolete test from linux_tests.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoRemoved obsolete timothy_test/yaffs_and_linux_mirror_tests
Timothy Manning [Tue, 29 Jun 2021 03:07:57 +0000 (15:07 +1200)]
Removed obsolete timothy_test/yaffs_and_linux_mirror_tests

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoUpdated timothy_tests/stress_tester
Timothy Manning [Tue, 29 Jun 2021 02:56:45 +0000 (14:56 +1200)]
Updated timothy_tests/stress_tester

Updated the mount point's path.
Broke out some commonly used shared functions and defines into a
shared file.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoRemoved old test from timothy_tests/quick_tests
Timothy Manning [Fri, 25 Jun 2021 03:11:45 +0000 (15:11 +1200)]
Removed old test from timothy_tests/quick_tests

Linux now allows directories to be opened.
When quick_tests were written, open was supposed to
return the error code EISDIR.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoUpdated is_yaffs_working_test_fix
Timothy Manning [Fri, 25 Jun 2021 02:39:45 +0000 (14:39 +1200)]
Updated is_yaffs_working_test_fix

Added pthread library to the makefile and changed
the mountpoint to the new "yflash2".

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoFixed segfault in yaffs_guts
Timothy Manning [Thu, 24 Jun 2021 02:39:00 +0000 (14:39 +1200)]
Fixed segfault in yaffs_guts

Remounting a device would cause a segfault because the
device's temp_buffer would not be reinitialised. Resulting
in a null pointer being called as a function, creating the segfault.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoEnhanced printf statements in is_yaffs_working_tests
Timothy Manning [Fri, 4 Jun 2021 04:58:59 +0000 (16:58 +1200)]
Enhanced printf statements in is_yaffs_working_tests

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoFixed mountpoint path for is_yaffs_working_test
Timothy Manning [Fri, 4 Jun 2021 04:49:31 +0000 (16:49 +1200)]
Fixed mountpoint path for is_yaffs_working_test

The old path "/yaffs2/" seem to have been removed.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoAdded -lpthread to is_yaffs_working_tests's makefile
Timothy Manning [Fri, 4 Jun 2021 04:46:56 +0000 (16:46 +1200)]
Added -lpthread to is_yaffs_working_tests's makefile

Also removed dead code.

Signed-off-by: Timothy Manning <codedraftsman@gmail.com>
2 years agoFix unmatched temporary buffer allocations
Charles Manning [Tue, 8 Jun 2021 03:47:57 +0000 (15:47 +1200)]
Fix unmatched temporary buffer allocations

If there were errors then temporary buffers were not being freed properly.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
2 years agoMake the tmpfs test space larger for running long tests
Charles Manning [Tue, 8 Jun 2021 03:46:55 +0000 (15:46 +1200)]
Make the tmpfs test space larger for running long tests

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
2 years agoAdded endianness support for YTIME_T
Timothy Manning [Thu, 3 Jun 2021 22:21:27 +0000 (10:21 +1200)]
Added endianness support for YTIME_T

Added a inline function that handles swapping the Endianness for YTIME_T.

Signed-off-by: Timothy Manning <codedraughtsman@users.noreply.github.com>
2 years agoAdded comments to yaffs_DoUtimre
Timothy Manning [Thu, 3 Jun 2021 22:18:59 +0000 (10:18 +1200)]
Added comments to yaffs_DoUtimre

Signed-off-by: Timothy Manning <codedraughtsman@users.noreply.github.com>
2 years agoChanged some tabs to spaces.
Timothy Manning [Thu, 3 Jun 2021 22:17:27 +0000 (10:17 +1200)]
Changed some tabs to spaces.

Signed-off-by: Timothy Manning <codedraughtsman@users.noreply.github.com>
2 years agoCreated a new test to check the size of YTIME_T
Timothy Manning [Wed, 2 Jun 2021 21:45:12 +0000 (09:45 +1200)]
Created a new test to check the size of YTIME_T

2 years agoAdded support for 64 bit time to yaffs direct.
Timothy Manning [Mon, 31 May 2021 22:49:45 +0000 (10:49 +1200)]
Added support for 64 bit time to yaffs direct.

These changes still need to be applied to the kernel and rtems.

2 years agoFix sleep logic in background gc thread example
Charles Manning [Tue, 1 Jun 2021 23:28:43 +0000 (11:28 +1200)]
Fix sleep logic in background gc thread example

The logic to sleep longer was the wrong way around.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
2 years agoAdded some comments to dtest.c
codedraughtsman [Mon, 31 May 2021 05:11:05 +0000 (17:11 +1200)]
Added some comments to dtest.c

Also expanded some of the printf description text.

2 years agoFixed timothy_tests/quick_tests
codedraughtsman [Mon, 31 May 2021 04:29:11 +0000 (16:29 +1200)]
Fixed timothy_tests/quick_tests

One of the string buffers was to small and would not compile.
The string buffer's size was increased and it all compliles.

Note: the tests still fail due to a unrelated segfault, currently
fixing this.

2 years agoIndex the block state string list because the order was wrong.
Charles Manning [Tue, 25 May 2021 22:45:13 +0000 (10:45 +1200)]
Index the block state string list because the order was wrong.

Thanks to Cory Wiltshire for pointing out the problem and proposing
a fix.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
2 years agokernel Makefile won't work after moving cache handling into a separated file.
Luca (Wei) Chen [Tue, 25 May 2021 21:27:57 +0000 (09:27 +1200)]
kernel Makefile won't work after moving cache handling into a separated file.

Signed-off-by: Luca (Wei) Chen <wei@cvluca.com>
2 years agoyaffs_guts.c : Fix missing temporary buffers when doing yaffs format on inband tags.
Charles Manning [Sat, 15 May 2021 00:33:36 +0000 (12:33 +1200)]
yaffs_guts.c : Fix missing temporary buffers when doing yaffs format on inband tags.

The low level init was not setting up temporary buffers. This was causing yaffs_format
to crash in the case of formating a device with inband tags.

Solution is to move the temporary buffer creation into low level init.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
2 years agoNew yaffs2_image_maker tool to work with 4kB pages - still under test
Charles Manning [Tue, 11 May 2021 04:32:26 +0000 (16:32 +1200)]
New yaffs2_image_maker tool to work with 4kB pages - still under test

This appears to be working but more testing required.

The tool now takes two new parameters for modifying the bytes per page
and pages per block.

For instance to create an inband tags image using 4kB virtual pages (ie. 32
virtual pages per block) try:

./yaffs2_image_maker -i test-dir2 -o outimage -w working_file -I -c 4096  -B 32

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoyaffs_image_maker: Add ability to handle oob tags and no tags ecc
Charles Manning [Fri, 26 Mar 2021 01:59:43 +0000 (14:59 +1300)]
yaffs_image_maker: Add ability to handle oob tags and no tags ecc

This still has some limits - it assumes 2k pages.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoAdd a README for the image maker
Charles Manning [Thu, 18 Mar 2021 00:38:19 +0000 (13:38 +1300)]
Add a README for the image maker

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoAdd endian feature to image maker and do some tidy up.
Charles Manning [Thu, 18 Mar 2021 00:24:54 +0000 (13:24 +1300)]
Add endian feature to image maker and do some tidy up.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoAdd an image maker tool that generates image files for 2k page * 64 devices
Charles Manning [Wed, 17 Mar 2021 22:53:23 +0000 (11:53 +1300)]
Add an image maker tool that generates image files for 2k page * 64 devices

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoSome clean up and more modular cache management
Charles Manning [Tue, 16 Mar 2021 23:10:16 +0000 (12:10 +1300)]
Some clean up and more modular cache management

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoAdd CONFIG_YAFFS_NO_YAFFS1 flag to remove yaffs1 code when not needed
Charles Manning [Thu, 9 Jul 2020 02:16:29 +0000 (14:16 +1200)]
Add CONFIG_YAFFS_NO_YAFFS1 flag to remove yaffs1 code when not needed

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoMove cache code to own file
Charles Manning [Thu, 9 Jul 2020 01:34:12 +0000 (13:34 +1200)]
Move cache code to own file

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoMove cache handling into its own file
Charles Manning [Thu, 9 Jul 2020 01:31:03 +0000 (13:31 +1200)]
Move cache handling into its own file

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoAdd CONFIG_YAFFS_SMALL_RAM to reduce RAM footprint
Charles Manning [Thu, 9 Jul 2020 01:28:23 +0000 (13:28 +1200)]
Add CONFIG_YAFFS_SMALL_RAM to reduce RAM footprint

Reduce number of handles and search contexts.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoAdd CONFIG_YAFFS_NO_TRACE to turn off all tracing
Charles Manning [Thu, 9 Jul 2020 01:24:30 +0000 (13:24 +1200)]
Add CONFIG_YAFFS_NO_TRACE to turn off all tracing

This allows a foootprint reduction.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoyaffs-vfs-multi.c: Handle search context properly to prevent leaking
Charles Manning [Thu, 25 Jun 2020 04:01:27 +0000 (16:01 +1200)]
yaffs-vfs-multi.c: Handle search context properly to prevent leaking

Fix potential memory leak due to search context not being closed properly.

Thank you to George Pee for reporting this issue.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoAdd malloc monitoring to get a sense of RAM use
Charles Manning [Fri, 19 Jun 2020 01:52:21 +0000 (13:52 +1200)]
Add malloc monitoring to get a sense of RAM use

Note this should only be monitoring the malloc usage by Yaffs, not the
malloc usage in things like flash simulators which are not relevant in
real systems.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoBegign bug: Fix incorrect return value
Charles Manning [Fri, 19 Jun 2020 01:43:45 +0000 (13:43 +1200)]
Begign bug: Fix incorrect return value

The return value was not being used, but it was wrong.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoMerge branch 'sizeofsizeof'
Charles Manning [Fri, 15 May 2020 02:36:57 +0000 (14:36 +1200)]
Merge branch 'sizeofsizeof'

Fix two bugs:

sizeof(sizeof(hdr)) used instaed of sizeof(hr)

remounting a read-only fs in rw did not clean up defered operations
properly.

3 years agoAdd some RTEMS notes
Charles Manning [Fri, 15 May 2020 02:35:17 +0000 (14:35 +1200)]
Add some RTEMS notes

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoHandle cleanup when remounting rw after mounting read-only
Charles Manning [Fri, 15 May 2020 01:57:54 +0000 (13:57 +1200)]
Handle cleanup when remounting rw after mounting read-only

Deferend clean ups were not happening properly.

Thanks to andriy.grytsenko@globallogic.com for providing a
patch that forms the babsis of these changes.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agoMake buffers larger to stop compiler complaining
Charles Manning [Fri, 15 May 2020 01:44:10 +0000 (13:44 +1200)]
Make buffers larger to stop compiler complaining

The buffers were not overflowing, but the check was complaining.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
3 years agofix wrong use of sizeof in yaffs_checkpt_close
liaohua [Thu, 23 Apr 2020 03:30:20 +0000 (11:30 +0800)]
fix wrong use of sizeof in yaffs_checkpt_close

There is a distinct bug that sizeof was used incorrectly,
causing the judgment to be ineffective and always flushing checkpt buffer.

Signed-off-by: liaohua <liaohua4@huawei.com>
4 years agoAdd test to dereference symlink rtems-merge
Charles Manning [Thu, 19 Mar 2020 03:04:35 +0000 (16:04 +1300)]
Add test to dereference symlink

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agoAdd more basic tests and some clean up.
Charles Manning [Thu, 19 Mar 2020 02:15:24 +0000 (15:15 +1300)]
Add more basic tests and some clean up.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agoAdd stats to flash simulator
Charles Manning [Thu, 19 Mar 2020 02:14:30 +0000 (15:14 +1300)]
Add stats to flash simulator

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agortems yests: FSX
Charles Manning [Tue, 17 Mar 2020 19:51:12 +0000 (08:51 +1300)]
rtems yests: FSX

Add readme and some tweaks.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agoAdd fsx file test and split up basic tests.
Charles Manning [Tue, 17 Mar 2020 03:45:01 +0000 (16:45 +1300)]
Add fsx file test and split up basic tests.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agortems support: Rudimentary test harness now working.
Charles Manning [Fri, 13 Mar 2020 03:33:23 +0000 (16:33 +1300)]
rtems support: Rudimentary test harness now working.

Lots more test cases to add.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agoMakefile.rtems: Add a few missing files
Charles Manning [Fri, 13 Mar 2020 01:33:31 +0000 (14:33 +1300)]
Makefile.rtems: Add a few missing files

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agoyaffs_tagsmarshall.c: Fix prototype dependency
Charles Manning [Fri, 13 Mar 2020 01:32:24 +0000 (14:32 +1300)]
yaffs_tagsmarshall.c: Fix prototype dependency

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agortems_yaffs: Remove unnecessary flushing of symlink
Charles Manning [Thu, 12 Mar 2020 23:26:37 +0000 (12:26 +1300)]
rtems_yaffs: Remove unnecessary flushing of symlink

Flushing only has meaning on regular files which have cached data.
Symlinks do not have any cached data, therefore flushing has no purpose. Remove.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agortems-yaffs: Checkpoint the filesystem at unmount time
Jonathan Brandmeyer [Thu, 12 Mar 2020 23:01:06 +0000 (12:01 +1300)]
rtems-yaffs: Checkpoint the filesystem at unmount time

Adding a checkpoint greatly reduces the amount of time required to mount
the filesystem on the next boot.  After a clean unmount, remount time
is only a second or few.  After an unclean reboot, remount time requires
a scan of the filesystem, which can take a few minutes.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agortems_yaffs: Add symlink support
Jonathan BrandMeyer [Thu, 12 Mar 2020 22:54:55 +0000 (11:54 +1300)]
rtems_yaffs: Add symlink support

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agortems-yaffs: Modes to freshen to latest Yaffs and build in yaffs2/rtems
Charles Manning [Thu, 6 Feb 2020 22:20:32 +0000 (11:20 +1300)]
rtems-yaffs: Modes to freshen to latest Yaffs and build in yaffs2/rtems

Makefile uses symlinks to files outside yaffs2/rtems aso that rtems can be built without
modifying the directory structure and deleting files.

Various tweaks needed to support changes in function prototypes.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agoImport rtems wrapper from rtems git
Sebastian Huber [Thu, 6 Feb 2020 20:03:41 +0000 (09:03 +1300)]
Import rtems wrapper from rtems git

https://git.rtems.org/sebh/rtems-yaffs2.git/
Commit:  23be2ac372173ecf701a0a

Most of this work was authored by

Sebastian Huber <sebastian.huber@embedded-brains.de>
Sebastien Bourdeauducq <sebastien@milkymist.org>

Note that the RTEMS licencing applies to all the rtems wrapper code.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
4 years agofix memory leak when /proc/yaffs is read
Charles Manning [Mon, 21 Oct 2019 19:46:14 +0000 (08:46 +1300)]
fix memory leak when /proc/yaffs is read

Thanks to Jisheng Zhang <Jisheng.Zhang@synaptics.com> for supplying this patch

There is a kernel memory leak observed when the proc file /proc/yaffs
is read. This reason is that in yaffs_proc_open, single_open is called
and the respective release function is not called during release.

Fix with correct release function - single_release().

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
5 years agoFix race yaffs_flush_inodes against iput
chengchao [Mon, 28 Jan 2019 03:19:15 +0000 (11:19 +0800)]
Fix race yaffs_flush_inodes against iput

needs inode->i_sb->s_inode_list_lock protects
  inode->i_sb->s_inodes, inode->i_sb_list

Signed-off-by: chengchao <chengchao@kedacom.com>
5 years agoAkiko: Fix Yaffs Linux compilation for 4.9 to 4.19
Charles Manning [Tue, 15 Jan 2019 00:00:17 +0000 (13:00 +1300)]
Akiko: Fix Yaffs Linux compilation for 4.9 to 4.19

Thanks Akiko for supplying this patch

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
5 years agoOnly load name if read succeeds
Charles Manning [Mon, 14 Jan 2019 23:58:21 +0000 (12:58 +1300)]
Only load name if read succeeds

Thanks Akiko for supplying this patch.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
5 years agoMerge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2
Charles Manning [Mon, 6 Aug 2018 21:48:35 +0000 (09:48 +1200)]
Merge branch 'master' of ssh://aleph1.co.uk/home/aleph1/git/yaffs2

5 years agoClean up some version dependencies
Charles Manning [Mon, 6 Aug 2018 21:48:11 +0000 (09:48 +1200)]
Clean up some version dependencies

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
5 years agoFix hang caused by returning with lock held
Charles Manning [Mon, 23 Jul 2018 05:04:23 +0000 (17:04 +1200)]
Fix hang caused by returning with lock held

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
5 years agoFix building for mkyaffsimage and mkyaffs2image
Charles Manning [Mon, 23 Jul 2018 03:26:09 +0000 (15:26 +1200)]
Fix building for mkyaffsimage and mkyaffs2image

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
6 years agoFix copyright
Charles Manning [Mon, 26 Feb 2018 04:34:01 +0000 (17:34 +1300)]
Fix copyright

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
6 years agoClean up some compilation warnings for VxWorks aleph1-release
Charles Manning [Fri, 11 Aug 2017 04:28:05 +0000 (16:28 +1200)]
Clean up some compilation warnings for VxWorks

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
6 years agoAdd Adre's patch for Linux 4.9
Charles Manning [Sun, 7 May 2017 22:02:11 +0000 (10:02 +1200)]
Add Adre's patch for Linux 4.9

Kudos to Andre Renaud <andre@ignavus.net>

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
7 years agoAdd struct definition to yaffs_nameval header
Charles Manning [Thu, 6 Apr 2017 02:11:05 +0000 (14:11 +1200)]
Add struct definition to yaffs_nameval header

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
7 years agoyaffs direct: Fix opening of a directory.
Charles Manning [Mon, 3 Apr 2017 04:49:42 +0000 (16:49 +1200)]
yaffs direct: Fix opening of a directory.

If opening a directory using yaffs_open(), Yaffs Direct was checking
that the file was being opened with O_RDONLY.

In fact those flags should actually be ignored and it should be treated
as if opened O_RDONLY.

Therefore override flags if opening a directory.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
7 years agoChanges to test scripts
Charles Manning [Sat, 3 Dec 2016 05:47:16 +0000 (18:47 +1300)]
Changes to test scripts

These just clean up a few things.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>