From mboxrd@z Thu Jan 1 00:00:00 1970 From: jim owens Subject: Re: btrfs O_DIRECT was [rfc] fsync_range? Date: Wed, 21 Jan 2009 18:08:42 -0500 Message-ID: <4977AAFA.7050503@hp.com> References: <20090121031500.GA2354@shareable.org> <20090121041604.GI24891@wotan.suse.de> <20090121045921.GA3944@shareable.org> <20090121062306.GK24891@wotan.suse.de> <20090121121308.GA31253@mit.edu> <20090121123711.GA10637@shareable.org> <20090121141207.GD31253@mit.edu> <1232548550.17244.3.camel@think.oraclecorp.com> <20090121204105.GA16133@shareable.org> <4977926E.30703@hp.com> <20090121215921.GG16133@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Chris Mason , linux-fsdevel@vger.kernel.org To: Jamie Lokier Return-path: Received: from g1t0028.austin.hp.com ([15.216.28.35]:12240 "EHLO g1t0028.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753283AbZAUXIo (ORCPT ); Wed, 21 Jan 2009 18:08:44 -0500 In-Reply-To: <20090121215921.GG16133@shareable.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Jamie Lokier wrote: > > Writing in place or new-place on a *non-shared* (i.e. non-snapshotted) > file is the choice which is useful. It's a filesystem implementation > detail, not a semantic difference. I'm suggesting writing in place > may do no harm and be more like the expected behaviour with programs > that use O_DIRECT, which are usually databases. > > How about a btrfs mount option? > in_place_write=never/always/direct_only. (Default direct_only). The harm is creating a special guarantee for just one case of "don't move my data" based on a transient file open mode. What about defragmenting or moving the extent to another device for performance or for (failing) device removal? We are on a slippery slope for presumed expectations. jim