X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.168.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m9T5RBbq007633 for ; Tue, 28 Oct 2008 22:27:11 -0700 X-ASG-Debug-ID: 1225258030-0d4700800000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail01.adl6.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id BF132556CFC for ; Tue, 28 Oct 2008 22:27:11 -0700 (PDT) Received: from ipmail01.adl6.internode.on.net (ipmail01.adl6.internode.on.net [203.16.214.146]) by cuda.sgi.com with ESMTP id 5rnpDDNClKvpkk2i for ; Tue, 28 Oct 2008 22:27:11 -0700 (PDT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am4DAM8S9kh5LE2tgWdsb2JhbACTYAEBFiKuDIFr X-IronPort-AV: E=Sophos;i="4.33,505,1220193000"; d="scan'208";a="220493806" Received: from ppp121-44-77-173.lns10.syd6.internode.on.net (HELO disturbed) ([121.44.77.173]) by ipmail01.adl6.internode.on.net with ESMTP; 29 Oct 2008 15:57:09 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1Kv3aF-0004fj-My; Wed, 29 Oct 2008 16:27:07 +1100 Date: Wed, 29 Oct 2008 16:27:07 +1100 From: Dave Chinner To: Nick Piggin Cc: akpm@linux-foundation.org, xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org, Chris Mason , linux-ext4@vger.kernel.org X-ASG-Orig-Subj: Re: [patch 0/9] writeback data integrity and other fixes (take 3) Subject: Re: [patch 0/9] writeback data integrity and other fixes (take 3) Message-ID: <20081029052707.GH4985@disturbed> Mail-Followup-To: Nick Piggin , akpm@linux-foundation.org, xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org, Chris Mason , linux-ext4@vger.kernel.org References: <20081028144715.683011000@suse.de> <20081028153953.GB3082@wotan.suse.de> <20081028222746.GB4985@disturbed> <20081029001653.GF15599@wotan.suse.de> <20081029031645.GE4985@disturbed> <20081029040014.GB17624@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081029040014.GB17624@wotan.suse.de> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail01.adl6.internode.on.net[203.16.214.146] X-Barracuda-Start-Time: 1225258031 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.8953 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On Wed, Oct 29, 2008 at 05:00:14AM +0100, Nick Piggin wrote: > On Wed, Oct 29, 2008 at 02:16:45PM +1100, Dave Chinner wrote: > > FWIW, the core issue here is that we've got to do the > > filemap_fdatawait() call in the ->fsync method because ->fsync > > gets called before we've waited for the data I/O to complete. > > XFS updates inode state on I/O completion, so we *must* wait > > for data I/O to complete before logging the inode changes. I > > think btrfs has the same problem.... > > Interesting. Does that mean you can do without the final filemap_fdatawait? We could, yes. > Can you do the first fdatawait without i_mutex held? I don't see why not - I/O completion is only touching the XFS inode. XFS has it's own inode locks for I/O and inode exclusion, and the mapping tree lock protects the tree walk that the fdatawait is doing... > There was some talk IIRC about moving all this logic into the filesystem > to provide more flexibility here. If there is still enough interest, > we should get that moving... It would simplify some of the code in XFS, that's for sure ;) Cheers, Dave. -- Dave Chinner david@fromorbit.com