Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion dedupe.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,14 @@ static void process_dedupes(struct dedupe_ctxt *ctxt,
req->req_loff += info->bytes_deduped;
req->req_total += info->bytes_deduped;

if (info->status || req->req_total >= ctxt->orig_len) {
/*
* A successful ioctl that deduped nothing has made no
* progress, so re-queueing would resubmit an identical
* request forever. Treat it as complete instead: req_total
* already reflects what was really deduped.
*/
if (info->status || req->req_total >= ctxt->orig_len ||
!info->bytes_deduped) {
/*
* Only bother taking the final status (the
* rest will be 0)
Expand Down