datastore: make unsafe fn public again, useful for example/test

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-06-03 17:10:17 +02:00
parent 615a50c108
commit 519ca9d010
1 changed files with 2 additions and 3 deletions

View File

@ -180,8 +180,7 @@ impl DataStore {
/// ///
/// # Safety /// # Safety
/// See the safety section in `open_from_config` /// See the safety section in `open_from_config`
#[allow(dead_code)] pub unsafe fn open_path(
pub(crate) unsafe fn open_path(
name: &str, name: &str,
path: impl AsRef<Path>, path: impl AsRef<Path>,
operation: Option<Operation>, operation: Option<Operation>,
@ -203,7 +202,7 @@ impl DataStore {
/// chunkstore's process locker will close all locks from our process on the config.path, /// chunkstore's process locker will close all locks from our process on the config.path,
/// breaking guarantees we need to uphold for safe long backup + GC interaction on newer/older /// breaking guarantees we need to uphold for safe long backup + GC interaction on newer/older
/// process instances (from package update). /// process instances (from package update).
pub(crate) unsafe fn open_from_config( unsafe fn open_from_config(
config: DataStoreConfig, config: DataStoreConfig,
operation: Option<Operation>, operation: Option<Operation>,
) -> Result<Arc<Self>, Error> { ) -> Result<Arc<Self>, Error> {