move CachedChunkReader to pbs-datastore

this was actually still missing from the previous commit

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2021-07-21 14:20:00 +02:00
parent eb5e0ae65a
commit ef4df211ab
5 changed files with 7 additions and 7 deletions

View File

@ -10,6 +10,7 @@ anyhow = "1.0"
base64 = "0.12" base64 = "0.12"
crc32fast = "1" crc32fast = "1"
endian_trait = { version = "0.6", features = [ "arrays" ] } endian_trait = { version = "0.6", features = [ "arrays" ] }
futures = "0.3"
libc = "0.2" libc = "0.2"
log = "0.4" log = "0.4"
nix = "0.19.1" nix = "0.19.1"

View File

@ -13,10 +13,11 @@ use tokio::io::{AsyncRead, AsyncSeek, ReadBuf};
use proxmox::io_format_err; use proxmox::io_format_err;
use proxmox::sys::error::io_err_other; use proxmox::sys::error::io_err_other;
use pbs_datastore::index::IndexFile;
use pbs_datastore::read_chunk::AsyncReadChunk;
use pbs_tools::async_lru_cache::{AsyncCacher, AsyncLruCache}; use pbs_tools::async_lru_cache::{AsyncCacher, AsyncLruCache};
use crate::index::IndexFile;
use crate::read_chunk::AsyncReadChunk;
struct AsyncChunkCacher<T> { struct AsyncChunkCacher<T> {
reader: Arc<T>, reader: Arc<T>,
} }

View File

@ -180,6 +180,7 @@ pub fn backup_group() -> Result<nix::unistd::Group, Error> {
pub mod backup_info; pub mod backup_info;
pub mod catalog; pub mod catalog;
pub mod cached_chunk_reader;
pub mod checksum_reader; pub mod checksum_reader;
pub mod checksum_writer; pub mod checksum_writer;
pub mod chunk_stat; pub mod chunk_stat;

View File

@ -75,6 +75,7 @@ pub use pbs_datastore::prune::*;
pub use pbs_datastore::store_progress::StoreProgress; pub use pbs_datastore::store_progress::StoreProgress;
pub use pbs_datastore::cached_chunk_reader::*;
pub use pbs_datastore::dynamic_index::*; pub use pbs_datastore::dynamic_index::*;
pub use pbs_datastore::fixed_index; pub use pbs_datastore::fixed_index;
pub use pbs_datastore::fixed_index::*; pub use pbs_datastore::fixed_index::*;
@ -91,9 +92,6 @@ pub use datastore::*;
mod verify; mod verify;
pub use verify::*; pub use verify::*;
mod cached_chunk_reader;
pub use cached_chunk_reader::*;
pub struct BackupLockGuard(std::fs::File); pub struct BackupLockGuard(std::fs::File);
/// Open or create a lock file owned by user "backup" and lock it. /// Open or create a lock file owned by user "backup" and lock it.

View File

@ -20,12 +20,11 @@ use proxmox::tools::fd::Fd;
use pbs_datastore::{BackupDir, BackupGroup, CryptConfig, load_and_decrypt_key}; use pbs_datastore::{BackupDir, BackupGroup, CryptConfig, load_and_decrypt_key};
use pbs_datastore::index::IndexFile; use pbs_datastore::index::IndexFile;
use pbs_datastore::dynamic_index::BufferedDynamicReader; use pbs_datastore::dynamic_index::BufferedDynamicReader;
use pbs_datastore::cached_chunk_reader::CachedChunkReader;
use pbs_client::tools::key_source::get_encryption_key_password; use pbs_client::tools::key_source::get_encryption_key_password;
use pbs_client::{BackupReader, RemoteChunkReader}; use pbs_client::{BackupReader, RemoteChunkReader};
use pbs_tools::json::required_string_param; use pbs_tools::json::required_string_param;
use proxmox_backup::backup::CachedChunkReader;
use crate::{ use crate::{
REPO_URL_SCHEMA, REPO_URL_SCHEMA,
extract_repository_from_value, extract_repository_from_value,