Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030409AbVJGP3j (ORCPT ); Fri, 7 Oct 2005 11:29:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030404AbVJGP3j (ORCPT ); Fri, 7 Oct 2005 11:29:39 -0400 Received: from 223-177.adsl.pool.ew.hu ([193.226.223.177]:40712 "EHLO dorka.pomaz.szeredi.hu") by vger.kernel.org with ESMTP id S1030391AbVJGP3i (ORCPT ); Fri, 7 Oct 2005 11:29:38 -0400 To: trond.myklebust@fys.uio.no CC: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org In-reply-to: <1128698035.8583.36.camel@lade.trondhjem.org> (message from Trond Myklebust on Fri, 07 Oct 2005 11:13:55 -0400) Subject: Re: [RFC] atomic create+open References: <1128616864.8396.32.camel@lade.trondhjem.org> <1128619526.16534.8.camel@lade.trondhjem.org> <1128620528.16534.26.camel@lade.trondhjem.org> <1128623899.31797.14.camel@lade.trondhjem.org> <1128626258.31797.34.camel@lade.trondhjem.org> <1128633138.31797.52.camel@lade.trondhjem.org> <1128692289.8519.75.camel@lade.trondhjem.org> <1128698035.8583.36.camel@lade.trondhjem.org> Message-Id: From: Miklos Szeredi Date: Fri, 07 Oct 2005 17:28:03 +0200 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1116 Lines: 39 > > You can replace the inode in ->create_open() if you want to. > > Thinking a bit more clearly after a cup of coffee. This statement isn't > even true. > > Your pseudo-code offers no guarantees that you are the sole user of the > dentry once you get to create_open(). You are right. I meant, replace the dentry. > > Or let the VFS redo the lookup (as if d_revalidate() returned 0). > > Which may return yet another result for the dentry and another race. > There is no guarantee that you will ever make progress if someone is > doing something like. > > while true > do > echo "1" > foo > echo "2" > foo > done > > on the server. Not good example. This won't change the file, only the contents. Something with rename would be better. We are still pitting two different races against each other. I can't see such a big difference in ugliness... Miklos - 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/