From efb49d8abe3648bca23f136fe8a49a157e9bf31e Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Thu, 14 Nov 2024 15:41:13 +0100 Subject: [PATCH] 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 --- pbs-client/src/pxar/create.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pbs-client/src/pxar/create.rs b/pbs-client/src/pxar/create.rs index a7521424..3a6e9b15 100644 --- a/pbs-client/src/pxar/create.rs +++ b/pbs-client/src/pxar/create.rs @@ -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();