dedupe.c: fix infinite looping on NoCOW files#376
Merged
JackSlateur merged 1 commit intomarkfasheh:masterfrom May 9, 2025
Merged
dedupe.c: fix infinite looping on NoCOW files#376JackSlateur merged 1 commit intomarkfasheh:masterfrom
JackSlateur merged 1 commit intomarkfasheh:masterfrom
Conversation
Without the change dedupe hangs on NoCOW files as:
$ 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>
The regression was introduced by c714a4d
"dedupe: do not grab block transfer for each file" where `fs_blocksize`
initialization was moved from `EINVAL` case to somewhere where it never
gets executed. THat made `INVAL` case loop indefinitely.
THe change moves `fs_blocksize` initialization back to `EINVAL` handling case.
Closes: markfasheh#375
Collaborator
|
Thank you for your contribution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without the change dedupe hangs on NoCOW files as:
The regression was introduced by c714a4d "dedupe: do not grab block transfer for each file" where
fs_blocksizeinitialization was moved fromEINVALcase to somewhere where it never gets executed. THat madeINVALcase loop indefinitely.THe change moves
fs_blocksizeinitialization back toEINVALhandling case.Closes: #375