pub enum JournalRecordV55 {
EndBlock,
Mutation {
object_id: u64,
mutation: MutationV55,
},
Commit,
Discard(u64),
DidFlushDevice(u64),
DataChecksums(Range<u64>, ChecksumsV38, bool),
}Variants§
EndBlock
Mutation
Commit
Commits records in the transaction.
Discard(u64)
Discard all mutations with offsets greater than or equal to the given offset.
DidFlushDevice(u64)
Indicates the device was flushed at the given journal offset. Note that this really means that at this point in the journal offset, we can be certain that there’s no remaining buffered data in the block device; the buffers and the disk contents are consistent. We insert one of these records after a flush along with the next transaction to go through. If that never comes (either due to graceful or hard shutdown), the journal reset on the next mount will serve the same purpose and count as a flush, although it is necessary to defensively flush the device before replaying the journal (if possible, i.e. not read-only) in case the block device connection was reused.
DataChecksums(Range<u64>, ChecksumsV38, bool)
Checksums for a data range written by this transaction. A transaction is only valid if these checksums are right. The range is the device offset the checksums are for.
A boolean indicates whether this range is being written to for the first time. For overwrite extents, we only check the checksums for a block if it has been written to for the first time since the last flush, because otherwise we can’t roll it back anyway so it doesn’t matter. For copy-on-write extents, the bool is always true.
Trait Implementations§
Source§impl Clone for JournalRecordV55
impl Clone for JournalRecordV55
Source§fn clone(&self) -> JournalRecordV55
fn clone(&self) -> JournalRecordV55
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JournalRecordV55
impl Debug for JournalRecordV55
Source§impl<'de> Deserialize<'de> for JournalRecordV55
impl<'de> Deserialize<'de> for JournalRecordV55
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<JournalRecordV40> for JournalRecordV55
impl From<JournalRecordV40> for JournalRecordV55
Source§fn from(item: JournalRecordV40) -> Self
fn from(item: JournalRecordV40) -> Self
Source§impl From<JournalRecordV41> for JournalRecordV55
impl From<JournalRecordV41> for JournalRecordV55
Source§fn from(item: JournalRecordV41) -> Self
fn from(item: JournalRecordV41) -> Self
Source§impl From<JournalRecordV42> for JournalRecordV55
impl From<JournalRecordV42> for JournalRecordV55
Source§fn from(item: JournalRecordV42) -> Self
fn from(item: JournalRecordV42) -> Self
Source§impl From<JournalRecordV43> for JournalRecordV55
impl From<JournalRecordV43> for JournalRecordV55
Source§fn from(item: JournalRecordV43) -> Self
fn from(item: JournalRecordV43) -> Self
Source§impl From<JournalRecordV46> for JournalRecordV55
impl From<JournalRecordV46> for JournalRecordV55
Source§fn from(item: JournalRecordV46) -> Self
fn from(item: JournalRecordV46) -> Self
Source§impl From<JournalRecordV47> for JournalRecordV55
impl From<JournalRecordV47> for JournalRecordV55
Source§fn from(item: JournalRecordV47) -> Self
fn from(item: JournalRecordV47) -> Self
Source§impl From<JournalRecordV49> for JournalRecordV55
impl From<JournalRecordV49> for JournalRecordV55
Source§fn from(item: JournalRecordV49) -> Self
fn from(item: JournalRecordV49) -> Self
Source§impl From<JournalRecordV50> for JournalRecordV55
impl From<JournalRecordV50> for JournalRecordV55
Source§fn from(item: JournalRecordV50) -> Self
fn from(item: JournalRecordV50) -> Self
Source§impl From<JournalRecordV54> for JournalRecordV55
impl From<JournalRecordV54> for JournalRecordV55
Source§fn from(from: JournalRecordV54) -> Self
fn from(from: JournalRecordV54) -> Self
Source§impl Serialize for JournalRecordV55
impl Serialize for JournalRecordV55
Source§impl TypeFingerprint for JournalRecordV55
impl TypeFingerprint for JournalRecordV55
fn fingerprint() -> String
Source§impl Versioned for JournalRecordV55
impl Versioned for JournalRecordV55
Source§fn max_serialized_size() -> Option<u64>
fn max_serialized_size() -> Option<u64>
fn deserialize_from<R>(reader: &mut R, _version: Version) -> Result<Self>
fn serialize_into<W>(&self, writer: &mut W) -> Result<()>
Source§impl VersionedLatest for JournalRecordV55
impl VersionedLatest for JournalRecordV55
Source§fn deserialize_from_version<R>(reader: &mut R, version: Version) -> Result<Self>
fn deserialize_from_version<R>(reader: &mut R, version: Version) -> Result<Self>
Auto Trait Implementations§
impl Freeze for JournalRecordV55
impl RefUnwindSafe for JournalRecordV55
impl Send for JournalRecordV55
impl Sync for JournalRecordV55
impl Unpin for JournalRecordV55
impl UnsafeUnpin for JournalRecordV55
impl UnwindSafe for JournalRecordV55
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
impl<F, N> FidlIntoNative<Box<N>> for Fwhere
F: FidlIntoNative<N>,
fn fidl_into_native(self) -> Box<N>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more