pub enum JournalRecordV57 {
EndBlock,
Mutation {
object_id: u64,
mutation: MutationV57,
},
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 JournalRecordV57
impl Clone for JournalRecordV57
Source§fn clone(&self) -> JournalRecordV57
fn clone(&self) -> JournalRecordV57
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JournalRecordV57
impl Debug for JournalRecordV57
Source§impl<'de> Deserialize<'de> for JournalRecordV57
impl<'de> Deserialize<'de> for JournalRecordV57
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<JournalRecordV56> for JournalRecordV57
impl From<JournalRecordV56> for JournalRecordV57
Source§fn from(from: JournalRecordV56) -> Self
fn from(from: JournalRecordV56) -> Self
Source§impl Serialize for JournalRecordV57
impl Serialize for JournalRecordV57
Source§impl TypeFingerprint for JournalRecordV57
impl TypeFingerprint for JournalRecordV57
fn fingerprint() -> String
Source§impl Versioned for JournalRecordV57
impl Versioned for JournalRecordV57
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 JournalRecordV57
impl VersionedLatest for JournalRecordV57
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 JournalRecordV57
impl RefUnwindSafe for JournalRecordV57
impl Send for JournalRecordV57
impl Sync for JournalRecordV57
impl Unpin for JournalRecordV57
impl UnsafeUnpin for JournalRecordV57
impl UnwindSafe for JournalRecordV57
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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