xfs
[Top] [All Lists]

Re: fsync, rename, O_ATOMIC/O_PONIES

To: Olaf van der Spek <olaf@xxxxxxxx>
Subject: Re: fsync, rename, O_ATOMIC/O_PONIES
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 6 Mar 2012 10:17:26 +1100
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <4F54DF5A.4090301@xxxxxxxx>
References: <4F50BF89.7020909@xxxxxxxx> <20120302131240.GA14186@xxxxxxxxxxxxx> <4F53A2FF.3000305@xxxxxxxx> <20120305010203.GK5091@dastard> <4F54DF5A.4090301@xxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Mar 05, 2012 at 04:44:26PM +0100, Olaf van der Spek wrote:
> On 5-3-2012 2:02, Dave Chinner wrote:
> >>Argh, come on.
> >>That's not real and it's not complete. tmpfile is undefined, errors
> >>aren't handled and you have lots of unlisted assumptions or
> >>regressions.
> >
> >The above is perfectly reasonable psuedo code for quickly describing
> >how to safely overwriting a file. If you want to know about error
> >handling and assumptions, read the man pages for operation.
> 
> But I don't have a psuedo code compiler. Using psuedo code hides
> complexity and bugs. Even the code from Jeff Moyer in the article
> you're refering too contained bugs.
> 
> Don't you think it's quite strange there's no real code available to
> handle this widespread problem?

What you are saying is this:

"I'm too lazy to understand data integrity principles and apply them
to my application. Can someone please write some code perfect for my
needs so I can copy and paste them into my application."

Stop wasting our time by being obtuse and repeating silly arguments
as to why this isn't your problem and instead go read the man pages
and modify the example code you've already been pointed at to do
exactly what you need.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>