Skip to content

duperemove is stuck on NoCOW files #375

@trofi

Description

@trofi

The reproducer against v0.15.1:

$ dd if=/dev/urandom bs=8M count=1 > a
$ touch b
$ chattr +C b
$ cat a >> b

$ lsattr a b
---------------------- a
---------------C------ b

$ ./duperemove -d -q --batchsize=0 --dedupe-options=partial,same a b
Simple read and compare of file data found 1 instances of files that might benefit from deduplication.
<hung up>

Looking at a bit more detail duperemove seems to retry on a EINVAL error when dedupe fails:

$ strace -f -y ./duperemove -d -q --batchsize=0 --dedupe-options=partial,same a b
...
[pid 3731088] ioctl(3</mnt/archive/big/git/duperemove/a>, BTRFS_IOC_FILE_EXTENT_SAME or FIDEDUPERANGE, {src_offset=0, src_length=8388608, dest_count=1, info=[{dest_fd=4</mnt/archive/big/git/duperemove/b>, dest_offset=0}]} => {info=[{bytes_deduped=0, status=-22}]}) = 0
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions