Accept safe overlay work residue after unmount
This commit is contained in:
parent
e60baad993
commit
d38357a65d
1 changed files with 80 additions and 12 deletions
|
|
@ -34,10 +34,11 @@ use rustix::io::dup;
|
|||
use rustix::thread::{ThreadNameSpaceType, move_into_thread_name_spaces};
|
||||
use storage::{
|
||||
atomic_replace_at, create_directory, create_regular_file, descriptor_child_path,
|
||||
descriptor_path, directory_has_entries, host_path, inspect_directory, move_all_entries,
|
||||
move_selected_entries, open_directory, open_exact_directory_path, open_mounted_directory,
|
||||
open_or_create_quarantine, open_regular_file, path_from_host, remove_directory_contents,
|
||||
require_directory_descriptor_identity, require_same_descriptor, validate_relative_path,
|
||||
descriptor_path, host_path, inspect_directory, move_all_entries, move_selected_entries,
|
||||
open_directory, open_exact_directory_path, open_mounted_directory, open_or_create_quarantine,
|
||||
open_regular_file, path_from_host, remove_directory_contents,
|
||||
require_directory_descriptor_identity, require_maintenance_work_shape, require_same_descriptor,
|
||||
validate_relative_path,
|
||||
};
|
||||
|
||||
const MOUNT_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
|
|
@ -394,12 +395,7 @@ impl<'configuration> StateAnchorLayout<'configuration> {
|
|||
|
||||
fn require_maintenance_ready_allowing_quarantine(&self) -> Result<(), StateAnchorError> {
|
||||
self.require_unmounted()?;
|
||||
if directory_has_entries(&self.work_descriptor)? {
|
||||
return Err(StateAnchorError::InvalidLayout(
|
||||
"State Anchor work directory is not empty",
|
||||
));
|
||||
}
|
||||
Ok(())
|
||||
require_maintenance_work_shape(&self.work_descriptor)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue