0.18 primitive: rename crate::io::Writer → WritebackFile
The type's job is the bounded-cache writeback pipeline (sync_file_range + posix_fadvise(DONTNEED)) — not generic writing. The 0.17 name was ambiguous; reading `Writer::new(file)` gave no hint about what was special. New name makes the role obvious at every call site. Adds `WritebackFile::create(path)` and `WritebackFile::open(path)` constructors so callers don't have to assemble a `File` first. No alias kept; this is a clean 0.18 rename. See (internal)/memory/0_18_redesign.md. Single contributor: MattJackson.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
//! both costs.
|
||||
//!
|
||||
//! This module decouples them. A consumer thread owns the
|
||||
//! [`crate::io::Writer`] (the ISO file) and the
|
||||
//! [`crate::io::WritebackFile`] (the ISO file) and the
|
||||
//! [`super::mapfile::Mapfile`]. The producer thread (the caller of
|
||||
//! `Disc::sweep`) keeps the [`crate::sector::SectorReader`], the
|
||||
//! [`super::read_error`] state machine, and decrypt — so what enters
|
||||
@@ -112,7 +112,7 @@ pub(super) struct ConsumerSummary {
|
||||
/// happens on the producer side before send, so the consumer never
|
||||
/// sees keys.
|
||||
pub(super) struct ConsumerInputs {
|
||||
pub file: crate::io::Writer,
|
||||
pub file: crate::io::WritebackFile,
|
||||
pub map: Mapfile,
|
||||
/// `sync_all`-on-failure-is-an-error iff the output is a regular
|
||||
/// file. `/dev/null` and pipes always fail `sync_all`; that's not
|
||||
@@ -279,7 +279,7 @@ fn apply_item(
|
||||
.file
|
||||
.seek(SeekFrom::Start(pos))
|
||||
.map_err(|e| Error::IoError { source: e })?;
|
||||
// Subsequent writes are sequential; `crate::io::Writer`'s
|
||||
// Subsequent writes are sequential; `crate::io::WritebackFile`'s
|
||||
// seek-elision keeps them on the writeback pipeline path.
|
||||
let mut filled = 0u64;
|
||||
while filled < len {
|
||||
|
||||
Reference in New Issue
Block a user