Skip to content
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

builder: fix lost hardlink #413

Merged
merged 1 commit into from
May 6, 2022

Commits on May 6, 2022

  1. builder: fix lost hardlink

    The merge operation in builder (nydus-image) use `RafsSuper::walk_inodes`
    method to walkthrough the whole filesystem inodes by DFS order, but it
    does not call the callback for the hardlink pair, which causes some hardlink
    files to be lost in the final bootstrap after merge.
    
    The root cause is that the `RafsSuper::get_inode` method always gets only
    the RafsInode of a particular file name in the hardlink pair because the ino
    numbers of the hardlink pair are the same.
    
    Fix by passing `RafsInode` trait object in `RafsSuper::walk_inodes` directly.
    
    Signed-off-by: Yan Song <imeoer@linux.alibaba.com>
    imeoer committed May 6, 2022
    Configuration menu
    Copy the full SHA
    ad778db View commit details
    Browse the repository at this point in the history