From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Fleetwood Subject: Re: Atomic file data replace API Date: Fri, 7 Jan 2011 13:55:07 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: linux-btrfs@vger.kernel.org To: Olaf van der Spek Return-path: In-Reply-To: List-ID: On 6 January 2011 20:01, Olaf van der Spek wrote: > Hi, > > Does btrfs support atomic file data replaces? Hi Olaf, Yes btrfs does support atomic replace, since kernel 2.6.30 circa June 2009. [1] Special handling was added to ext3, ext4, btrfs (and probably other Linux FSs) for your replace-via-truncate and the alternative replace-via-rename application patterns. Try reading "Delayed allocation and the zero-length file problem" article and comments by Ted Ts'o for further discussion. [2] Mike -- [1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a3f23d515a2ebf0c750db80579ca57b28cbce6d [2] http://thunk.org/tytso/blog/2009/03/12/delayed-allocation-and-the-zero-length-file-problem/