From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: RFC: O_PONIES semantics (well O_REWRITE) Date: Thu, 11 Jun 2009 20:20:28 -0600 Message-ID: <20090612022028.GB19977@parisc-linux.org> References: <4A3057DD.1050703@redhat.com> <20090612020738.GD25550@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Rik van Riel , linux-fsdevel , Ray Strode , elb@psg.com To: Jamie Lokier Return-path: Received: from palinux.external.hp.com ([192.25.206.14]:40630 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751851AbZFLCU0 (ORCPT ); Thu, 11 Jun 2009 22:20:26 -0400 Content-Disposition: inline In-Reply-To: <20090612020738.GD25550@shareable.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jun 12, 2009 at 03:07:38AM +0100, Jamie Lokier wrote: > > Some of the common failures are: > > - program overwrites the old config file > > - program writes a new file, but forgets to fsync before rename > > - program writes the new file in /tmp, so the rename fails on > > some systems > > - program writes a new file and fsyncs, but forgets to give the > > new file the same file ownership, permission and/or extended > > attributes as the old file > > It's also really hard to do those things from shell scripts, so they > are almost never done there. That's a good point, but O_(PONIES|REWRITE) doesn't fix that problem, since shell scripts can't specify it, and shells can't do it automatically for all files created. -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."