Skip to content

feat: implement hardlink receiver-side inode/device mapping for daemon push - #3111

Merged
oferchen merged 1 commit into
masterfrom
feat/hardlink-receiver-mapping
Apr 5, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/hardlink-receiver-mapping

Conversation

@oferchen

@oferchen oferchen commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implement receiver-side hardlink inode/device mapping for daemon push transfers
  • Group files by matching dev+ino from the sender's file list entries
  • Create hardlinks via link() syscall on the destination when multiple entries share the same dev/ino pair

Test plan

  • CI passes on all platforms
  • Hardlink interop tests pass

…n push

Normalize protocol 28-29 (dev, ino) pairs into synthetic hardlink_idx
and hlink_first flags during file list reception, so all downstream
code - is_hardlink_follower(), build_files_to_transfer(), and
create_hardlinks() - handles both protocol versions uniformly.

Previously, protocol < 30 hardlinked entries lacked hlink_first (that
bit does not exist on the wire for pre-30), causing is_hardlink_follower()
to incorrectly classify ALL hardlinked files as followers and skip their
transfer entirely.

Removes the now-dead create_hardlinks_pre30() method, InodeDeviceMap
struct, and the rustc-hash dependency from the transfer crate.
@github-actions github-actions Bot added the enhancement New feature or request label Apr 5, 2026
@oferchen
oferchen merged commit dc3fe8f into master Apr 5, 2026
38 checks passed
@oferchen
oferchen deleted the feat/hardlink-receiver-mapping branch April 5, 2026 21:59
oferchen added a commit that referenced this pull request May 1, 2026
…n push (#3111)

Normalize protocol 28-29 (dev, ino) pairs into synthetic hardlink_idx
and hlink_first flags during file list reception, so all downstream
code - is_hardlink_follower(), build_files_to_transfer(), and
create_hardlinks() - handles both protocol versions uniformly.

Previously, protocol < 30 hardlinked entries lacked hlink_first (that
bit does not exist on the wire for pre-30), causing is_hardlink_follower()
to incorrectly classify ALL hardlinked files as followers and skip their
transfer entirely.

Removes the now-dead create_hardlinks_pre30() method, InodeDeviceMap
struct, and the rustc-hash dependency from the transfer crate.
oferchen added a commit that referenced this pull request May 5, 2026
…n push (#3111)

Normalize protocol 28-29 (dev, ino) pairs into synthetic hardlink_idx
and hlink_first flags during file list reception, so all downstream
code - is_hardlink_follower(), build_files_to_transfer(), and
create_hardlinks() - handles both protocol versions uniformly.

Previously, protocol < 30 hardlinked entries lacked hlink_first (that
bit does not exist on the wire for pre-30), causing is_hardlink_follower()
to incorrectly classify ALL hardlinked files as followers and skip their
transfer entirely.

Removes the now-dead create_hardlinks_pre30() method, InodeDeviceMap
struct, and the rustc-hash dependency from the transfer crate.
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