From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 0/12] make ->sync_fs mandatory Date: Mon, 8 Jun 2009 10:04:35 +0200 Message-ID: <20090608080434.GF20735@lst.de> References: <20090608080252.GA20735@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: viro@zeniv.linux.org.uk Return-path: Received: from verein.lst.de ([213.95.11.210]:33392 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753841AbZFHIEd (ORCPT ); Mon, 8 Jun 2009 04:04:33 -0400 Content-Disposition: inline In-Reply-To: <20090608080252.GA20735@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Add a ->sync_fs method for data integrity syncs. Signed-off-by: Christoph Hellwig Index: vfs-2.6/fs/fat/inode.c =================================================================== --- vfs-2.6.orig/fs/fat/inode.c 2009-06-05 16:13:39.945939714 +0200 +++ vfs-2.6/fs/fat/inode.c 2009-06-05 16:15:30.220939883 +0200 @@ -449,6 +449,16 @@ static void fat_write_super(struct super unlock_super(sb); } +static int fat_sync_fs(struct super_block *sb, int wait) +{ + lock_super(sb); + fat_clusters_flush(sb); + sb->s_dirt = 0; + unlock_super(sb); + + return 0; +} + static void fat_put_super(struct super_block *sb) { struct msdos_sb_info *sbi = MSDOS_SB(sb); @@ -641,6 +651,7 @@ static const struct super_operations fat .delete_inode = fat_delete_inode, .put_super = fat_put_super, .write_super = fat_write_super, + .sync_fs = fat_sync_fs, .statfs = fat_statfs, .clear_inode = fat_clear_inode, .remount_fs = fat_remount,