From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754156Ab1BONYD (ORCPT ); Tue, 15 Feb 2011 08:24:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:12640 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751113Ab1BONYB (ORCPT ); Tue, 15 Feb 2011 08:24:01 -0500 Date: Tue, 15 Feb 2011 08:18:50 -0500 From: Josef Bacik To: =?iso-8859-1?Q?P=E1draig?= Brady Cc: Marti Raudsepp , Chris Mason , Josef Bacik , btrfs hackers , Kernel hackers , 8001@debbugs.gnu.org Subject: Re: btrfs: compression breaks cp and cross-FS mv, FS_IOC_FIEMAP bug? Message-ID: <20110215131849.GC28010@dhcp231-156.rdu.redhat.com> References: <20110213155730.GK19533@dhcp231-156.rdu.redhat.com> <20110213161329.GL19533@dhcp231-156.rdu.redhat.com> <1297695521-sup-9460@think> <4D5A63DE.3040600@draigBrady.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4D5A63DE.3040600@draigBrady.com> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 15, 2011 at 11:30:38AM +0000, Pádraig Brady wrote: > On 14/02/11 17:58, Marti Raudsepp wrote: > > On Mon, Feb 14, 2011 at 17:01, Chris Mason wrote: > >> Or, it could just be delalloc ;) > > > > I suspect delalloc. After creating the file, filefrag reports "1 > > extent found", but for some reason it doesn't actually print out > > details of the extent. > > That's a bug in `filefrag -v` that I noticed independently yesterday. > Without -v it will correctly report 0 extents. > I've already suggested a patch to fix upstream. > > > After a "sync" call, the extent appears and "cp" starts working as expected: > > About that sync. > I've noticed on ext4 loop back at least (and I suspect BTRFS is the same) > that specifying FIEMAP_FLAG_SYNC (which cp does) is ineffective. > I worked around this for cp tests by explicitly syncing with: > dd if=/dev/null of=foo conv=notrunc,fdatasync > Well thats not good, thats all take care of in the generic code before it gets to the fs, I'll take a look at that when I try and fix delalloc fiemap for btrfs. Thanks, Josef