client: pxar: warn user and ignore stale file handles on file open

Do not fail hard if a file open fails because of a stale file handle.
Warn the user and ignore the file, just like the client already does
in case of missing privileges to access the file.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
Christian Ebner 2024-11-14 15:41:13 +01:00 committed by Fabian Grünbichler
parent 102ab18146
commit efb49d8abe

View File

@ -484,6 +484,10 @@ impl Archiver {
log::warn!("failed to open file: {:?}: access denied", file_name);
Ok(None)
}
Err(Errno::ESTALE) => {
self.report_stale_file_handle(None);
Ok(None)
}
Err(Errno::EPERM) if !noatime.is_empty() => {
// Retry without O_NOATIME:
noatime = OFlag::empty();