From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH] 2.5.x write_super is not for syncing Date: Tue, 03 Dec 2002 12:06:58 -0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3DED0EE2.ECE22229@digeo.com> References: <3DEC2080.D801BA13@digeo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: "linux-fsdevel@vger.kernel.org" , Chris Mason , "Stephen C. Tweedie" Return-path: Received: from digeo-nav01.digeo.com (digeo-nav01.digeo.com [192.168.1.233]) by packet.digeo.com (8.9.3+Sun/8.9.3) with SMTP id MAA14141 for ; Tue, 3 Dec 2002 12:06:59 -0800 (PST) To: Bryan Henderson List-Id: linux-fsdevel.vger.kernel.org Bryan Henderson wrote: > > ... > But of course a ->write_super call is the only evidence I have that the > user did a sync(), which is something I need to know. You and the rest of the world. > Unfortunately, a > ->write_super call can also simply mean kupdated is doing its periodic > thing. So the code I had to write to implement sync(), while not looking > like ext2 in a bunch of other ways, horribly abuses the interface, works > differently on different versions of Linux, and in some circumstances isn't > even 100% correct. > > A driver for the same filesystem type on AIX has no problem because AIX has > an equivalent to ->sync_fs and nothing like ->write_super (AIX VFS is more > general -- doesn't pretend to know about things like super blocks). > > So this change looks like it makes Linux as hospitable as AIX to STFS, but > here's where it appears to fall short: It still uses the same VFS call to > implement the sync() system call as to implement kupdated's purpose. > Could there be a separate function or an argument, or do I have to continue > looking at the process name to distinguish them? Oh darn. Yes, both kupdate and sync call sync_supers(). But kupdate should not call ->sync_fs. I'll fix that up. The intent is that ->sync_fs() should only be called for sync, unmount, etc.