[pbs-devel] [PATCH proxmox-backup 06/11] gc: avoid race between phase1 and forget/prune

Dietmar Maurer dietmar at proxmox.com
Thu Oct 15 07:17:23 CEST 2020


> @Dietmar: I went with the anyhow .context() method again - I know we talked
> about this, but using a std::io::Error directly also doesn't solve the problem,
> since we do a (io_)format_err(...) which removes the context again. And if we
> return the IO error directly, we'd have to add that text formatting to all call
> sites, or drop it entirely, which I both rather dislike.

Simply use File::open ??

let file = match std::fs::File::open(...)  {
 // check errors
};

let index =  FixedIndexReader::new(file)?;





More information about the pbs-devel mailing list