From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [patch 3/4] fs: introduce inode dirty state helpers Date: Tue, 23 Nov 2010 00:44:25 +1100 Message-ID: References: <20101122130507.GC12716@amd> <20101122130733.GE12716@amd> <20101122132552.GC25321@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: Nick Piggin , linux-fsdevel@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mail-ey0-f174.google.com ([209.85.215.174]:62584 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754764Ab0KVNog (ORCPT ); Mon, 22 Nov 2010 08:44:36 -0500 Received: by eye27 with SMTP id 27so3809694eye.19 for ; Mon, 22 Nov 2010 05:44:35 -0800 (PST) In-Reply-To: <20101122132552.GC25321@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Nov 23, 2010 at 12:25 AM, Christoph Hellwig wrote: > On Tue, Nov 23, 2010 at 12:07:33AM +1100, Nick Piggin wrote: >> Inode dirty state cannot be securely tested without participating properly >> in the inode writeback protocol. Some filesystems need to check this state, >> so break out the code into helpers and make them available. >> >> This could also be used to reduce strange interactions between background >> writeback and fsync. Currently if we fsync a single page in a file, the >> entire file gets requeued to the back of the background IO list, even if >> it is due for writeout and has a large number of pages. That's left for >> a later time. > > If you want filesystems to use the helpers they need to be exported, > and good kerneldoc comments so that filesystem writers know what they > need to do. You're right, of course. I sent a half-baked patch there sorry. (Well, it should be working quite well, but it needs exports and decent kerneldoc as you say). Will send an update tomorrow.