From: David Sterba <dsterba@suse.cz>
To: Pascal Germroth <pascal@ensieve.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: clone syscall fails for bedup-deduplicated files
Date: Wed, 11 Dec 2013 20:04:54 +0100 [thread overview]
Message-ID: <20131211190454.GC6498@twin.jikos.cz> (raw)
In-Reply-To: <1A5C61DD-175B-4220-BAB5-E5714810501B@ensieve.org>
On Sat, Dec 07, 2013 at 10:31:30PM +0100, Pascal Germroth wrote:
> Running a 3.8 kernel I've been using bedup to deduplicate some files,
> for example two identical 500MB files A & B now share data chunks.
> Running a 3.11 kernel, I wanted to clone some more files, but those
> previously deduplicated by bedup don't work, for example: `cp
> --reflink A C`:
>
> open("A", O_WRONLY|O_TRUNC) = 4
> fstat(4, {st_mode=S_IFREG|0775, st_size=0, ...}) = 0
> ioctl(4, BTRFS_IOC_CLONE, 0x3) = -1 EINVAL (Invalid argument)
This can fail eg when the files have different status wrt checksums,
when one of the files is nocow or created under nodatasum mount (there's
no way to create nodatasum file otherwise, unlike nodatacow).
Look at lsattr output if the files have the C attribute.
david
prev parent reply other threads:[~2013-12-11 19:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-07 21:31 clone syscall fails for bedup-deduplicated files Pascal Germroth
2013-12-11 19:04 ` David Sterba [this message]
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=20131211190454.GC6498@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=pascal@ensieve.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;
as well as URLs for NNTP newsgroup(s).