• Illecors@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    2 years ago

    Now you can insta-copy files on the same filesystem, and they can share blocks with each other without being a mirrored hardlink.

    Could you elaborate on this a bit? To my understanding hard links already are the same file, it is only the inode that’s different.

    • Yote.zip@pawb.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      2 years ago

      Reflinks with BTRFS and ZFS start off with behavior similar to hardlinks, but when you modify one of the files it doesn’t change the other one. Hard links share the same inode and edits to one file must affect the other.

      Example:

      • File A: 10GB

      • File B: Reflink’d to File A

      • 10GB total space used, 10GB shared between A and B.

      • Modify 1GB of File A

      • 1GB of new blocks created, 11GB total now used. 9 GB still shared between A and B.