From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Manning Subject: Handling sync system calls Date: Wed, 10 May 2006 23:25:43 +1200 Message-ID: <200605102325.43775.manningc2@actrix.gen.nz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from pop3.scorch.co.nz ([203.167.215.14]:16110 "HELO firstline.co.nz") by vger.kernel.org with SMTP id S964925AbWEJLSa (ORCPT ); Wed, 10 May 2006 07:18:30 -0400 To: linux-fsdevel@vger.kernel.org Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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