-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
du: dedupe reflink bytes #10081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
du: dedupe reflink bytes #10081
Conversation
|
GNU testsuite comparison: |
afa86ce to
44ae977
Compare
|
GNU testsuite comparison: |
1ef975e to
5bc43b7
Compare
|
GNU testsuite comparison: |
Merging this PR will degrade performance by 7.84%
Performance Changes
Comparing Footnotes
|
5bc43b7 to
92b8b94
Compare
d28fb14 to
e27dc67
Compare
|
GNU testsuite comparison: |
|
|
||
| #[cfg(not(windows))] | ||
| use regex::Regex; | ||
| #[cfg(target_os = "linux")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow this is the first time I've seen this notation, this is really nice and would be nice to cleanup our other cfg code
|
Just to clarify that my understanding matches yours. This would be extending past GNU's capabilities instead of matching GNU's capabilities right? Given that its a big change I imagine it would be something that would be reviewed after the issues with GNU compatibility are sorted out |
src/uu/du/src/du.rs
Outdated
|
|
||
| // Check existence of path provided in argument | ||
| let mut seen_inodes: HashSet<FileInfo> = HashSet::new(); | ||
| let mut seen_shared_extents: HashSet<SharedExtentKey> = HashSet::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a pre-existing bug, theres another open PR about moving that seen_inodes out of this loop so that when you pass multiple file names it can deduplicate. Ideally this would be moved outside of the loop too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated it.
yea that's right. |
1513fa4 to
9442287
Compare
b0de817 to
1beaff8
Compare
|
GNU testsuite comparison: |
1beaff8 to
0a3b524
Compare
|
GNU testsuite comparison: |
0a3b524 to
26a4b12
Compare
Close #3906.
Dedupe reflink bytes only when
--apparent-sizeor--bytesflag is set, based on GNU du page.Implementation