Skip to content
Snippets Groups Projects
  • Simon McVittie's avatar
    b5441dc6
    pressure-vessel: Warn if we have to fall back to copying · b5441dc6
    Simon McVittie authored
    pressure-vessel is designed to use hard-links when preparing the
    container runtime, and we rely on them to get fast startup and not waste
    disk space. If we can't link() a file to its counterpart in the
    temporary runtime directory, log a warning so that people know they are
    in a situation that shouldn't really happen.
    
    To avoid spurious warnings if the copy fallback would also have failed
    with a fatal error, defer the warning until after the first copy
    fallback has succeeded. That way, if we can't write to the variable
    data directory at all (for example EROFS or something), we won't
    complain about link() failing, just show the fatal error from the copy
    fallback also failing.
    
    Helps: https://github.com/ValveSoftware/steam-runtime/issues/495
    
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
    b5441dc6
    History
    pressure-vessel: Warn if we have to fall back to copying
    Simon McVittie authored
    pressure-vessel is designed to use hard-links when preparing the
    container runtime, and we rely on them to get fast startup and not waste
    disk space. If we can't link() a file to its counterpart in the
    temporary runtime directory, log a warning so that people know they are
    in a situation that shouldn't really happen.
    
    To avoid spurious warnings if the copy fallback would also have failed
    with a fatal error, defer the warning until after the first copy
    fallback has succeeded. That way, if we can't write to the variable
    data directory at all (for example EROFS or something), we won't
    complain about link() failing, just show the fatal error from the copy
    fallback also failing.
    
    Helps: https://github.com/ValveSoftware/steam-runtime/issues/495
    
    
    Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>