From: "Pádraig Brady" <P@draigBrady.com>
To: Marti Raudsepp <marti@juffo.org>
Cc: Chris Mason <chris.mason@oracle.com>,
Josef Bacik <josef@redhat.com>,
btrfs hackers <linux-btrfs@vger.kernel.org>,
Kernel hackers <linux-kernel@vger.kernel.org>,
8001@debbugs.gnu.org
Subject: Re: btrfs: compression breaks cp and cross-FS mv, FS_IOC_FIEMAP bug?
Date: Tue, 15 Feb 2011 11:30:38 +0000 [thread overview]
Message-ID: <4D5A63DE.3040600@draigBrady.com> (raw)
In-Reply-To: <AANLkTi=N8DiusfP6Rey=Cx4qjUSbiLS3jnbjASGQ=Lcx@mail.gmail.com>
On 14/02/11 17:58, Marti Raudsepp wrote:
> On Mon, Feb 14, 2011 at 17:01, Chris Mason <chris.mason@oracle.com> 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
> % rm -f foo bar
> % echo foo > foo
> % sync
> % filefrag -v foo
> Filesystem type is: 9123683e
> File size of foo is 4 (1 block, blocksize 4096)
> ext logical physical expected length flags
> 0 0 0 4096 not_aligned,inline,eof
> foo: 1 extent found
> % cp foo bar
> % hexdump bar
> 0000000 6f66 0a6f
> 0000004
OK that's fine for normal files.
cp (from coreutils >= 8.10) may still do the wrong thing
as it currently ignores FIEMAP_EXTENT_DATA_ENCRYPTED and FIEMAP_EXTENT_ENCODED
as I've already reported:
http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg08356.html
I'd appreciate some `filefrag -v` output from a large compressed file.
cheers,
Pádraig.
next prev parent reply other threads:[~2011-02-15 11:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-13 15:49 btrfs: compression breaks cp and cross-FS mv, FS_IOC_FIEMAP bug? Marti Raudsepp
2011-02-13 15:57 ` Josef Bacik
2011-02-13 16:07 ` Marti Raudsepp
2011-02-13 16:13 ` Josef Bacik
2011-02-14 15:01 ` Chris Mason
2011-02-14 17:58 ` Marti Raudsepp
2011-02-14 18:01 ` Chris Mason
2011-02-15 11:30 ` Pádraig Brady [this message]
2011-02-15 13:18 ` Josef Bacik
2011-02-13 16:31 ` Hugo Mills
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D5A63DE.3040600@draigBrady.com \
--to=p@draigbrady.com \
--cc=8001@debbugs.gnu.org \
--cc=chris.mason@oracle.com \
--cc=josef@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marti@juffo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox