[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D17656B.7010603@panasas.com>
Date: Sun, 26 Dec 2010 17:55:23 +0200
From: Boaz Harrosh <bharrosh@...asas.com>
To: Olaf van der Spek <olafvdspek@...il.com>
CC: Nick Piggin <npiggin@...il.com>, Ted Ts'o <tytso@....edu>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-ext4@...r.kernel.org
Subject: Re: Atomic non-durable file write API
On 12/26/2010 05:08 PM, Olaf van der Spek wrote:
>> Please tell us what for. If you have immediate need to replace the
>> name, then you need the durability of fsync. If you don't have
>> immediate need, then you can use another name, surely (until it
>> comes time you want to switch names, at that point you want
>> durability so you fsync then rename).
>
> Temp file, rename has issues with losing meta-data.
>
What if you use a soft link? wouldn't that solve all of your problems?
- do your fsync/fdatasync of choice in a *backend thread* then at the return
- point set to the new link, fsync the link it's very small, therefore fast.
- Then delete the old source file.
You need a simple "name-version" schema and the "name" is kept soft linked.
(You might even skip the last step above and implement an undo stack, some
background management caps on history size)
>>
>>> and this way has other
>>> issues, like losing file meta-data.
>>
With soft links this is persevered?
Same system can be used with lots of files. where the final switch is
the set of a single soft-link say to a folder of related files.
Just me $0.017
Boaz
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists