linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* clone syscall fails for bedup-deduplicated files
@ 2013-12-07 21:31 Pascal Germroth
  2013-12-11 19:04 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Pascal Germroth @ 2013-12-07 21:31 UTC (permalink / raw)
  To: linux-btrfs

Hi,

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)

But I can clone a duplicate of the file just fine: `cp A D; cp --reflink D E` copies A to D and then clones D to E.
So I guess the way bedup deduplicated A broke the btrfs structure in a way that forbids further cloning, but a newly generated file like D can still be cloned.

How could bedup break this, did it manipulate the structures directly in 3.8 without the syscall and corrupt something? How can I repair this? Defragmenting A had no effect.

(If you answer, please CC me directly, I'm not currently subscribed to the list)

Cheers,

-- 
Pascal Germroth

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-11 19:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-07 21:31 clone syscall fails for bedup-deduplicated files Pascal Germroth
2013-12-11 19:04 ` David Sterba

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).