pub enum ReflinkOutcome {
Cloned,
Unsupported,
SourceVanished,
}Expand description
The three outcomes of a reflink attempt, kept distinct so callers don’t conflate “filesystem can’t reflink” (a batch-wide property) with “this one source vanished mid-flight” (a per-blob race).
Variants§
Cloned
CoW clone succeeded; dest now exists, sharing physical blocks
with source until either side is written.
Unsupported
The kernel reported reflinks aren’t supported for this
filesystem / src+dst pair (EXDEV/EOPNOTSUPP/ENOTSUP/
ENOSYS/EINVAL). This is a property of the destination
filesystem, so a caller materializing a batch MAY disable
reflinks for the rest of it and fall straight to copy/write.
SourceVanished
The source was gone by the time we looked (concurrent prune /
torn NoSync promote). Reflink is only an optimization, so the
caller should degrade to a real copy / bytes-write for THIS blob
only — and crucially keep reflinks enabled for the rest of the
batch, since the filesystem itself is perfectly capable. A blob
that is genuinely absent (not just unreflinkable) still surfaces
downstream when the copy/write fallback can’t find its bytes.
Trait Implementations§
Source§impl Clone for ReflinkOutcome
impl Clone for ReflinkOutcome
Source§fn clone(&self) -> ReflinkOutcome
fn clone(&self) -> ReflinkOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReflinkOutcome
Source§impl Debug for ReflinkOutcome
impl Debug for ReflinkOutcome
impl Eq for ReflinkOutcome
Source§impl PartialEq for ReflinkOutcome
impl PartialEq for ReflinkOutcome
Source§fn eq(&self, other: &ReflinkOutcome) -> bool
fn eq(&self, other: &ReflinkOutcome) -> bool
self and other values to be equal, and is used by ==.