From owner-freebsd-standards@FreeBSD.ORG Tue Apr 26 15:50:45 2005 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B765F16A4CE; Tue, 26 Apr 2005 15:50:44 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.3/8.13.1) with ESMTP id j3QFoilE018201; Tue, 26 Apr 2005 11:50:44 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.3/8.13.1/Submit) id j3QFoiJF018200; Tue, 26 Apr 2005 11:50:44 -0400 (EDT) (envelope-from green) Date: Tue, 26 Apr 2005 11:50:43 -0400 From: Brian Fundakowski Feldman To: Marc Olzheim Message-ID: <20050426155043.GC5789@green.homeunix.org> References: <20050419160900.GB12287@stack.nl> <20050419161616.GF1157@green.homeunix.org> <20050419204723.GG1157@green.homeunix.org> <20050420140409.GA77731@stack.nl> <20050420142448.GH1157@green.homeunix.org> <20050420143842.GB77731@stack.nl> <16998.36437.809896.936800@khavrinen.csail.mit.edu> <20050420173859.GA99695@stack.nl> <20050426140701.GB5789@green.homeunix.org> <20050426151751.GB68038@stack.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050426151751.GB68038@stack.nl> User-Agent: Mutt/1.5.6i cc: Garrett Wollman cc: freebsd-standards@freebsd.org Subject: Re: NFS client/buffer cache deadlock X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2005 15:50:45 -0000 On Tue, Apr 26, 2005 at 05:17:51PM +0200, Marc Olzheim wrote: > On Tue, Apr 26, 2005 at 10:07:01AM -0400, Brian Fundakowski Feldman wrote: > > > Could someone from standards comment here ? I believe Garrett is > > > right... > > > (thread is on -hackers and -current) > > > > What prevents you from using O_FSYNC | O_APPEND to get the > > functionality you desire? The semantics of IO_UNIT -- atomic writes > > -- are definitely defined and assumed to function properly by the rest > > of the kernel. Allowing asynchronous unbounded atomic appends is > > impossible, so something must be done to prevent deadlock. Breaking > > IO_UNIT really shouldn't be considered as a solution. Automatically > > turning the write into a synchronous + atomic append if an asynchrous > > + atomic append is not possible might follow POLA best. > > I don't care whether a user application corrupts it's own data by > writing simultaneously to the same file from different hosts; that's the > choice of the application. What I want is when the application behaves > and is the only one writing to the file, that that writev() succeeds. > > I'm okay with the fact that simultaneous huge writes to the same file > over NFS could lead to corruption and that the exact outcome is > undefined. > > This is exactly how it was in FreeBSD 4.x and that's perfectly workable. > > But that's just my way of looking at it and certainly not ideal. :-/ I don't know what you mean. The exact same bug should exists in 4.x, and should cause a system deadlock in exactly the same scenario. Simultaneous huge writes for NFSv3 were and still are atomic and I do not intend to break that -- just make it so they won't deadlock the system. I'm not okay with making applications suddenly start corrupting data. Why can't you use O_FSYNC for your huge writes? I'm willing to bet that its semantics are exactly what you're looking for. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\