clone syscall fails for bedup-deduplicated files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux