Skip to content

feat: add InodeDeviceMap for protocol < 30 hardlink grouping - #3049

Merged
oferchen merged 1 commit into
masterfrom
feature/hardlink-inode-device-map
Mar 30, 2026
Merged

oferchen merged 1 commit into
masterfrom
feature/hardlink-inode-device-map

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add InodeDeviceMap struct that maps sender-side (dev, ino) pairs to local ordinal group indices, mirroring upstream hlink.c:idev_find()
  • Refactor create_hardlinks_pre30() to use ordinal-based grouping via InodeDeviceMap instead of raw HashMap, providing proper abstraction for hardlink group identification
  • Add comprehensive unit tests for InodeDeviceMap: same-pair grouping, different-pair separation, sequential IDs, negative values, and large group counts

Closes #1398

Test plan

  • CI passes fmt+clippy, nextest, Windows, macOS, Linux musl
  • Unit tests verify InodeDeviceMap ordinal assignment correctness
  • Interop tests for hardlinks still pass (oc:hardlinks known failures unrelated)

Introduce InodeDeviceMap struct that maps sender-side (dev, ino) pairs to local ordinal group indices, mirroring upstream hlink.c:idev_find(). Refactor create_hardlinks_pre30() to use ordinal-based grouping instead of raw HashMap, providing proper abstraction for hardlink group identification.

Closes #1398
@github-actions github-actions Bot added the enhancement New feature or request label Mar 30, 2026
@oferchen
oferchen merged commit 94065b6 into master Mar 30, 2026
38 checks passed
@oferchen
oferchen deleted the feature/hardlink-inode-device-map branch March 30, 2026 13:30
oferchen added a commit that referenced this pull request May 1, 2026
Introduce InodeDeviceMap struct that maps sender-side (dev, ino) pairs to local ordinal group indices, mirroring upstream hlink.c:idev_find(). Refactor create_hardlinks_pre30() to use ordinal-based grouping instead of raw HashMap, providing proper abstraction for hardlink group identification.

Closes #1398
oferchen added a commit that referenced this pull request May 5, 2026
Introduce InodeDeviceMap struct that maps sender-side (dev, ino) pairs to local ordinal group indices, mirroring upstream hlink.c:idev_find(). Refactor create_hardlinks_pre30() to use ordinal-based grouping instead of raw HashMap, providing proper abstraction for hardlink group identification.

Closes #1398
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant