Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759881AbZD2Ts2 (ORCPT ); Wed, 29 Apr 2009 15:48:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760661AbZD2Tru (ORCPT ); Wed, 29 Apr 2009 15:47:50 -0400 Received: from sca-es-mail-2.Sun.COM ([192.18.43.133]:63130 "EHLO sca-es-mail-2.sun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760808AbZD2Trs (ORCPT ); Wed, 29 Apr 2009 15:47:48 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-disposition: inline Content-type: text/plain; charset=us-ascii Date: Wed, 29 Apr 2009 13:47:31 -0600 From: Andreas Dilger Subject: Re: [PATCH RFC] ext3 data=guarded v5 In-reply-to: <1241016181.20099.31.camel@think.oraclecorp.com> To: Chris Mason Cc: Jan Kara , Linus Torvalds , "Theodore Ts'o" , Linux Kernel Developers List , Ext4 Developers List , Mike Galbraith Message-id: <20090429194731.GJ3209@webber.adilger.int> X-GPG-Key: 1024D/0D35BED6 X-GPG-Fingerprint: 7A37 5D79 BF1B CECA D44F 8A29 A488 39F5 0D35 BED6 References: <1240941840.15136.44.camel@think.oraclecorp.com> <20090429085632.GA18273@duck.suse.cz> <1241014093.20099.28.camel@think.oraclecorp.com> <1241016181.20099.31.camel@think.oraclecorp.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1028 Lines: 25 On Apr 29, 2009 10:43 -0400, Chris Mason wrote: > On Wed, 2009-04-29 at 10:08 -0400, Chris Mason wrote: > > This would mean IO completion (clearing PG_writeback) would have to wait > > on the inode mutex, which we can't quite do in O_SYNC and O_DIRECT. > > But, what I can do is check i_nlink after the ext3_orphan_del call and > > put the inode back on the orphan list if it has gone to zero. > > Ugh, that won't work, we'll just race with link and risk an orphan that > never gets removed. I'll make a version of ext3_orphan_del that expects > the super lock held and use that instead. I looks like ext3_link() checks for i_nlink == 0 and returns -ENOENT to avoid this race. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/