From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Mason Subject: Re: [PATCH] add -o flush for fat Date: Sat, 5 Aug 2006 08:26:29 -0400 Message-ID: <20060805122629.GG1048@watt.suse.com> References: <20060804192721.GF1048@watt.suse.com> <20060804183149.954b0e59.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from ns2.suse.de ([195.135.220.15]:41659 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S1161306AbWHEM0x (ORCPT ); Sat, 5 Aug 2006 08:26:53 -0400 To: Andrew Morton Content-Disposition: inline In-Reply-To: <20060804183149.954b0e59.akpm@osdl.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Aug 04, 2006 at 06:31:49PM -0700, Andrew Morton wrote: > > Could we have more detail on what you're trying to do here? > > You've obviously made some decisions about how to handle under-writeback > data, dirty data, integrity versus cleaning, etc. What were those > decisions and what led you to them? The basic idea is that someone watching the blinking light on the usb stick knows that when the light goes out, he can pull the stick out. It's an alternative to mount -o sync that it closer to what users are asking for. There's no attempt at integrity, it only tries to keep a fairly constant flow of data to the device. > > We should document the precise semantics of these two functions, especially > wrt data integrity, handling of dirty-but-under-writeback pages, etc. > (Right now I'm not sure what those semantics are). They are loosely defined. One way to handle dirty-but-under-writeback pages is to add a timer that filemap_fdatawrites the block device. Since fdatawrite is used in the file release call, regular files don't need this, only the block device. This timer isn't added in the patch, but it's an easy addition later. > > I'm also wondering what sync_inode(nr_to_write=0) does ;) I think it writes > one page... It starts a write on the inode and nothing else ;) There are lots of ways to write the inode and wait, but this was the only one I found to write the inode without waiting and then write the data pages while waiting for in flight io. -chris