Skip to contentSkip to conversation

Handling sync system calls

DISCUSSION Charles Manning 1 participant 1 message May 10, 2006 VFS

lore
Share & tools
lore
#0 lore raw

Hi all

I have written a so-called "cechkpointing" mechanism for the YAFFS2 file system that stores a snapshot of the fs structure in some spare flash. When the filesystem gets remounted, this info replaces the normal scanning process and thus significantly speeds up mounting.

At this stage I have managed to attach the "checkpoint" writting to put_super so that the info is stored during a umount, but have had some problems trying to do the same with getting this to work with a sync call.

I don't really want the checkpoint data to get written too often as this will slow down the fs and cause extra flashh wear. I really only want it to happen as part of an explicite sync().

I tried attaching the checkpointing to the write_super() and sync_fs() methods, but these either caused writing more often than I needed, or nothing happened because sb->s_dirt was not set.

As a final twist it would be really handy for the solution to work with both 2.4 and 2.6 kernels. A lot of embedded systems still run 2.4.x.

ANy pointers on how to proceed much appreciated.

Thanx

-- Charles