rtems-yaffs: Checkpoint the filesystem at unmount time
authorJonathan Brandmeyer <jbrandmeyer@planetiq.com>
Thu, 12 Mar 2020 23:01:06 +0000 (12:01 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 12 Mar 2020 23:01:06 +0000 (12:01 +1300)
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>
rtems/rtems_yaffs.c

index 6e018aa7746606211c110c57438fbca46a26dfc6..8ee0b899baecb1d51d3a8dcf257803bbccf88095 100644 (file)
@@ -641,6 +641,7 @@ static void ryfs_fsunmount(rtems_filesystem_mount_table_entry_t *mt_entry)
 
        ylock(dev);
        yaffs_flush_whole_cache(dev, 1);
+       yaffs_checkpoint_save(dev);
        yaffs_deinitialise(dev);
        yunlock(dev);
        rtems_yaffs_os_unmount(dev);